updating render classes to fix bugs when breaking blocks
This commit is contained in:
@@ -4,9 +4,7 @@ To-Dos
|
||||
|
||||
|
||||
*** Priority ***
|
||||
- [ ] Bloomery not accepting raw clean crucible
|
||||
- [ ] Move Ingot break into chunks logic out of the block and into the ForgeHammer
|
||||
- [ ] Add Yew
|
||||
|
||||
|
||||
*** Feature Musket ***
|
||||
- [ ] Create powder charge item (copper, charcoal, gunpowder)
|
||||
@@ -20,6 +18,8 @@ To-Dos
|
||||
- [ ] Create lock assembly item
|
||||
|
||||
*** Backlog ***
|
||||
- [ ] Move Ingot break into chunks logic out of the block and into the ForgeHammer
|
||||
- [ ] Add Yew
|
||||
- [ ] Add Iron Ring Recipe
|
||||
- [ ] Add chainmail recipe
|
||||
- [ ] Add Iron Shield
|
||||
|
||||
@@ -5,12 +5,12 @@ org.gradle.jvmargs=-Xmx3G
|
||||
|
||||
mod_group=nmd.primal.forgecraft
|
||||
mod_name=ForgeCraft
|
||||
mod_version=1.2.21
|
||||
mod_version=1.2.22
|
||||
forge_version=13.20.0.2226
|
||||
mcp_mappings=snapshot_20161220
|
||||
mc_version=1.11.2
|
||||
|
||||
primal_version=0.3+
|
||||
primal_version=0.4+
|
||||
jei_version=4.2+
|
||||
waila_version=1.7.0-B3
|
||||
apple_version=2.1+
|
||||
@@ -16,7 +16,7 @@ public class ModInfo {
|
||||
public static final String MOD_NAME = "Kitsu's ForgeCraft";
|
||||
//public static final String MOD_PREFIX = MOD_ID + ":";
|
||||
public static final String MOD_CHANNEL = MOD_ID;
|
||||
public static final String MOD_VERSION = "1.2.21";
|
||||
public static final String MOD_VERSION = "1.2.22";
|
||||
public static final String MC_VERSIONS = "[1.11.0, 1.12.0)";
|
||||
public static final String DEPENDENCIES = "required-after:forge@[13.20.0.2226,);" + "required-after:primal@[0.3.15,);";
|
||||
|
||||
|
||||
@@ -16,6 +16,7 @@ import net.minecraft.util.math.BlockPos;
|
||||
import nmd.primal.core.api.PrimalItems;
|
||||
import nmd.primal.forgecraft.blocks.Anvil;
|
||||
import nmd.primal.forgecraft.blocks.IngotBall;
|
||||
import nmd.primal.forgecraft.init.ModBlocks;
|
||||
import nmd.primal.forgecraft.init.ModItems;
|
||||
import nmd.primal.forgecraft.items.BaseMultiItem;
|
||||
import nmd.primal.forgecraft.tiles.TileAnvil;
|
||||
@@ -36,8 +37,12 @@ public class TileAnvilRender extends TileEntitySpecialRenderer<TileAnvil>
|
||||
;
|
||||
|
||||
@Override
|
||||
public void renderTileEntityAt(TileAnvil tile, double x, double y, double z, float partialTicks, int destroyStage)
|
||||
{
|
||||
public void renderTileEntityAt(TileAnvil tile, double x, double y, double z, float partialTicks, int destroyStage) {
|
||||
|
||||
BlockPos pos = tile.getPos();
|
||||
IBlockState state = this.getWorld().getBlockState(pos);
|
||||
if (state.getBlock() instanceof Anvil) {
|
||||
|
||||
GL11.glPushMatrix();
|
||||
GL11.glTranslated(x, y + 1.5D, z);
|
||||
//GL11.glRotatef(90.0F, 0.0F, 0.0F, 1.0F);
|
||||
@@ -45,10 +50,6 @@ public class TileAnvilRender extends TileEntitySpecialRenderer<TileAnvil>
|
||||
float prevLGTX = OpenGlHelper.lastBrightnessX;
|
||||
float prevLGTY = OpenGlHelper.lastBrightnessY;
|
||||
|
||||
BlockPos pos = tile.getPos();
|
||||
IBlockState state = this.getWorld().getBlockState(pos);
|
||||
|
||||
|
||||
int bright = tile.getWorld().getCombinedLight(pos.up(), 0);
|
||||
OpenGlHelper.setLightmapTextureCoords(OpenGlHelper.lightmapTexUnit, bright % 65536, bright / 65536);
|
||||
|
||||
@@ -86,6 +87,7 @@ public class TileAnvilRender extends TileEntitySpecialRenderer<TileAnvil>
|
||||
24 | 14/16 | 14/16
|
||||
*/
|
||||
|
||||
|
||||
if (state.getValue(Anvil.FACING) == EnumFacing.NORTH) {
|
||||
int counter = 0;
|
||||
for (int i = 0; i < 5; i++) {
|
||||
@@ -454,6 +456,7 @@ public class TileAnvilRender extends TileEntitySpecialRenderer<TileAnvil>
|
||||
OpenGlHelper.setLightmapTextureCoords(OpenGlHelper.lightmapTexUnit, prevLGTX, prevLGTY);
|
||||
GL11.glPopMatrix();
|
||||
}
|
||||
}
|
||||
|
||||
private void doRendering(TileAnvil tile, Integer counter, Integer i, Integer a){
|
||||
Item item = tile.getSlotStack(counter).getItem();
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
package nmd.primal.forgecraft.renders.blocks;
|
||||
|
||||
import net.minecraft.block.state.IBlockState;
|
||||
import net.minecraft.client.Minecraft;
|
||||
import net.minecraft.client.renderer.OpenGlHelper;
|
||||
import net.minecraft.client.renderer.RenderItem;
|
||||
@@ -8,6 +9,7 @@ import net.minecraft.client.renderer.tileentity.TileEntitySpecialRenderer;
|
||||
import net.minecraft.item.ItemBlock;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.util.math.BlockPos;
|
||||
import nmd.primal.forgecraft.blocks.Bloomery;
|
||||
import nmd.primal.forgecraft.tiles.TileBloomery;
|
||||
import org.lwjgl.opengl.GL11;
|
||||
|
||||
@@ -19,15 +21,18 @@ public class TileBloomeryRender extends TileEntitySpecialRenderer<TileBloomery>
|
||||
private RenderItem renderItem = Minecraft.getMinecraft().getRenderItem();
|
||||
|
||||
@Override
|
||||
public void renderTileEntityAt(TileBloomery tile, double x, double y, double z, float partialTicks, int destroyStage)
|
||||
{
|
||||
public void renderTileEntityAt(TileBloomery tile, double x, double y, double z, float partialTicks, int destroyStage) {
|
||||
|
||||
BlockPos pos = tile.getPos();
|
||||
IBlockState state = this.getWorld().getBlockState(pos);
|
||||
if (state.getBlock() instanceof Bloomery) {
|
||||
|
||||
GL11.glPushMatrix();
|
||||
GL11.glTranslated(x + 0.5D, y + 0.0626D, 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;
|
||||
BlockPos pos = tile.getPos();
|
||||
int bright = tile.getWorld().getCombinedLight(pos.up(), 0);
|
||||
OpenGlHelper.setLightmapTextureCoords(OpenGlHelper.lightmapTexUnit, bright % 65536, bright / 65536);
|
||||
|
||||
@@ -71,3 +76,4 @@ public class TileBloomeryRender extends TileEntitySpecialRenderer<TileBloomery>
|
||||
GL11.glPopMatrix();
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -21,16 +21,18 @@ public class TileBreakerRender extends TileEntitySpecialRenderer<TileBreaker>
|
||||
private RenderItem renderItem = Minecraft.getMinecraft().getRenderItem();
|
||||
|
||||
@Override
|
||||
public void renderTileEntityAt(TileBreaker tile, double x, double y, double z, float partialTicks, int destroyStage)
|
||||
{
|
||||
public void renderTileEntityAt(TileBreaker tile, double x, double y, double z, float partialTicks, int destroyStage) {
|
||||
|
||||
BlockPos pos = tile.getPos();
|
||||
IBlockState state = this.getWorld().getBlockState(pos);
|
||||
if (state.getBlock() instanceof Breaker) {
|
||||
|
||||
GL11.glPushMatrix();
|
||||
GL11.glTranslated(x, y, z);
|
||||
GL11.glScalef(1.0f, 1.0f, 1.0f);
|
||||
Minecraft.getMinecraft().getTextureManager().bindTexture(TextureMap.LOCATION_BLOCKS_TEXTURE);
|
||||
float prevLGTX = OpenGlHelper.lastBrightnessX;
|
||||
float prevLGTY = OpenGlHelper.lastBrightnessY;
|
||||
BlockPos pos = tile.getPos();
|
||||
IBlockState state = this.getWorld().getBlockState(pos);
|
||||
int bright = tile.getWorld().getCombinedLight(pos.up(), 0);
|
||||
OpenGlHelper.setLightmapTextureCoords(OpenGlHelper.lightmapTexUnit, bright % 65536, bright / 65536);
|
||||
|
||||
@@ -100,3 +102,4 @@ public class TileBreakerRender extends TileEntitySpecialRenderer<TileBreaker>
|
||||
GL11.glPopMatrix();
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1,5 +1,6 @@
|
||||
package nmd.primal.forgecraft.renders.blocks;
|
||||
|
||||
import net.minecraft.block.state.IBlockState;
|
||||
import net.minecraft.client.Minecraft;
|
||||
import net.minecraft.client.renderer.OpenGlHelper;
|
||||
import net.minecraft.client.renderer.RenderItem;
|
||||
@@ -10,6 +11,7 @@ import net.minecraft.init.Items;
|
||||
import net.minecraft.item.ItemBlock;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.util.math.BlockPos;
|
||||
import nmd.primal.forgecraft.blocks.Forge;
|
||||
import nmd.primal.forgecraft.init.ModItems;
|
||||
import nmd.primal.forgecraft.tiles.TileForge;
|
||||
import org.lwjgl.opengl.GL11;
|
||||
@@ -22,15 +24,19 @@ public class TileForgeRender extends TileEntitySpecialRenderer<TileForge>
|
||||
private RenderItem renderItem = Minecraft.getMinecraft().getRenderItem();
|
||||
|
||||
@Override
|
||||
public void renderTileEntityAt(TileForge tile, double x, double y, double z, float partialTicks, int destroyStage)
|
||||
{
|
||||
public void renderTileEntityAt(TileForge tile, double x, double y, double z, float partialTicks, int destroyStage) {
|
||||
|
||||
BlockPos pos = tile.getPos();
|
||||
IBlockState state = this.getWorld().getBlockState(pos);
|
||||
if (state.getBlock() instanceof Forge) {
|
||||
|
||||
GL11.glPushMatrix();
|
||||
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;
|
||||
BlockPos pos = tile.getPos();
|
||||
|
||||
int bright = tile.getWorld().getCombinedLight(pos.up(), 0);
|
||||
OpenGlHelper.setLightmapTextureCoords(OpenGlHelper.lightmapTexUnit, bright % 65536, bright / 65536);
|
||||
|
||||
@@ -125,3 +131,4 @@ public class TileForgeRender extends TileEntitySpecialRenderer<TileForge>
|
||||
GL11.glPopMatrix();
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -24,16 +24,22 @@ public class TilePistonBellowsRender extends TileEntitySpecialRenderer<TilePisto
|
||||
@Override
|
||||
public void renderTileEntityAt(TilePistonBellows tile, double x, double y, double z, float partialTicks, int destroyStage)
|
||||
{
|
||||
|
||||
BlockPos pos = tile.getPos();
|
||||
IBlockState state = this.getWorld().getBlockState(pos);
|
||||
if (state.getBlock() instanceof PistonBellows) {
|
||||
GL11.glPushMatrix();
|
||||
GL11.glTranslated(x + 0.5D, y + 0.5D, z + 0.5D);
|
||||
|
||||
Minecraft.getMinecraft().getTextureManager().bindTexture(TextureMap.LOCATION_BLOCKS_TEXTURE);
|
||||
float prevLGTX = OpenGlHelper.lastBrightnessX;
|
||||
float prevLGTY = OpenGlHelper.lastBrightnessY;
|
||||
BlockPos pos = tile.getPos();
|
||||
IBlockState state = this.getWorld().getBlockState(pos);
|
||||
|
||||
int bright = tile.getWorld().getCombinedLight(pos.up(), 0);
|
||||
OpenGlHelper.setLightmapTextureCoords(OpenGlHelper.lightmapTexUnit, bright % 65536, bright / 65536);
|
||||
|
||||
|
||||
|
||||
GL11.glPushMatrix();
|
||||
if (state.getValue(PistonBellows.FACING) == EnumFacing.NORTH) {
|
||||
|
||||
@@ -84,3 +90,4 @@ public class TilePistonBellowsRender extends TileEntitySpecialRenderer<TilePisto
|
||||
GL11.glPopMatrix();
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -2,7 +2,7 @@
|
||||
"modid": "forgecraft",
|
||||
"name": "Kitsu's Forgecraft",
|
||||
"description": "Forged with sweat and blood",
|
||||
"version": "1.2.21",
|
||||
"version": "1.2.22",
|
||||
"mcversion": "1.11.2",
|
||||
"url": "",
|
||||
"updateUrl": "",
|
||||
|
||||
Reference in New Issue
Block a user