commit
cb4111d405
2 changed files with 24 additions and 5 deletions
|
@ -66,6 +66,26 @@ public class BaseMetaTileEntity extends BaseTileEntity implements IGregTechTileE
|
||||||
private String mOwnerName = "";
|
private String mOwnerName = "";
|
||||||
private NBTTagCompound mRecipeStuff = new NBTTagCompound();
|
private NBTTagCompound mRecipeStuff = new NBTTagCompound();
|
||||||
|
|
||||||
|
private static final Field ENTITY_ITEM_HEALTH_FIELD;
|
||||||
|
static
|
||||||
|
{
|
||||||
|
Field f = null;
|
||||||
|
|
||||||
|
try {
|
||||||
|
f = EntityItem.class.getDeclaredField("field_70291_e");
|
||||||
|
f.setAccessible(true);
|
||||||
|
} catch (Exception e1) {
|
||||||
|
try {
|
||||||
|
f = EntityItem.class.getDeclaredField("health");
|
||||||
|
f.setAccessible(true);
|
||||||
|
} catch (Exception e2) {
|
||||||
|
e1.printStackTrace();
|
||||||
|
e2.printStackTrace();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
ENTITY_ITEM_HEALTH_FIELD = f;
|
||||||
|
}
|
||||||
|
|
||||||
public BaseMetaTileEntity() {
|
public BaseMetaTileEntity() {
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1144,10 +1164,9 @@ public class BaseMetaTileEntity extends BaseTileEntity implements IGregTechTileE
|
||||||
tItemEntity.hurtResistantTime = 999999;
|
tItemEntity.hurtResistantTime = 999999;
|
||||||
tItemEntity.lifespan = 60000;
|
tItemEntity.lifespan = 60000;
|
||||||
try {
|
try {
|
||||||
Field tField = tItemEntity.getClass().getDeclaredField("health");
|
if(ENTITY_ITEM_HEALTH_FIELD != null)
|
||||||
tField.setAccessible(true);
|
ENTITY_ITEM_HEALTH_FIELD.setInt(tItemEntity, 99999999);
|
||||||
tField.setInt(tItemEntity, 99999999);
|
} catch (Exception ignored) {}
|
||||||
} catch (Exception e) {e.printStackTrace();}
|
|
||||||
this.worldObj.spawnEntityInWorld(tItemEntity);
|
this.worldObj.spawnEntityInWorld(tItemEntity);
|
||||||
tItem.stackSize = 0;
|
tItem.stackSize = 0;
|
||||||
}
|
}
|
||||||
|
|
|
@ -338,7 +338,7 @@ public class ModularArmor_Item extends ItemArmor implements ISpecialArmor, IGogg
|
||||||
if (stepup > 1) {
|
if (stepup > 1) {
|
||||||
aPlayer.stepHeight = 1.0f;
|
aPlayer.stepHeight = 1.0f;
|
||||||
}
|
}
|
||||||
if (GameSettings.isKeyDown(Minecraft.getMinecraft().gameSettings.keyBindJump)) {
|
if (aWorld.isRemote && GameSettings.isKeyDown(Minecraft.getMinecraft().gameSettings.keyBindJump)) {
|
||||||
if (stepup > 0 && jumpticks > 0) {
|
if (stepup > 0 && jumpticks > 0) {
|
||||||
if (data.maxWeight > 2000) {
|
if (data.maxWeight > 2000) {
|
||||||
stepup *= 2000.0D / data.maxWeight;
|
stepup *= 2000.0D / data.maxWeight;
|
||||||
|
|
Loading…
Reference in a new issue