mirror of
https://github.com/Ellpeck/ActuallyAdditions.git
synced 2024-12-22 19:39:24 +01:00
fix: lang, stopped worldsave crashing
This commit is contained in:
parent
ae22d44755
commit
674e000e2b
3 changed files with 5 additions and 1268 deletions
|
@ -69,8 +69,8 @@ public class ItemWingsOfTheBats extends ItemBase {
|
|||
public double getDurabilityForDisplay(ItemStack stack) {
|
||||
PlayerEntity player = ClientProxy.getCurrentPlayer();
|
||||
if (player != null) {
|
||||
PlayerData.PlayerSave data = PlayerData.getDataFromPlayer(player);
|
||||
double diff = MAX_FLY_TIME - data.batWingsFlyTime;
|
||||
// PlayerData.PlayerSave data = PlayerData.getDataFromPlayer(player);
|
||||
double diff = MAX_FLY_TIME - 1;//data.batWingsFlyTime; // TODO: fix me
|
||||
return 1 - diff / MAX_FLY_TIME;
|
||||
}
|
||||
return super.getDurabilityForDisplay(stack);
|
||||
|
@ -80,8 +80,8 @@ public class ItemWingsOfTheBats extends ItemBase {
|
|||
public int getRGBDurabilityForDisplay(ItemStack stack) {
|
||||
PlayerEntity player = ClientProxy.getCurrentPlayer();
|
||||
if (player != null) {
|
||||
PlayerData.PlayerSave data = PlayerData.getDataFromPlayer(player);
|
||||
int curr = data.batWingsFlyTime;
|
||||
// PlayerData.PlayerSave data = PlayerData.getDataFromPlayer(player);
|
||||
int curr = 1;//data.batWingsFlyTime; // TODO: fix me
|
||||
return MathHelper.hsvToRgb(Math.max(0.0F, 1 - (float) curr / MAX_FLY_TIME) / 3.0F, 1.0F, 1.0F);
|
||||
}
|
||||
return super.getRGBDurabilityForDisplay(stack);
|
||||
|
|
|
@ -85,7 +85,7 @@ public final class StringUtil {
|
|||
// try {
|
||||
// Method m = LanguageMap.class.getDeclaredMethod("inject", LanguageMap.class, InputStream.class);
|
||||
// m.setAccessible(true);
|
||||
// m.invoke(null, cancerino = new LanguageMap(), ActuallyAdditions.class.getResourceAsStream("/assets/actuallyadditions/lang/en_US.lang"));
|
||||
// m.invoke(null, cancerino = new LanguageMap(), ActuallyAdditions.class.getResourceAsStream("/assets/actuallyadditions/lang/en_us.json"));
|
||||
// } catch (Exception e) {
|
||||
// e.printStackTrace();
|
||||
// throw new RuntimeException("Actually Additions failed to access LanguageMap.inject. Report this!");
|
||||
|
|
File diff suppressed because it is too large
Load diff
Loading…
Reference in a new issue