diff options
Diffstat (limited to 'src/Java/gtPlusPlus/core')
11 files changed, 26 insertions, 110 deletions
diff --git a/src/Java/gtPlusPlus/core/client/model/ModelStaballoyConstruct.java b/src/Java/gtPlusPlus/core/client/model/ModelStaballoyConstruct.java index 72693e3de7..bba3bd1ad8 100644 --- a/src/Java/gtPlusPlus/core/client/model/ModelStaballoyConstruct.java +++ b/src/Java/gtPlusPlus/core/client/model/ModelStaballoyConstruct.java @@ -11,20 +11,7 @@ import net.minecraft.entity.monster.EntityIronGolem; @SideOnly(Side.CLIENT) public class ModelStaballoyConstruct extends ModelIronGolem { - /** The head model for the iron golem. */ - public ModelRenderer ironGolemHead; - /** The body model for the iron golem. */ - public ModelRenderer ironGolemBody; - /** The right arm model for the iron golem. */ - public ModelRenderer ironGolemRightArm; - /** The left arm model for the iron golem. */ - public ModelRenderer ironGolemLeftArm; - /** The left leg model for the Iron Golem. */ - public ModelRenderer ironGolemLeftLeg; - /** The right leg model for the Iron Golem. */ - public ModelRenderer ironGolemRightLeg; - private static final String __OBFID = "CL_00000863"; - + public ModelStaballoyConstruct() { this(0.0F); diff --git a/src/Java/gtPlusPlus/core/entity/EntityPrimedMiningExplosive.java b/src/Java/gtPlusPlus/core/entity/EntityPrimedMiningExplosive.java index 87e325a5bd..6a2b5535e7 100644 --- a/src/Java/gtPlusPlus/core/entity/EntityPrimedMiningExplosive.java +++ b/src/Java/gtPlusPlus/core/entity/EntityPrimedMiningExplosive.java @@ -10,7 +10,6 @@ import net.minecraft.world.World; public class EntityPrimedMiningExplosive extends EntityTNTPrimed { /** How long the fuse is */ - public int fuse; private EntityLivingBase tntPlacedBy; public EntityPrimedMiningExplosive(final World world){ diff --git a/src/Java/gtPlusPlus/core/entity/projectile/EntityToxinball.java b/src/Java/gtPlusPlus/core/entity/projectile/EntityToxinball.java index 5fcdc67ed6..f68ef82622 100644 --- a/src/Java/gtPlusPlus/core/entity/projectile/EntityToxinball.java +++ b/src/Java/gtPlusPlus/core/entity/projectile/EntityToxinball.java @@ -19,12 +19,8 @@ public abstract class EntityToxinball extends EntityFireball { protected int entityZ = -1; private Block block; private boolean inGround; - public EntityLivingBase shootingEntity; private int ticksAlive; private int ticksInAir; - public double accelerationX; - public double accelerationY; - public double accelerationZ; public EntityToxinball(World world) { super(world); diff --git a/src/Java/gtPlusPlus/core/item/general/ItemAirFilter.java b/src/Java/gtPlusPlus/core/item/general/ItemAirFilter.java index 1596b5985b..04c5dc68e1 100644 --- a/src/Java/gtPlusPlus/core/item/general/ItemAirFilter.java +++ b/src/Java/gtPlusPlus/core/item/general/ItemAirFilter.java @@ -52,6 +52,11 @@ public class ItemAirFilter extends Item { @Override public String getItemStackDisplayName(final ItemStack tItem) { + + if (tItem == null) { + return "Air Filter"; + } + String itemName = tItem == null ? "Air Filter" : super.getItemStackDisplayName(tItem); String suffixName = ""; if (tItem.getItemDamage() == 0){ diff --git a/src/Java/gtPlusPlus/core/item/general/capture/ItemEntityCatcher.java b/src/Java/gtPlusPlus/core/item/general/capture/ItemEntityCatcher.java index a7f80bd244..bc162140b1 100644 --- a/src/Java/gtPlusPlus/core/item/general/capture/ItemEntityCatcher.java +++ b/src/Java/gtPlusPlus/core/item/general/capture/ItemEntityCatcher.java @@ -182,7 +182,7 @@ public class ItemEntityCatcher extends Item implements IEntityCatcher { public void addInformation(ItemStack p_77624_1_, EntityPlayer p_77624_2_, List p_77624_3_, boolean p_77624_4_) { if (hasEntity(p_77624_1_)){ String mName = NBTUtils.getString(p_77624_1_,"mEntityName"); - if (mName != null && !mName.equals("") && mName != ""){ + if (mName != null && !mName.equals("")){ p_77624_3_.add(EnumChatFormatting.GRAY+"Contains a "+mName+"."); } } diff --git a/src/Java/gtPlusPlus/core/material/MaterialGenerator.java b/src/Java/gtPlusPlus/core/material/MaterialGenerator.java index fb9cf932cb..14dda50614 100644 --- a/src/Java/gtPlusPlus/core/material/MaterialGenerator.java +++ b/src/Java/gtPlusPlus/core/material/MaterialGenerator.java @@ -233,11 +233,23 @@ public class MaterialGenerator { @SuppressWarnings("unused") public static void generateOreMaterial(final Material matInfo){ try { + + if (matInfo == null){ + Logger.DEBUG_MATERIALS("Invalid Material while constructing null material."); + return; + } + final String unlocalizedName = matInfo.getUnlocalizedName(); final String materialName = matInfo.getLocalizedName(); final short[] C = matInfo.getRGBA(); final Integer Colour = Utils.rgbtoHexValue(C[0], C[1], C[2]); + + if (Colour == null){ + Logger.DEBUG_MATERIALS("Invalid Material while constructing "+materialName+"."); + return; + } + int sRadiation = 0; if (matInfo.vRadiationLevel > 0){ sRadiation = matInfo.vRadiationLevel; @@ -246,9 +258,7 @@ public class MaterialGenerator { Item temp; Block tempBlock; - if (matInfo == null || Colour == null){ - Logger.DEBUG_MATERIALS("Invalid Material while constructing "+materialName+"."); - } + tempBlock = new BlockBaseOre(matInfo, BlockTypes.ORE, Colour.intValue()); @@ -264,7 +274,7 @@ public class MaterialGenerator { RecipeGen_Ore.generateRecipes(matInfo); } catch (final Throwable t){ - Logger.MATERIALS("[Error] "+matInfo.getLocalizedName()+" failed to generate."); + Logger.MATERIALS("[Error] "+(matInfo != null ? matInfo.getLocalizedName() : "Null Material")+" failed to generate."); t.printStackTrace(); } } diff --git a/src/Java/gtPlusPlus/core/util/minecraft/EntityUtils.java b/src/Java/gtPlusPlus/core/util/minecraft/EntityUtils.java index b16089c0de..f03f213f11 100644 --- a/src/Java/gtPlusPlus/core/util/minecraft/EntityUtils.java +++ b/src/Java/gtPlusPlus/core/util/minecraft/EntityUtils.java @@ -84,7 +84,7 @@ public class EntityUtils { /** * Static Version of the method used in {@code doFireDamage(entity, int)} to save memory. */ - private static volatile Method dealFireDamage; + private static volatile Method dealFireDamage = null; /** * Reflective Call to do Fire Damage to an entity (Does not set entity on fire though) diff --git a/src/Java/gtPlusPlus/core/util/minecraft/MaterialUtils.java b/src/Java/gtPlusPlus/core/util/minecraft/MaterialUtils.java index 6c15c06b1d..2a392f6f18 100644 --- a/src/Java/gtPlusPlus/core/util/minecraft/MaterialUtils.java +++ b/src/Java/gtPlusPlus/core/util/minecraft/MaterialUtils.java @@ -198,7 +198,7 @@ public class MaterialUtils { catch (IllegalArgumentException | IllegalAccessException e) { mName = mat.name(); } - if (mName == null || mName.equals("") || mName == ""){ + if (mName == null || mName.equals("")){ mName = mat.name(); } return mName; diff --git a/src/Java/gtPlusPlus/core/world/darkworld/biome/BiomeGenerator_Custom.java b/src/Java/gtPlusPlus/core/world/darkworld/biome/BiomeGenerator_Custom.java index 74a67dfc5e..294d61f802 100644 --- a/src/Java/gtPlusPlus/core/world/darkworld/biome/BiomeGenerator_Custom.java +++ b/src/Java/gtPlusPlus/core/world/darkworld/biome/BiomeGenerator_Custom.java @@ -22,78 +22,7 @@ public class BiomeGenerator_Custom extends BiomeDecorator { /** The world the BiomeDecorator is currently decorating */ public World currentWorld; /** The Biome Decorator's random number generator. */ - public Random randomGenerator; - /** The X-coordinate of the chunk currently being decorated */ - public int chunk_X; - /** The Z-coordinate of the chunk currently being decorated */ - public int chunk_Z; - /** The clay generator. */ - public WorldGenerator clayGen = new WorldGenClay(4); - /** The sand generator. */ - public WorldGenerator sandGen; - /** The gravel generator. */ - public WorldGenerator gravelAsSandGen; - /** The dirt generator. */ - public WorldGenerator dirtGen; - public WorldGenerator gravelGen; - public WorldGenerator coalGen; - public WorldGenerator ironGen; - /** Field that holds gold WorldGenMinable */ - public WorldGenerator goldGen; - /** Field that holds redstone WorldGenMinable */ - public WorldGenerator redstoneGen; - /** Field that holds diamond WorldGenMinable */ - public WorldGenerator diamondGen; - /** Field that holds Lapis WorldGenMinable */ - public WorldGenerator lapisGen; - public WorldGenFlowers yellowFlowerGen; - /** Field that holds mushroomBrown WorldGenFlowers */ - public WorldGenerator mushroomBrownGen; - /** Field that holds mushroomRed WorldGenFlowers */ - public WorldGenerator mushroomRedGen; - /** Field that holds big mushroom generator */ - public WorldGenerator bigMushroomGen; - /** Field that holds WorldGenReed */ - public WorldGenerator reedGen; - /** Field that holds WorldGenCactus */ - public WorldGenerator cactusGen; - /** The water lily generation! */ - public WorldGenerator waterlilyGen; - /** Amount of waterlilys per chunk. */ - public int waterlilyPerChunk; - /** The number of trees to attempt to generate per chunk. Up to 10 in forests, none in deserts. */ - public int treesPerChunk; - /** - * The number of yellow flower patches to generate per chunk. The game generates much less than this number, since - * it attempts to generate them at a random altitude. - */ - public int flowersPerChunk; - /** The amount of tall grass to generate per chunk. */ - public int grassPerChunk; - /** The number of dead bushes to generate per chunk. Used in deserts and swamps. */ - public int deadBushPerChunk; - /** - * The number of extra mushroom patches per chunk. It generates 1/4 this number in brown mushroom patches, and 1/8 - * this number in red mushroom patches. These mushrooms go beyond the default base number of mushrooms. - */ - public int mushroomsPerChunk; - /** The number of reeds to generate per chunk. Reeds won't generate if the randomly selected placement is unsuitable. */ - public int reedsPerChunk; - /** The number of cactus plants to generate per chunk. Cacti only work on sand. */ - public int cactiPerChunk; - /** The number of sand patches to generate per chunk. Sand patches only generate when part of it is underwater. */ - public int sandPerChunk; - /** - * The number of sand patches to generate per chunk. Sand patches only generate when part of it is underwater. There - * appear to be two separate fields for this. - */ - public int sandPerChunk2; - /** The number of clay patches to generate per chunk. Only generates when part of it is underwater. */ - public int clayPerChunk; - /** Amount of big mushrooms per chunk */ - public int bigMushroomsPerChunk; - /** True if decorator should generate surface lava & water */ - public boolean generateLakes; + public Random randomGenerator; public WorldGenerator fluoriteGen; diff --git a/src/Java/gtPlusPlus/core/world/darkworld/biome/Biome_DarkWorld.java b/src/Java/gtPlusPlus/core/world/darkworld/biome/Biome_DarkWorld.java index 92f3f43d95..f912fb7c6a 100644 --- a/src/Java/gtPlusPlus/core/world/darkworld/biome/Biome_DarkWorld.java +++ b/src/Java/gtPlusPlus/core/world/darkworld/biome/Biome_DarkWorld.java @@ -99,7 +99,7 @@ public class Biome_DarkWorld { if (mTempList != null){ mTempList[CORE.DARKBIOME_ID] = this; mInternalBiomeList.set(null, mTempList); - if (mClone != mInternalBiomeList && mClone.hashCode() != mInternalBiomeList.hashCode()){ + if (mTempList != mInternalBiomeList.get(null)){ ReflectionUtils.setFinalStatic(mInternalBiomeList, mTempList); Logger.REFLECTION("Set Biome ID for Dark World Biome internally in 'biomeList' field from "+BiomeGenBase.class.getCanonicalName()+"."); return true; diff --git a/src/Java/gtPlusPlus/core/world/explosions/MiningExplosion.java b/src/Java/gtPlusPlus/core/world/explosions/MiningExplosion.java index bcbb16a3b6..ead327d85a 100644 --- a/src/Java/gtPlusPlus/core/world/explosions/MiningExplosion.java +++ b/src/Java/gtPlusPlus/core/world/explosions/MiningExplosion.java @@ -16,20 +16,10 @@ import net.minecraft.util.*; import net.minecraft.world.*; public class MiningExplosion extends Explosion { - /** whether or not the explosion sets fire to blocks around it */ - public boolean isFlaming = false; - /** whether or not this explosion spawns smoke particles */ - public boolean isSmoking = true; private final int field_77289_h = 16; private final Random explosionRNG = new XSTR(); private final World worldObj; - public double explosionX; - public double explosionY; - public double explosionZ; - public Entity exploder; - public float explosionSize; - /** A list of ChunkPositions of blocks affected by this explosion */ - public List<ChunkPosition> affectedBlockPositions = new ArrayList<>(); + private final Map<Entity, Vec3> field_77288_k = new HashMap<>(); public MiningExplosion(final World worldObj, final Entity entityObj, final double x, final double y, final double z, final float size) { |