diff --git a/build.gradle b/build.gradle index e8177a14e7..d243933010 100644 --- a/build.gradle +++ b/build.gradle @@ -24,7 +24,7 @@ apply plugin: 'net.minecraftforge.gradle' apply plugin: 'eclipse' apply plugin: 'maven-publish' -version = '1.9.3-c' +version = '1.9.3-d' group = 'com.hbm' // http://maven.apache.org/guides/mini/guide-naming-conventions.html archivesBaseName = 'NTM-Extended-1.12.2' diff --git a/gradle.properties b/gradle.properties index 8c73a909b3..49f125a66b 100644 --- a/gradle.properties +++ b/gradle.properties @@ -5,5 +5,5 @@ org.gradle.daemon=true org.gradle.configureondemand=true org.gradle.parallel=true jei_version=4.16.1.302 -version=1.9.3-c +version=1.9.3-d mc_version=1.12.2 \ No newline at end of file diff --git a/src/main/java/com/hbm/blocks/fluid/ToxicBlock.java b/src/main/java/com/hbm/blocks/fluid/ToxicBlock.java index 92251ba953..0406005f09 100644 --- a/src/main/java/com/hbm/blocks/fluid/ToxicBlock.java +++ b/src/main/java/com/hbm/blocks/fluid/ToxicBlock.java @@ -1,7 +1,5 @@ package com.hbm.blocks.fluid; -import java.util.Random; - import com.hbm.blocks.ModBlocks; import com.hbm.util.ContaminationUtil; import com.hbm.util.ContaminationUtil.ContaminationType; @@ -90,10 +88,4 @@ public boolean reactToBlocks(World world, BlockPos pos) { public int tickRate(World world) { return 15; } - - @Override - public boolean isReplaceable(IBlockAccess worldIn, BlockPos pos){ - Random rand = new Random(); - return rand.nextInt(64) == 0; - } } diff --git a/src/main/java/com/hbm/blocks/machine/BlockSpinnyLight.java b/src/main/java/com/hbm/blocks/machine/BlockSpinnyLight.java index 08846d5ec4..bb85e8d09f 100644 --- a/src/main/java/com/hbm/blocks/machine/BlockSpinnyLight.java +++ b/src/main/java/com/hbm/blocks/machine/BlockSpinnyLight.java @@ -76,7 +76,7 @@ public boolean onBlockActivated(World worldIn, BlockPos pos, IBlockState state, ent.color = color; ent.markDirty(); worldIn.notifyBlockUpdate(pos, state, state, 2 | 4); - //if(!playerIn.isCreative()) + if(!playerIn.isCreative()) playerIn.getHeldItem(hand).shrink(1); return true; } catch(IllegalArgumentException e){} diff --git a/src/main/java/com/hbm/blocks/machine/MachineFENSU.java b/src/main/java/com/hbm/blocks/machine/MachineFENSU.java index 798cbe7691..4b49108bf0 100644 --- a/src/main/java/com/hbm/blocks/machine/MachineFENSU.java +++ b/src/main/java/com/hbm/blocks/machine/MachineFENSU.java @@ -17,12 +17,14 @@ import net.minecraft.tileentity.TileEntity; import net.minecraft.nbt.NBTTagCompound; import net.minecraft.client.util.ITooltipFlag; +import net.minecraft.item.EnumDyeColor; import net.minecraft.item.ItemStack; import net.minecraft.item.Item; import net.minecraft.util.EnumFacing; import net.minecraft.util.EnumHand; import net.minecraft.util.math.BlockPos; import net.minecraft.world.World; +import net.minecraftforge.oredict.OreDictionary; import net.minecraftforge.fml.common.network.internal.FMLNetworkHandler; public class MachineFENSU extends BlockDummyableMBB { @@ -92,9 +94,32 @@ public boolean onBlockActivated(World world, BlockPos pos1, IBlockState state, E if(pos == null) return false; - TileEntityMachineFENSU entity = (TileEntityMachineFENSU) world.getTileEntity(new BlockPos(pos[0], pos[1], pos[2])); - if(entity != null) - { + BlockPos corePos = new BlockPos(pos[0], pos[1], pos[2]); + TileEntityMachineFENSU entity = (TileEntityMachineFENSU) world.getTileEntity(corePos); + if(entity != null) { + if(!player.getHeldItem(hand).isEmpty()){ + + int[] ores = OreDictionary.getOreIDs(player.getHeldItem(hand)); + for(int ore : ores){ + String name = OreDictionary.getOreName(ore); + //Why are these ones named differently + if(name.equals("dyeLightBlue")) + name = "dyeLight_Blue"; + if(name.equals("dyeLightGray")) + name = "dyeSilver"; + if(name.length() > 3 && name.startsWith("dye")){ + try { + EnumDyeColor color = EnumDyeColor.valueOf(name.substring(3, name.length()).toUpperCase()); + entity.color = color; + entity.markDirty(); + world.notifyBlockUpdate(corePos, state, state, 2 | 4); + if(!player.isCreative()) + player.getHeldItem(hand).shrink(1); + return true; + } catch(IllegalArgumentException e){} + } + } + } FMLNetworkHandler.openGui(player, MainRegistry.instance, ModBlocks.guiID_machine_battery, world, pos[0], pos[1], pos[2]); } return true; @@ -163,6 +188,7 @@ public int getComparatorInputOverride(IBlockState blockState, World worldIn, Blo @Override public void addInformation(ItemStack stack, World worldIn, List list, ITooltipFlag flagIn) { super.addInformation(stack, worldIn, list, flagIn); + list.add("Change color using dyes"); long charge = 0L; if(stack.hasTagCompound()){ NBTTagCompound nbt = stack.getTagCompound(); diff --git a/src/main/java/com/hbm/handler/RadiationWorldHandler.java b/src/main/java/com/hbm/handler/RadiationWorldHandler.java index 729e9627b6..15179be516 100644 --- a/src/main/java/com/hbm/handler/RadiationWorldHandler.java +++ b/src/main/java/com/hbm/handler/RadiationWorldHandler.java @@ -91,8 +91,6 @@ public static void handleWorldDestruction(World world) { } else if(bblock instanceof BlockLeaves) { world.setBlockToAir(pos); world.scheduleBlockUpdate(pos, world.getBlockState(pos).getBlock(), 0, 2); - } else if(bblock == Blocks.BEDROCK){ - world.setBlockState(pos.add(0, 1, 0), ModBlocks.toxic_block.getDefaultState()); } } } @@ -119,62 +117,57 @@ public static void handleWorldDestruction(World world) { ChunkPos coords = randEnt.getKey(); - for(int i = 0; i < 1; i++) { + if(randEnt == null || randEnt.getValue().radiation < threshold) + return; - if(randEnt == null || randEnt.getValue().radiation < threshold) - continue; - - if(provider.chunkExists(coords.x, coords.z)) { - - for(int a = 0; a < 16; a ++) { - for(int b = 0; b < 16; b ++) { + if(provider.chunkExists(coords.x, coords.z)) { + + for(int a = 0; a < 16; a ++) { + for(int b = 0; b < 16; b ++) { + + if(world.rand.nextInt(3) != 0) + continue; + + int x = coords.getXStart() + a; + int z = coords.getZStart() + b; + int y = world.getHeight(x, z) - world.rand.nextInt(2); + BlockPos pos = new BlockPos(x, y, z); + IBlockState c = world.getBlockState(pos); + Block bblock = c.getBlock(); + + if(!world.isAirBlock(pos)){ + if(bblock == Blocks.GRASS) { + world.setBlockState(pos, ModBlocks.waste_earth.getDefaultState()); + + } else if(bblock == Blocks.DIRT) { + world.setBlockState(pos, ModBlocks.waste_dirt.getDefaultState()); + + } else if(bblock == Blocks.SAND) { + BlockSand.EnumType meta = c.getValue(BlockSand.VARIANT); + if(world.rand.nextInt(60) == 0) { + world.setBlockState(pos, meta == BlockSand.EnumType.SAND ? ModBlocks.waste_trinitite.getDefaultState() : ModBlocks.waste_trinitite_red.getDefaultState()); + } else { + world.setBlockState(pos, meta == BlockSand.EnumType.SAND ? ModBlocks.waste_sand.getDefaultState() : ModBlocks.waste_sand_red.getDefaultState()); + } + } else if(bblock == Blocks.GRAVEL) { + world.setBlockState(pos, ModBlocks.waste_gravel.getDefaultState()); - if(world.rand.nextInt(3) != 0) - continue; + } else if(bblock == Blocks.MYCELIUM) { + world.setBlockState(pos, ModBlocks.waste_mycelium.getDefaultState()); - int x = coords.getXStart() + a; - int z = coords.getZStart() + b; - int y = world.getHeight(x, z) - world.rand.nextInt(2); - BlockPos pos = new BlockPos(x, y, z); - IBlockState c = world.getBlockState(pos); - Block bblock = c.getBlock(); + } else if(bblock == Blocks.SNOW_LAYER) { + world.setBlockState(pos, ModBlocks.fallout.getDefaultState()); - if(!world.isAirBlock(pos)){ - if(bblock == Blocks.GRASS) { - world.setBlockState(pos, ModBlocks.waste_earth.getDefaultState()); - - } else if(bblock == Blocks.DIRT) { - world.setBlockState(pos, ModBlocks.waste_dirt.getDefaultState()); + } else if(bblock == Blocks.SNOW) { + world.setBlockState(pos, ModBlocks.block_fallout.getDefaultState()); - } else if(bblock == Blocks.SAND) { - BlockSand.EnumType meta = c.getValue(BlockSand.VARIANT); - if(world.rand.nextInt(60) == 0) { - world.setBlockState(pos, meta == BlockSand.EnumType.SAND ? ModBlocks.waste_trinitite.getDefaultState() : ModBlocks.waste_trinitite_red.getDefaultState()); - } else { - world.setBlockState(pos, meta == BlockSand.EnumType.SAND ? ModBlocks.waste_sand.getDefaultState() : ModBlocks.waste_sand_red.getDefaultState()); - } - } else if(bblock == Blocks.GRAVEL) { - world.setBlockState(pos, ModBlocks.waste_gravel.getDefaultState()); - - } else if(bblock == Blocks.MYCELIUM) { - world.setBlockState(pos, ModBlocks.waste_mycelium.getDefaultState()); - - } else if(bblock == Blocks.SNOW_LAYER) { - world.setBlockState(pos, ModBlocks.fallout.getDefaultState()); - - } else if(bblock == Blocks.SNOW) { - world.setBlockState(pos, ModBlocks.block_fallout.getDefaultState()); - - } else if(bblock instanceof BlockBush) { - world.setBlockState(pos, ModBlocks.waste_grass_tall.getDefaultState()); - - } else if(bblock instanceof BlockLeaves) { - world.setBlockToAir(pos); - world.scheduleBlockUpdate(pos, world.getBlockState(pos).getBlock(), 0, 2); - } else if(bblock == Blocks.BEDROCK){ - world.setBlockState(pos.add(0, 1, 0), ModBlocks.toxic_block.getDefaultState()); - } + } else if(bblock instanceof BlockBush) { + world.setBlockState(pos, ModBlocks.waste_grass_tall.getDefaultState()); + + } else if(bblock instanceof BlockLeaves) { + world.setBlockToAir(pos); + world.scheduleBlockUpdate(pos, world.getBlockState(pos).getBlock(), 0, 2); } } } diff --git a/src/main/java/com/hbm/items/tool/ItemGeigerCounter.java b/src/main/java/com/hbm/items/tool/ItemGeigerCounter.java index 23ddce5cf8..d51ee15dca 100644 --- a/src/main/java/com/hbm/items/tool/ItemGeigerCounter.java +++ b/src/main/java/com/hbm/items/tool/ItemGeigerCounter.java @@ -54,7 +54,7 @@ public void onUpdate(ItemStack stack, World world, Entity entity, int itemSlot, double x = ContaminationUtil.getActualPlayerRads((EntityPlayer)entity); if(world.getTotalWorldTime() % 5 == 0) { - + if(x > 0.001) { List list = new ArrayList(); @@ -84,17 +84,18 @@ public void onUpdate(ItemStack stack, World world, Entity entity, int itemSlot, } if(240 < x && x < 640){ list.add(7); - } else { + } + if(480 < x){ list.add(8); } - if(list.size() > 0){ int r = list.get(rand.nextInt(list.size())); - if(r > 0) + if(r > 0){ world.playSound(null, entity.posX, entity.posY, entity.posZ, HBMSoundHandler.geigerSounds[r-1], SoundCategory.PLAYERS, 1.0F, 1.0F); + } } - } else if(rand.nextInt(50) == 0) { + } else if(rand.nextInt(100) == 0) { world.playSound(null, entity.posX, entity.posY, entity.posZ, HBMSoundHandler.geigerSounds[(rand.nextInt(1))], SoundCategory.PLAYERS, 1.0F, 1.0F); } } diff --git a/src/main/java/com/hbm/lib/RefStrings.java b/src/main/java/com/hbm/lib/RefStrings.java index 228cc05024..9b936a7b0d 100644 --- a/src/main/java/com/hbm/lib/RefStrings.java +++ b/src/main/java/com/hbm/lib/RefStrings.java @@ -3,8 +3,8 @@ public class RefStrings { public static final String MODID = "hbm"; public static final String NAME = "Hbm's Nuclear Tech - Extended Edition"; - public static final String VERSION = "NTM-Extended-1.12.2-1.9.3-c"; - public static final String CHANGELOG = "§8§lPotion and Contamination update$§2Added Inventory contamination$§2Added WasteSand and WasteGravel$§2Added Potions with NTM Effects$§2Added Digamma Diagnostic Gui$§2Added Tooltip info to armor mods$§2Added Clay recipe$§2Added Suger, Gunpowder, Redstone, Glowstone textures$§2Added Waterbreathing to Armors$§3Changed Rad values of debris$§3Changed Gluon Gun to double dmg every 2s on target$§3Changed size of rbmk blowup effect particle$§3Changed paa recipes and textures$§3Changed hazmat stats$§3Changed Mirvs to split at the highest point and split less extreme$§aUpdated the Teleporter$§aUpdated Tab Icons like in 1.7.10$§6Fixed Jetpacks ignoring keybings$§6Fixed some Gas block lagg$§6Fixed Digamma Debris ticking$§6Fixed nuke flash$§6Fixed geiger counter sounds$§6Fixed polish translation by Taboret$§6Fixed Fallout to be like snow$§6Fixed Chemplant Wood OreDict Recipe$§6Fixed Fracking Solution Drain$§6Fixed Corium in Meteor Dungeon"; + public static final String VERSION = "NTM-Extended-1.12.2-1.9.3-d"; + public static final String CHANGELOG = "$§2Added Colorable FEnSU$§3Changed Crystalizer texture$§3Changed Vortex Gun texture$§6Fixed Sellaline Bedrock Flood$§6Fixed Geiger Sounds"; //HBM's Beta Naming Convention: //V T (X) //V -> next release version diff --git a/src/main/java/com/hbm/main/ResourceManager.java b/src/main/java/com/hbm/main/ResourceManager.java index 348ec6469e..6bb0485333 100644 --- a/src/main/java/com/hbm/main/ResourceManager.java +++ b/src/main/java/com/hbm/main/ResourceManager.java @@ -473,7 +473,24 @@ public class ResourceManager { public static final ResourceLocation iter_torus_vaporwave = new ResourceLocation(RefStrings.MODID, "textures/models/iter/torus_vaporwave.png"); //FENSU - public static final ResourceLocation fensu_tex = new ResourceLocation(RefStrings.MODID, "textures/models/machines/fensu.png"); + public static final ResourceLocation[] fensu_tex = new ResourceLocation[] { + new ResourceLocation(RefStrings.MODID, "textures/models/machines/fensus/fensu_white.png"), + new ResourceLocation(RefStrings.MODID, "textures/models/machines/fensus/fensu_orange.png"), + new ResourceLocation(RefStrings.MODID, "textures/models/machines/fensus/fensu_magenta.png"), + new ResourceLocation(RefStrings.MODID, "textures/models/machines/fensus/fensu_light_blue.png"), + new ResourceLocation(RefStrings.MODID, "textures/models/machines/fensus/fensu_yellow.png"), + new ResourceLocation(RefStrings.MODID, "textures/models/machines/fensus/fensu_lime.png"), + new ResourceLocation(RefStrings.MODID, "textures/models/machines/fensus/fensu_pink.png"), + new ResourceLocation(RefStrings.MODID, "textures/models/machines/fensus/fensu_gray.png"), + new ResourceLocation(RefStrings.MODID, "textures/models/machines/fensus/fensu_light_gray.png"), + new ResourceLocation(RefStrings.MODID, "textures/models/machines/fensus/fensu_cyan.png"), + new ResourceLocation(RefStrings.MODID, "textures/models/machines/fensus/fensu_purple.png"), + new ResourceLocation(RefStrings.MODID, "textures/models/machines/fensus/fensu_blue.png"), + new ResourceLocation(RefStrings.MODID, "textures/models/machines/fensus/fensu_brown.png"), + new ResourceLocation(RefStrings.MODID, "textures/models/machines/fensus/fensu_green.png"), + new ResourceLocation(RefStrings.MODID, "textures/models/machines/fensus/fensu_red.png"), + new ResourceLocation(RefStrings.MODID, "textures/models/machines/fensus/fensu_black.png") + }; public static final ResourceLocation jshotgun_tex = new ResourceLocation(RefStrings.MODID, "textures/models/jade_shotgun.png"); public static final ResourceLocation jshotgun_lmap = new ResourceLocation(RefStrings.MODID, "textures/models/jade_shotgun_lmap.png"); diff --git a/src/main/java/com/hbm/render/item/ItemRenderLibrary.java b/src/main/java/com/hbm/render/item/ItemRenderLibrary.java index 48fdece149..b3efacc3fe 100644 --- a/src/main/java/com/hbm/render/item/ItemRenderLibrary.java +++ b/src/main/java/com/hbm/render/item/ItemRenderLibrary.java @@ -228,7 +228,9 @@ public void renderInventory() { } public void renderCommon() { GlStateManager.shadeModel(GL11.GL_SMOOTH); - bindTexture(ResourceManager.fensu_tex); ResourceManager.fensu.renderPart("Base"); ResourceManager.fensu.renderPart("Disc"); + bindTexture(ResourceManager.fensu_tex[3]); + ResourceManager.fensu.renderPart("Base"); + ResourceManager.fensu.renderPart("Disc"); GL11.glPushAttrib(GL11.GL_LIGHTING_BIT); GL11.glDisable(GL11.GL_LIGHTING); GlStateManager.disableCull(); diff --git a/src/main/java/com/hbm/render/misc/RenderScreenOverlay.java b/src/main/java/com/hbm/render/misc/RenderScreenOverlay.java index c332be48c8..7700fe4cae 100644 --- a/src/main/java/com/hbm/render/misc/RenderScreenOverlay.java +++ b/src/main/java/com/hbm/render/misc/RenderScreenOverlay.java @@ -81,7 +81,7 @@ public static void renderRadCounter(ScaledResolution resolution, float in, Gui g if(radiation > 1000) { Minecraft.getMinecraft().fontRenderer.drawString(">1000 RAD/s", posX, posY - 8, 0x00FF00); } else if(radiation >= 1) { - Minecraft.getMinecraft().fontRenderer.drawString(((int)Math.round(radiation)) + " RAD/s", posX, posY - 8, 0xFF0000); + Minecraft.getMinecraft().fontRenderer.drawString(((int)Math.round(radiation)) + " RAD/s", posX, posY - 8, 0xFFFF00); } else if(radiation > 0) { Minecraft.getMinecraft().fontRenderer.drawString("<1 RAD/s", posX, posY - 8, 0x00FF00); } @@ -140,11 +140,11 @@ public static void renderDigCounter(ScaledResolution resolution, float in, Gui g } if(digamma > 0.1) { - Minecraft.getMinecraft().fontRenderer.drawString(">100 mDRX/s", posX, posY - 8, 0xFF0000); + Minecraft.getMinecraft().fontRenderer.drawString(">100 mDRX/s", posX, posY - 8, 0xCC0000); } else if(digamma >= 0.01) { Minecraft.getMinecraft().fontRenderer.drawString(((int)Math.round(digamma*1000D)) + " mDRX/s", posX, posY - 8, 0xFF0000); } else if(digamma > 0) { - Minecraft.getMinecraft().fontRenderer.drawString("<10 mDRX/s", posX, posY - 8, 0xFF0000); + Minecraft.getMinecraft().fontRenderer.drawString("<10 mDRX/s", posX, posY - 8, 0xFF3232); } GlStateManager.enableDepth(); diff --git a/src/main/java/com/hbm/render/tileentity/RenderFENSU.java b/src/main/java/com/hbm/render/tileentity/RenderFENSU.java index b56eed8de4..9a279647d5 100644 --- a/src/main/java/com/hbm/render/tileentity/RenderFENSU.java +++ b/src/main/java/com/hbm/render/tileentity/RenderFENSU.java @@ -29,10 +29,11 @@ public void render(TileEntityMachineFENSU te, double x, double y, double z, floa case 5: GL11.glRotatef(0, 0F, 1F, 0F); break; } - bindTexture(ResourceManager.fensu_tex); - ResourceManager.fensu.renderPart("Base"); + TileEntityMachineFENSU fensu = (TileEntityMachineFENSU)te; + bindTexture(ResourceManager.fensu_tex[fensu.color.getMetadata()]); + ResourceManager.fensu.renderPart("Base"); float rot = fensu.prevRotation + (fensu.rotation - fensu.prevRotation) * partialTicks; GL11.glTranslated(0, 2.5, 0); diff --git a/src/main/java/com/hbm/render/tileentity/RenderSpinnyLight.java b/src/main/java/com/hbm/render/tileentity/RenderSpinnyLight.java index a9c613ce22..717cf4d922 100644 --- a/src/main/java/com/hbm/render/tileentity/RenderSpinnyLight.java +++ b/src/main/java/com/hbm/render/tileentity/RenderSpinnyLight.java @@ -116,23 +116,23 @@ private static int generateConeMesh(float length, float radius, int sides, float vertices[(i+1)*3+2] = (float) vertex.zCoord+oZ; } - Tessellator tes = Tessellator.getInstance(); - BufferBuilder buf = tes.getBuffer(); - buf.begin(GL11.GL_TRIANGLES, DefaultVertexFormats.POSITION_COLOR); - float alpha = 0.65F; - for(int m = -1; m <= 1; m += 2){ - for(int i = 2; i <= sides; i ++){ - buf.pos(vertices[0], vertices[1], vertices[2]).color(r, g, b, alpha).endVertex(); - buf.pos(vertices[(i-1)*3]*m, vertices[(i-1)*3+1], vertices[(i-1)*3+2]).color(r, g, b, 0).endVertex(); - buf.pos(vertices[i*3]*m, vertices[i*3+1], vertices[i*3+2]).color(r, g, b, 0).endVertex(); - } - buf.pos(vertices[0], vertices[1], vertices[2]).color(r, g, b, alpha).endVertex(); - buf.pos(vertices[sides*3]*m, vertices[sides*3+1], vertices[sides*3+2]).color(r, g, b, 0).endVertex(); - buf.pos(vertices[1*3]*m, vertices[1*3+1], vertices[1*3+2]).color(r, g, b, 0).endVertex(); - } - tes.draw(); - - GL11.glEndList(); - return list; + Tessellator tes = Tessellator.getInstance(); + BufferBuilder buf = tes.getBuffer(); + buf.begin(GL11.GL_TRIANGLES, DefaultVertexFormats.POSITION_COLOR); + float alpha = 0.65F; + for(int m = -1; m <= 1; m += 2){ + for(int i = 2; i <= sides; i ++){ + buf.pos(vertices[0], vertices[1], vertices[2]).color(r, g, b, alpha).endVertex(); + buf.pos(vertices[(i-1)*3]*m, vertices[(i-1)*3+1], vertices[(i-1)*3+2]).color(r, g, b, 0).endVertex(); + buf.pos(vertices[i*3]*m, vertices[i*3+1], vertices[i*3+2]).color(r, g, b, 0).endVertex(); + } + buf.pos(vertices[0], vertices[1], vertices[2]).color(r, g, b, alpha).endVertex(); + buf.pos(vertices[sides*3]*m, vertices[sides*3+1], vertices[sides*3+2]).color(r, g, b, 0).endVertex(); + buf.pos(vertices[1*3]*m, vertices[1*3+1], vertices[1*3+2]).color(r, g, b, 0).endVertex(); + } + tes.draw(); + + GL11.glEndList(); + return list; } } diff --git a/src/main/java/com/hbm/tileentity/deco/TileEntityGeysir.java b/src/main/java/com/hbm/tileentity/deco/TileEntityGeysir.java index 0713f49612..4feaada17c 100644 --- a/src/main/java/com/hbm/tileentity/deco/TileEntityGeysir.java +++ b/src/main/java/com/hbm/tileentity/deco/TileEntityGeysir.java @@ -28,7 +28,7 @@ public class TileEntityGeysir extends TileEntity implements ITickable { @Override public void update() { - if (!this.world.isRemote && world.getBlockState(pos.up()).getBlock() == Blocks.AIR) { + if (!this.world.isRemote && world.isAirBlock(pos.up())) { timer--; IBlockState state = world.getBlockState(pos); diff --git a/src/main/java/com/hbm/tileentity/machine/TileEntityMachineFENSU.java b/src/main/java/com/hbm/tileentity/machine/TileEntityMachineFENSU.java index e5fbf6fdd4..ee9bb72bb7 100644 --- a/src/main/java/com/hbm/tileentity/machine/TileEntityMachineFENSU.java +++ b/src/main/java/com/hbm/tileentity/machine/TileEntityMachineFENSU.java @@ -2,6 +2,7 @@ import com.hbm.lib.Library; +import net.minecraft.item.EnumDyeColor; import net.minecraft.nbt.NBTTagCompound; import net.minecraft.tileentity.TileEntity; import net.minecraft.util.math.AxisAlignedBB; @@ -10,12 +11,14 @@ public class TileEntityMachineFENSU extends TileEntityMachineBattery { + public EnumDyeColor color = EnumDyeColor.LIGHT_BLUE; + public float prevRotation = 0F; public float rotation = 0F; @Override public void update() { - + this.maxPower = Long.MAX_VALUE; if(!world.isRemote) { @@ -52,6 +55,7 @@ public void update() { nbt.setLong("maxPower", maxPower); nbt.setShort("redLow", redLow); nbt.setShort("redHigh", redHigh); + nbt.setByte("color", (byte) this.color.getMetadata()); this.networkPack(nbt, 250); this.detectAndSendChanges(); @@ -85,8 +89,25 @@ public AxisAlignedBB getRenderBoundingBox() { @Override @SideOnly(Side.CLIENT) - public double getMaxRenderDistanceSquared() - { + public double getMaxRenderDistanceSquared() { return 65536.0D; } + + @Override + public void networkUnpack(NBTTagCompound nbt) { + this.color = EnumDyeColor.byMetadata(nbt.getByte("color")); + super.networkUnpack(nbt); + } + + @Override + public void readFromNBT(NBTTagCompound compound) { + this.color = EnumDyeColor.byMetadata(compound.getByte("color")); + super.readFromNBT(compound); + } + + @Override + public NBTTagCompound writeToNBT(NBTTagCompound compound) { + compound.setByte("color", (byte) this.color.getMetadata()); + return super.writeToNBT(compound); + } } \ No newline at end of file diff --git a/src/main/resources/assets/hbm/textures/models/machines/crystallizer.png b/src/main/resources/assets/hbm/textures/models/machines/crystallizer.png index 82963770bd..0c9998a93e 100644 Binary files a/src/main/resources/assets/hbm/textures/models/machines/crystallizer.png and b/src/main/resources/assets/hbm/textures/models/machines/crystallizer.png differ diff --git a/src/main/resources/assets/hbm/textures/models/machines/fensu.png b/src/main/resources/assets/hbm/textures/models/machines/fensu.png deleted file mode 100644 index bb6c711b99..0000000000 Binary files a/src/main/resources/assets/hbm/textures/models/machines/fensu.png and /dev/null differ diff --git a/src/main/resources/assets/hbm/textures/models/machines/fensu_e.png b/src/main/resources/assets/hbm/textures/models/machines/fensu_e.png deleted file mode 100644 index 6ac4ccadc4..0000000000 Binary files a/src/main/resources/assets/hbm/textures/models/machines/fensu_e.png and /dev/null differ diff --git a/src/main/resources/assets/hbm/textures/models/machines/fensus/fensu_black.png b/src/main/resources/assets/hbm/textures/models/machines/fensus/fensu_black.png new file mode 100644 index 0000000000..c311ec22b7 Binary files /dev/null and b/src/main/resources/assets/hbm/textures/models/machines/fensus/fensu_black.png differ diff --git a/src/main/resources/assets/hbm/textures/models/machines/fensus/fensu_blue.png b/src/main/resources/assets/hbm/textures/models/machines/fensus/fensu_blue.png new file mode 100644 index 0000000000..f40a762569 Binary files /dev/null and b/src/main/resources/assets/hbm/textures/models/machines/fensus/fensu_blue.png differ diff --git a/src/main/resources/assets/hbm/textures/models/machines/fensus/fensu_brown.png b/src/main/resources/assets/hbm/textures/models/machines/fensus/fensu_brown.png new file mode 100644 index 0000000000..ab7f7ea61a Binary files /dev/null and b/src/main/resources/assets/hbm/textures/models/machines/fensus/fensu_brown.png differ diff --git a/src/main/resources/assets/hbm/textures/models/machines/fensus/fensu_cyan.png b/src/main/resources/assets/hbm/textures/models/machines/fensus/fensu_cyan.png new file mode 100644 index 0000000000..5906458ed4 Binary files /dev/null and b/src/main/resources/assets/hbm/textures/models/machines/fensus/fensu_cyan.png differ diff --git a/src/main/resources/assets/hbm/textures/models/machines/fensus/fensu_gray.png b/src/main/resources/assets/hbm/textures/models/machines/fensus/fensu_gray.png new file mode 100644 index 0000000000..fbe9987f8d Binary files /dev/null and b/src/main/resources/assets/hbm/textures/models/machines/fensus/fensu_gray.png differ diff --git a/src/main/resources/assets/hbm/textures/models/machines/fensus/fensu_green.png b/src/main/resources/assets/hbm/textures/models/machines/fensus/fensu_green.png new file mode 100644 index 0000000000..8f5be6356a Binary files /dev/null and b/src/main/resources/assets/hbm/textures/models/machines/fensus/fensu_green.png differ diff --git a/src/main/resources/assets/hbm/textures/models/machines/fensus/fensu_light_blue.png b/src/main/resources/assets/hbm/textures/models/machines/fensus/fensu_light_blue.png new file mode 100644 index 0000000000..a593253bb2 Binary files /dev/null and b/src/main/resources/assets/hbm/textures/models/machines/fensus/fensu_light_blue.png differ diff --git a/src/main/resources/assets/hbm/textures/models/machines/fensus/fensu_light_gray.png b/src/main/resources/assets/hbm/textures/models/machines/fensus/fensu_light_gray.png new file mode 100644 index 0000000000..2a20ab5891 Binary files /dev/null and b/src/main/resources/assets/hbm/textures/models/machines/fensus/fensu_light_gray.png differ diff --git a/src/main/resources/assets/hbm/textures/models/machines/fensus/fensu_lime.png b/src/main/resources/assets/hbm/textures/models/machines/fensus/fensu_lime.png new file mode 100644 index 0000000000..d237e54a88 Binary files /dev/null and b/src/main/resources/assets/hbm/textures/models/machines/fensus/fensu_lime.png differ diff --git a/src/main/resources/assets/hbm/textures/models/machines/fensus/fensu_magenta.png b/src/main/resources/assets/hbm/textures/models/machines/fensus/fensu_magenta.png new file mode 100644 index 0000000000..e40350262a Binary files /dev/null and b/src/main/resources/assets/hbm/textures/models/machines/fensus/fensu_magenta.png differ diff --git a/src/main/resources/assets/hbm/textures/models/machines/fensus/fensu_orange.png b/src/main/resources/assets/hbm/textures/models/machines/fensus/fensu_orange.png new file mode 100644 index 0000000000..6013eb3c56 Binary files /dev/null and b/src/main/resources/assets/hbm/textures/models/machines/fensus/fensu_orange.png differ diff --git a/src/main/resources/assets/hbm/textures/models/machines/fensus/fensu_pink.png b/src/main/resources/assets/hbm/textures/models/machines/fensus/fensu_pink.png new file mode 100644 index 0000000000..6e499ad2b7 Binary files /dev/null and b/src/main/resources/assets/hbm/textures/models/machines/fensus/fensu_pink.png differ diff --git a/src/main/resources/assets/hbm/textures/models/machines/fensus/fensu_purple.png b/src/main/resources/assets/hbm/textures/models/machines/fensus/fensu_purple.png new file mode 100644 index 0000000000..dfec106aa8 Binary files /dev/null and b/src/main/resources/assets/hbm/textures/models/machines/fensus/fensu_purple.png differ diff --git a/src/main/resources/assets/hbm/textures/models/machines/fensus/fensu_red.png b/src/main/resources/assets/hbm/textures/models/machines/fensus/fensu_red.png new file mode 100644 index 0000000000..94c4490acb Binary files /dev/null and b/src/main/resources/assets/hbm/textures/models/machines/fensus/fensu_red.png differ diff --git a/src/main/resources/assets/hbm/textures/models/machines/fensus/fensu_white.png b/src/main/resources/assets/hbm/textures/models/machines/fensus/fensu_white.png new file mode 100644 index 0000000000..457190fff2 Binary files /dev/null and b/src/main/resources/assets/hbm/textures/models/machines/fensus/fensu_white.png differ diff --git a/src/main/resources/assets/hbm/textures/models/machines/fensus/fensu_yellow.png b/src/main/resources/assets/hbm/textures/models/machines/fensus/fensu_yellow.png new file mode 100644 index 0000000000..866d1d3fce Binary files /dev/null and b/src/main/resources/assets/hbm/textures/models/machines/fensus/fensu_yellow.png differ diff --git a/src/main/resources/assets/hbm/textures/models/weapons/vortex.png b/src/main/resources/assets/hbm/textures/models/weapons/vortex.png index 81e9c1cadf..40ffa402e0 100644 Binary files a/src/main/resources/assets/hbm/textures/models/weapons/vortex.png and b/src/main/resources/assets/hbm/textures/models/weapons/vortex.png differ