mirror of
https://github.com/Ellpeck/ActuallyAdditions.git
synced 2024-11-22 23:28:35 +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) {
|
public double getDurabilityForDisplay(ItemStack stack) {
|
||||||
PlayerEntity player = ClientProxy.getCurrentPlayer();
|
PlayerEntity player = ClientProxy.getCurrentPlayer();
|
||||||
if (player != null) {
|
if (player != null) {
|
||||||
PlayerData.PlayerSave data = PlayerData.getDataFromPlayer(player);
|
// PlayerData.PlayerSave data = PlayerData.getDataFromPlayer(player);
|
||||||
double diff = MAX_FLY_TIME - data.batWingsFlyTime;
|
double diff = MAX_FLY_TIME - 1;//data.batWingsFlyTime; // TODO: fix me
|
||||||
return 1 - diff / MAX_FLY_TIME;
|
return 1 - diff / MAX_FLY_TIME;
|
||||||
}
|
}
|
||||||
return super.getDurabilityForDisplay(stack);
|
return super.getDurabilityForDisplay(stack);
|
||||||
|
@ -80,8 +80,8 @@ public class ItemWingsOfTheBats extends ItemBase {
|
||||||
public int getRGBDurabilityForDisplay(ItemStack stack) {
|
public int getRGBDurabilityForDisplay(ItemStack stack) {
|
||||||
PlayerEntity player = ClientProxy.getCurrentPlayer();
|
PlayerEntity player = ClientProxy.getCurrentPlayer();
|
||||||
if (player != null) {
|
if (player != null) {
|
||||||
PlayerData.PlayerSave data = PlayerData.getDataFromPlayer(player);
|
// PlayerData.PlayerSave data = PlayerData.getDataFromPlayer(player);
|
||||||
int curr = data.batWingsFlyTime;
|
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 MathHelper.hsvToRgb(Math.max(0.0F, 1 - (float) curr / MAX_FLY_TIME) / 3.0F, 1.0F, 1.0F);
|
||||||
}
|
}
|
||||||
return super.getRGBDurabilityForDisplay(stack);
|
return super.getRGBDurabilityForDisplay(stack);
|
||||||
|
|
|
@ -85,7 +85,7 @@ public final class StringUtil {
|
||||||
// try {
|
// try {
|
||||||
// Method m = LanguageMap.class.getDeclaredMethod("inject", LanguageMap.class, InputStream.class);
|
// Method m = LanguageMap.class.getDeclaredMethod("inject", LanguageMap.class, InputStream.class);
|
||||||
// m.setAccessible(true);
|
// 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) {
|
// } catch (Exception e) {
|
||||||
// e.printStackTrace();
|
// e.printStackTrace();
|
||||||
// throw new RuntimeException("Actually Additions failed to access LanguageMap.inject. Report this!");
|
// 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