diff --git a/.DS_Store b/.DS_Store deleted file mode 100644 index fdb19e0b..00000000 Binary files a/.DS_Store and /dev/null differ diff --git a/1.11/To-Dos b/1.11/To-Dos index 1e47aca1..718f6560 100644 --- a/1.11/To-Dos +++ b/1.11/To-Dos @@ -1,8 +1,8 @@ To-Dos -- [ ] Fix Firebox model to have more of a bowl shape and have the air inlet on the left +- [x] Fix Firebox model to have more of a bowl shape - [x] Redo piston bellows if statements to match the new directional (should match the same directions) -- [ ] Fix PistonBellows Bounding Boxes to match the direction +- [X] Fix PistonBellows Bounding Boxes to match the direction - [ ] Crucible - [ ] Model diff --git a/1.11/gradle.properties b/1.11/gradle.properties index cea55cbd..67310667 100644 --- a/1.11/gradle.properties +++ b/1.11/gradle.properties @@ -5,7 +5,7 @@ org.gradle.jvmargs=-Xmx3G mod_group=nmd.primal.forgecraft mod_name=ForgeCraft -mod_version=1.0.1 +mod_version=1.0.4 forge_version=13.19.1.2189 mcp_mappings=snapshot_20161130 mc_version=1.11 diff --git a/1.11/src/main/java/nmd/primal/forgecraft/blocks/Firebox.java b/1.11/src/main/java/nmd/primal/forgecraft/blocks/Firebox.java index 93310ec4..787fcbc1 100644 --- a/1.11/src/main/java/nmd/primal/forgecraft/blocks/Firebox.java +++ b/1.11/src/main/java/nmd/primal/forgecraft/blocks/Firebox.java @@ -406,7 +406,7 @@ public class Firebox extends CustomContainerFacing implements ITileEntityProvide if(state.getValue(Firebox.ACTIVE) == true) { double d0 = (double)pos.getX() + 0.5D; - double d1 = (double)pos.getY() + 0.65D; + double d1 = (double)pos.getY() + 0.96D; double d2 = (double)pos.getZ() + 0.5D; double d3 = 0.52D; double d4 = rand.nextDouble() * 0.6D - 0.3D; diff --git a/1.11/src/main/java/nmd/primal/forgecraft/blocks/PistonBellows.java b/1.11/src/main/java/nmd/primal/forgecraft/blocks/PistonBellows.java index ced0a5a3..12f40073 100644 --- a/1.11/src/main/java/nmd/primal/forgecraft/blocks/PistonBellows.java +++ b/1.11/src/main/java/nmd/primal/forgecraft/blocks/PistonBellows.java @@ -39,7 +39,10 @@ public class PistonBellows extends CustomContainerFacing { public static final PropertyBool ACTIVE = PropertyBool.create("active"); //protected static final AxisAlignedBB collideBox = new AxisAlignedBB(0.0D, 0.0D, 0.0D, 1.0D, 0.99D, 1.0D); - protected static final AxisAlignedBB boundBox = new AxisAlignedBB(0.1875D, 0.0D, 0.0D, 1.0D, 12 / 16D, 1.0D); + protected static final AxisAlignedBB boundBoxNorth = new AxisAlignedBB(0.1875D, 0.0D, 0.0D, 1.0D, 12 / 16D, 1.0D); + protected static final AxisAlignedBB boundBoxSouth = new AxisAlignedBB(0.0D, 0.0D, 0.0D, 0.8125D, 12 / 16D, 1.0D); + protected static final AxisAlignedBB boundBoxEast = new AxisAlignedBB(0.0D, 0.0D, 0.1875D, 1.0D, 12 / 16D, 1.0D); + protected static final AxisAlignedBB boundBoxWest = new AxisAlignedBB(0.0D, 0.0D, 0.0D, 1.0D, 12 / 16D, 0.8125D); public PistonBellows(Material material) { super(material); @@ -136,48 +139,6 @@ public class PistonBellows extends CustomContainerFacing { } } } - /*if(world.isRemote){ - if(state.getValue(PistonBellows.FACING) == EnumFacing.NORTH) { - BlockPos tempPos = new BlockPos(pos.getX() + 1, pos.getY(), pos.getZ()); - if(world.getBlockState(tempPos).getBlock() == ModBlocks.firebox){ - TileFirebox tile = (TileFirebox) world.getTileEntity(tempPos); - if((world.getBlockState(tempPos).getValue(Firebox.ACTIVE) == true) && (world.getBlockState(tempPos).getValue(Firebox.FACING) == EnumFacing.EAST)){ - makeEmbers(world, tempPos, world.rand); - } - } - - } - if(state.getValue(PistonBellows.FACING) == EnumFacing.SOUTH) { - BlockPos tempPos = new BlockPos(pos.getX() - 1, pos.getY(), pos.getZ()); - if(world.getBlockState(tempPos).getBlock() == ModBlocks.firebox){ - TileFirebox tile = (TileFirebox) world.getTileEntity(tempPos); - if((world.getBlockState(tempPos).getValue(Firebox.ACTIVE) == true) && (world.getBlockState(tempPos).getValue(Firebox.FACING) == EnumFacing.WEST)){ - makeEmbers(world, tempPos, world.rand); - } - } - - } - if(state.getValue(PistonBellows.FACING) == EnumFacing.EAST) { - BlockPos tempPos = new BlockPos(pos.getX(), pos.getY(), pos.getZ() + 1); - if(world.getBlockState(tempPos).getBlock() == ModBlocks.firebox){ - TileFirebox tile = (TileFirebox) world.getTileEntity(tempPos); - if((world.getBlockState(tempPos).getValue(Firebox.ACTIVE) == true) && (world.getBlockState(tempPos).getValue(Firebox.FACING) == EnumFacing.SOUTH)){ - makeEmbers(world, tempPos, world.rand); - } - } - - } - if(state.getValue(PistonBellows.FACING) == EnumFacing.WEST) { - BlockPos tempPos = new BlockPos(pos.getX(), pos.getY(), pos.getZ() - 1); - if(world.getBlockState(tempPos).getBlock() == ModBlocks.firebox){ - TileFirebox tile = (TileFirebox) world.getTileEntity(tempPos); - if((world.getBlockState(tempPos).getValue(Firebox.ACTIVE) == true) && (world.getBlockState(tempPos).getValue(Firebox.FACING) == EnumFacing.NORTH)){ - makeEmbers(world, tempPos, world.rand); - } - } - - } - }*/ return true; } @@ -187,7 +148,21 @@ public class PistonBellows extends CustomContainerFacing { @Override public AxisAlignedBB getBoundingBox(IBlockState state, IBlockAccess source, BlockPos pos) { - return boundBox; + state = state.getActualState(source, pos); + EnumFacing enumfacing = (EnumFacing)state.getValue(FACING); + + switch (enumfacing) + { + case EAST: + default: + return boundBoxEast; + case SOUTH: + return boundBoxSouth; + case WEST: + return boundBoxWest; + case NORTH: + return boundBoxNorth; + } } @Override @@ -389,7 +364,7 @@ public class PistonBellows extends CustomContainerFacing { } private void makeEmbers(World world, BlockPos pos, Random rand){ double d0 = (double)pos.getX() + 0.5D; - double d1 = (double)pos.getY() + 0.65D; + double d1 = (double)pos.getY() + 0.96D; double d2 = (double)pos.getZ() + 0.5D; double d3 = 0.52D; double d4 = rand.nextDouble() * 0.6D - 0.3D; diff --git a/1.11/src/main/java/nmd/primal/forgecraft/init/ModCrafting.java b/1.11/src/main/java/nmd/primal/forgecraft/init/ModCrafting.java index 5cbd8c0d..e7553efd 100644 --- a/1.11/src/main/java/nmd/primal/forgecraft/init/ModCrafting.java +++ b/1.11/src/main/java/nmd/primal/forgecraft/init/ModCrafting.java @@ -12,6 +12,11 @@ import net.minecraftforge.fml.common.registry.GameRegistry; public class ModCrafting { public static void register() { + /***Firebox***/ GameRegistry.addShapedRecipe(new ItemStack(ModBlocks.firebox), "X X", "XYX", "X X", 'X', Items.BRICK, 'Y', Blocks.FURNACE); + + /***Wooden PistonBellows***/ + GameRegistry.addShapedRecipe(new ItemStack(ModBlocks.pistonbellows), "XXX", "X Y", "XXX", 'X', Blocks.PLANKS, 'Y', ModItems.pistonbellows); + GameRegistry.addShapedRecipe(new ItemStack(ModItems.pistonbellows), "X X", "X X", " X ", 'X', Items.STICK); } } diff --git a/1.11/src/main/java/nmd/primal/forgecraft/renders/TileFireboxRender.java b/1.11/src/main/java/nmd/primal/forgecraft/renders/TileFireboxRender.java index dae306ba..6d6527aa 100644 --- a/1.11/src/main/java/nmd/primal/forgecraft/renders/TileFireboxRender.java +++ b/1.11/src/main/java/nmd/primal/forgecraft/renders/TileFireboxRender.java @@ -39,8 +39,8 @@ public class TileFireboxRender extends TileEntitySpecialRenderer public void renderTileEntityAt(TileFirebox tile, double x, double y, double z, float partialTicks, int destroyStage) { GL11.glPushMatrix(); - GL11.glTranslated(x + 0.5D, y + 0.825D, z + 0.5D); - + GL11.glTranslated(x + 0.5D, y + 0.95D, z + 0.5D); + //GL11.glRotatef(90.0F, 0.0F, 0.0F, 1.0F); Minecraft.getMinecraft().getTextureManager().bindTexture(TextureMap.LOCATION_BLOCKS_TEXTURE); float prevLGTX = OpenGlHelper.lastBrightnessX; float prevLGTY = OpenGlHelper.lastBrightnessY; @@ -51,16 +51,22 @@ public class TileFireboxRender extends TileEntitySpecialRenderer ItemStack stack1 = tile.getSlotStack(0); boolean is_block = stack1.getItem() instanceof ItemBlock; - float scale = is_block ? 0.1725F : 0.5F; + float scale = is_block ? 0.1725F : 0.3F; double xTrans = is_block ? -1.6D : -0.45D; - double yTrans = is_block ? -1.26D : -0.25D; + double yTrans = is_block ? -1.26D : 0.75D; if (!stack1.isEmpty()) { int stackRotation = stack1.getCount(); + GL11.glPushMatrix(); + GL11.glScalef(scale, scale, scale); + GL11.glRotated(90.0F, 1.0F, 0.0F, 0.0F); + renderItem.renderItem(stack1, renderItem.getItemModelMesher().getItemModel(stack1)); + GL11.glPopMatrix(); for(int i = 0; i < Math.ceil(stackRotation/8) + 1; i++){ GL11.glPushMatrix(); GL11.glScalef(scale, scale, scale); GL11.glRotated(45.0F * i, 0.0F, 1.0F, 0.0F); + GL11.glRotated(90.0F, 1.0F, 0.0F, 0.0F); GL11.glTranslated(xTrans, yTrans, 0.0D); renderItem.renderItem(stack1, renderItem.getItemModelMesher().getItemModel(stack1)); GL11.glPopMatrix(); diff --git a/1.11/src/main/java/nmd/primal/forgecraft/renders/TilePistonBellowsRender.java b/1.11/src/main/java/nmd/primal/forgecraft/renders/TilePistonBellowsRender.java index 41faf2ab..f532c9e7 100644 --- a/1.11/src/main/java/nmd/primal/forgecraft/renders/TilePistonBellowsRender.java +++ b/1.11/src/main/java/nmd/primal/forgecraft/renders/TilePistonBellowsRender.java @@ -63,7 +63,7 @@ public class TilePistonBellowsRender extends TileEntitySpecialRenderer