From 5cd8db45518da6d46331ce6408f468f3254fbfa5 Mon Sep 17 00:00:00 2001 From: Progwml6 Date: Wed, 5 Feb 2014 20:06:41 -0500 Subject: [PATCH 1/2] fix several compile errors from remapping --- src/main/java/biomesoplenty/client/gui/StartupWarningGUI.java | 4 ++-- .../common/eventhandler/entity/FlippersEventHandler.java | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/main/java/biomesoplenty/client/gui/StartupWarningGUI.java b/src/main/java/biomesoplenty/client/gui/StartupWarningGUI.java index 2c681394b..403a45c9e 100644 --- a/src/main/java/biomesoplenty/client/gui/StartupWarningGUI.java +++ b/src/main/java/biomesoplenty/client/gui/StartupWarningGUI.java @@ -44,9 +44,9 @@ public class StartupWarningGUI extends GuiScreen //TODO: buttonList this.buttonList.clear(); //TODO: buttonList - this.buttonList.add(new GuiButton(0, this.width / 2 - 175, this.height - 48, 350, 20, I18n.getStringParams("OK"))); + this.buttonList.add(new GuiButton(0, this.width / 2 - 175, this.height - 48, 350, 20, I18n.format("OK"))); //TODO: buttonList - this.buttonList.add(new GuiButton(1, this.width / 2 - 175, this.height - 24, 350, 20, I18n.getStringParams("Cancel"))); + this.buttonList.add(new GuiButton(1, this.width / 2 - 175, this.height - 24, 350, 20, I18n.format("Cancel"))); } @Override diff --git a/src/main/java/biomesoplenty/common/eventhandler/entity/FlippersEventHandler.java b/src/main/java/biomesoplenty/common/eventhandler/entity/FlippersEventHandler.java index 368ce96e6..8228a482a 100644 --- a/src/main/java/biomesoplenty/common/eventhandler/entity/FlippersEventHandler.java +++ b/src/main/java/biomesoplenty/common/eventhandler/entity/FlippersEventHandler.java @@ -17,7 +17,7 @@ public class FlippersEventHandler { EntityLiving entity = (EntityLiving)event.entity; - ItemStack itemstack = entity.getCurrentItemOrArmor(1); + ItemStack itemstack = entity.getEquipmentInSlot(1); if (entity.isInWater()) { From 4b1620619b577e466d96d439c8f96a3726b24c14 Mon Sep 17 00:00:00 2001 From: Progwml6 Date: Wed, 5 Feb 2014 20:13:11 -0500 Subject: [PATCH 2/2] fix errors with setAttribute --- src/main/java/biomesoplenty/common/entities/EntityGlob.java | 2 +- .../biomesoplenty/common/entities/EntityJungleSpider.java | 4 ++-- .../java/biomesoplenty/common/entities/EntityPhantom.java | 4 ++-- .../java/biomesoplenty/common/entities/EntityRosester.java | 2 +- src/main/java/biomesoplenty/common/entities/EntityWasp.java | 2 +- 5 files changed, 7 insertions(+), 7 deletions(-) diff --git a/src/main/java/biomesoplenty/common/entities/EntityGlob.java b/src/main/java/biomesoplenty/common/entities/EntityGlob.java index 738f7acd2..766dbd667 100644 --- a/src/main/java/biomesoplenty/common/entities/EntityGlob.java +++ b/src/main/java/biomesoplenty/common/entities/EntityGlob.java @@ -49,7 +49,7 @@ public class EntityGlob extends EntityLiving implements IMob this.dataWatcher.updateObject(16, new Byte((byte)par1)); this.setSize(0.6F * (float)par1, 0.6F * (float)par1); this.setPosition(this.posX, this.posY, this.posZ); - this.getEntityAttribute(SharedMonsterAttributes.maxHealth).setAttribute((double)(par1 * par1)); + this.getEntityAttribute(SharedMonsterAttributes.maxHealth).setBaseValue((double)(par1 * par1)); this.setHealth(this.getMaxHealth()); this.experienceValue = par1; } diff --git a/src/main/java/biomesoplenty/common/entities/EntityJungleSpider.java b/src/main/java/biomesoplenty/common/entities/EntityJungleSpider.java index d8a9d63e8..bbcdfd225 100644 --- a/src/main/java/biomesoplenty/common/entities/EntityJungleSpider.java +++ b/src/main/java/biomesoplenty/common/entities/EntityJungleSpider.java @@ -22,9 +22,9 @@ public class EntityJungleSpider extends EntitySpider { super.applyEntityAttributes(); //Max health - this.getEntityAttribute(SharedMonsterAttributes.maxHealth).setAttribute(6.0D); + this.getEntityAttribute(SharedMonsterAttributes.maxHealth).setBaseValue(6.0D); //Movement speed - this.getEntityAttribute(SharedMonsterAttributes.movementSpeed).setAttribute(0.95D); + this.getEntityAttribute(SharedMonsterAttributes.movementSpeed).setBaseValue(0.95D); } @Override diff --git a/src/main/java/biomesoplenty/common/entities/EntityPhantom.java b/src/main/java/biomesoplenty/common/entities/EntityPhantom.java index 742f6da4b..86ffa937c 100644 --- a/src/main/java/biomesoplenty/common/entities/EntityPhantom.java +++ b/src/main/java/biomesoplenty/common/entities/EntityPhantom.java @@ -25,8 +25,8 @@ public class EntityPhantom extends EntityMob { super.applyEntityAttributes(); - this.getEntityAttribute(SharedMonsterAttributes.maxHealth).setAttribute(20.0D); - this.getEntityAttribute(SharedMonsterAttributes.movementSpeed).setAttribute(0.45D); + this.getEntityAttribute(SharedMonsterAttributes.maxHealth).setBaseValue(20.0D); + this.getEntityAttribute(SharedMonsterAttributes.movementSpeed).setBaseValue(0.45D); } @Override diff --git a/src/main/java/biomesoplenty/common/entities/EntityRosester.java b/src/main/java/biomesoplenty/common/entities/EntityRosester.java index 5274109a8..e21035468 100644 --- a/src/main/java/biomesoplenty/common/entities/EntityRosester.java +++ b/src/main/java/biomesoplenty/common/entities/EntityRosester.java @@ -59,7 +59,7 @@ public class EntityRosester extends EntityChicken { super.applyEntityAttributes(); - this.getEntityAttribute(SharedMonsterAttributes.maxHealth).setAttribute(4.0D); + this.getEntityAttribute(SharedMonsterAttributes.maxHealth).setBaseValue(4.0D); } @Override diff --git a/src/main/java/biomesoplenty/common/entities/EntityWasp.java b/src/main/java/biomesoplenty/common/entities/EntityWasp.java index a7e904ee8..0f368d24d 100644 --- a/src/main/java/biomesoplenty/common/entities/EntityWasp.java +++ b/src/main/java/biomesoplenty/common/entities/EntityWasp.java @@ -31,7 +31,7 @@ public class EntityWasp extends EntityFlyingMob protected void applyEntityAttributes() { super.applyEntityAttributes(); - this.getEntityAttribute(SharedMonsterAttributes.attackDamage).setAttribute(2.5D); + this.getEntityAttribute(SharedMonsterAttributes.attackDamage).setBaseValue(2.5D); } @Override