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,32 +87,33 @@ public class TileAnvilRender extends TileEntitySpecialRenderer<TileAnvil>
|
||||
24 | 14/16 | 14/16
|
||||
*/
|
||||
|
||||
if(state.getValue(Anvil.FACING) == EnumFacing.NORTH){
|
||||
|
||||
if (state.getValue(Anvil.FACING) == EnumFacing.NORTH) {
|
||||
int counter = 0;
|
||||
for(int i=0; i < 5; i++){
|
||||
for(int a=0; a<5; a++){
|
||||
if(!tile.getSlotStack(counter).isEmpty()){
|
||||
for (int i = 0; i < 5; i++) {
|
||||
for (int a = 0; a < 5; a++) {
|
||||
if (!tile.getSlotStack(counter).isEmpty()) {
|
||||
Item item = tile.getSlotStack(counter).getItem();
|
||||
if(item.equals(Items.REDSTONE) ||
|
||||
if (item.equals(Items.REDSTONE) ||
|
||||
(item.equals(Items.DYE) && tile.getSlotStack(counter).getItemDamage() == EnumDyeColor.BLUE.getDyeDamage()) ||
|
||||
item.equals(PrimalItems.EMERALD_KNAPP) ||
|
||||
item.equals(PrimalItems.DIAMOND_KNAPP) ||
|
||||
item.equals(Items.DIAMOND) ||
|
||||
item.equals(Items.EMERALD)
|
||||
){
|
||||
) {
|
||||
GL11.glPushMatrix();
|
||||
|
||||
GL11.glTranslated( tile.getNormalX(a), -0.49D, tile.getNormalZ(i) );
|
||||
GL11.glTranslated(tile.getNormalX(a), -0.49D, tile.getNormalZ(i));
|
||||
GL11.glRotated(-90.0F, 1.0F, -0.0F, 0.0F);
|
||||
GL11.glScaled(0.25D, 0.25D, 0.25D);
|
||||
renderItem.renderItem(tile.getSlotStack(counter), ItemCameraTransforms.TransformType.FIXED);
|
||||
GL11.glPopMatrix();
|
||||
}
|
||||
if(item.equals(ModItems.pickaxehead) ||
|
||||
if (item.equals(ModItems.pickaxehead) ||
|
||||
item.equals(ModItems.cleanironpickaxehead) ||
|
||||
item.equals(ModItems.steelpickaxehead) ||
|
||||
item.equals(ModItems.wootzpickaxehead)
|
||||
){
|
||||
) {
|
||||
GL11.glPushMatrix();
|
||||
double scale = 1.0D;
|
||||
GL11.glScaled(scale, scale, scale);
|
||||
@@ -119,11 +121,11 @@ public class TileAnvilRender extends TileEntitySpecialRenderer<TileAnvil>
|
||||
renderItem.renderItem(tile.getSlotStack(counter), ItemCameraTransforms.TransformType.FIXED);
|
||||
GL11.glPopMatrix();
|
||||
}
|
||||
if(item.equals(ModItems.ironaxehead) ||
|
||||
if (item.equals(ModItems.ironaxehead) ||
|
||||
item.equals(ModItems.cleanironaxehead) ||
|
||||
item.equals(ModItems.steelaxehead) ||
|
||||
item.equals(ModItems.wootzaxehead)
|
||||
){
|
||||
) {
|
||||
GL11.glPushMatrix();
|
||||
double scale = 1.0D;
|
||||
GL11.glScaled(scale, scale, scale);
|
||||
@@ -132,11 +134,11 @@ public class TileAnvilRender extends TileEntitySpecialRenderer<TileAnvil>
|
||||
renderItem.renderItem(tile.getSlotStack(counter), ItemCameraTransforms.TransformType.FIXED);
|
||||
GL11.glPopMatrix();
|
||||
}
|
||||
if(item.equals(ModItems.ironshovelhead) ||
|
||||
if (item.equals(ModItems.ironshovelhead) ||
|
||||
item.equals(ModItems.cleanironshovelhead) ||
|
||||
item.equals(ModItems.steelshovelhead) ||
|
||||
item.equals(ModItems.steelshovelhead)
|
||||
){
|
||||
) {
|
||||
GL11.glPushMatrix();
|
||||
double scale = 1.0D;
|
||||
GL11.glScaled(scale, scale, scale);
|
||||
@@ -145,7 +147,7 @@ public class TileAnvilRender extends TileEntitySpecialRenderer<TileAnvil>
|
||||
renderItem.renderItem(tile.getSlotStack(counter), ItemCameraTransforms.TransformType.FIXED);
|
||||
GL11.glPopMatrix();
|
||||
}
|
||||
if(item.equals(ModItems.ironhoehead)){
|
||||
if (item.equals(ModItems.ironhoehead)) {
|
||||
GL11.glPushMatrix();
|
||||
double scale = 1.0D;
|
||||
GL11.glScaled(scale, scale, scale);
|
||||
@@ -154,7 +156,7 @@ public class TileAnvilRender extends TileEntitySpecialRenderer<TileAnvil>
|
||||
renderItem.renderItem(tile.getSlotStack(counter), ItemCameraTransforms.TransformType.FIXED);
|
||||
GL11.glPopMatrix();
|
||||
}
|
||||
if(Block.getBlockFromItem(item) instanceof IngotBall){
|
||||
if (Block.getBlockFromItem(item) instanceof IngotBall) {
|
||||
GL11.glPushMatrix();
|
||||
double scale = 1.0D;
|
||||
GL11.glScaled(scale, scale, scale);
|
||||
@@ -162,7 +164,7 @@ public class TileAnvilRender extends TileEntitySpecialRenderer<TileAnvil>
|
||||
renderItem.renderItem(tile.getSlotStack(counter), ItemCameraTransforms.TransformType.FIXED);
|
||||
GL11.glPopMatrix();
|
||||
}
|
||||
if(item instanceof BaseMultiItem){
|
||||
if (item instanceof BaseMultiItem) {
|
||||
GL11.glPushMatrix();
|
||||
double scale = 1.0D;
|
||||
GL11.glScaled(scale, scale, scale);
|
||||
@@ -176,90 +178,90 @@ public class TileAnvilRender extends TileEntitySpecialRenderer<TileAnvil>
|
||||
}
|
||||
}
|
||||
}
|
||||
if(state.getValue(Anvil.FACING) == EnumFacing.SOUTH){
|
||||
if (state.getValue(Anvil.FACING) == EnumFacing.SOUTH) {
|
||||
int counter = 0;
|
||||
for(int i=0; i < 5; i++){
|
||||
for(int a=0; a<5; a++){
|
||||
if(!tile.getSlotStack(counter).isEmpty()){
|
||||
for (int i = 0; i < 5; i++) {
|
||||
for (int a = 0; a < 5; a++) {
|
||||
if (!tile.getSlotStack(counter).isEmpty()) {
|
||||
Item item = tile.getSlotStack(counter).getItem();
|
||||
if(item.equals(Items.REDSTONE) ||
|
||||
if (item.equals(Items.REDSTONE) ||
|
||||
(item.equals(Items.DYE) && tile.getSlotStack(counter).getItemDamage() == EnumDyeColor.BLUE.getDyeDamage()) ||
|
||||
item.equals(PrimalItems.EMERALD_KNAPP) ||
|
||||
item.equals(PrimalItems.DIAMOND_KNAPP) ||
|
||||
item.equals(Items.DIAMOND) ||
|
||||
item.equals(Items.EMERALD)
|
||||
){
|
||||
) {
|
||||
GL11.glPushMatrix();
|
||||
GL11.glTranslated( tile.getReverseX(a), -0.49D, tile.getReverseZ(i) );
|
||||
GL11.glTranslated(tile.getReverseX(a), -0.49D, tile.getReverseZ(i));
|
||||
GL11.glRotated(-90.0F, 1.0F, -0.0F, 0.0F);
|
||||
GL11.glScaled(0.25D, 0.25D, 0.25D);
|
||||
renderItem.renderItem(tile.getSlotStack(counter), ItemCameraTransforms.TransformType.FIXED);
|
||||
GL11.glPopMatrix();
|
||||
}
|
||||
if(item.equals(ModItems.pickaxehead) ||
|
||||
if (item.equals(ModItems.pickaxehead) ||
|
||||
item.equals(ModItems.cleanironpickaxehead) ||
|
||||
item.equals(ModItems.steelpickaxehead) ||
|
||||
item.equals(ModItems.wootzpickaxehead)
|
||||
){
|
||||
) {
|
||||
GL11.glPushMatrix();
|
||||
double scale = 1.0D;
|
||||
GL11.glScaled(scale, scale, scale);
|
||||
GL11.glTranslated( tile.getReverseX(a), -0.435D, tile.getReverseZ(i) );
|
||||
GL11.glTranslated(tile.getReverseX(a), -0.435D, tile.getReverseZ(i));
|
||||
renderItem.renderItem(tile.getSlotStack(counter), ItemCameraTransforms.TransformType.FIXED);
|
||||
GL11.glPopMatrix();
|
||||
}
|
||||
if(item.equals(ModItems.ironaxehead) ||
|
||||
if (item.equals(ModItems.ironaxehead) ||
|
||||
item.equals(ModItems.cleanironaxehead) ||
|
||||
item.equals(ModItems.steelaxehead) ||
|
||||
item.equals(ModItems.wootzaxehead)
|
||||
){
|
||||
) {
|
||||
GL11.glPushMatrix();
|
||||
double scale = 1.0D;
|
||||
GL11.glScaled(scale, scale, scale);
|
||||
GL11.glTranslated( tile.getReverseX(a), -0.435D, tile.getReverseZ(i) );
|
||||
GL11.glTranslated(tile.getReverseX(a), -0.435D, tile.getReverseZ(i));
|
||||
GL11.glRotated(90.0F, 1.0F, 0.0F, 0.0F);
|
||||
renderItem.renderItem(tile.getSlotStack(counter), ItemCameraTransforms.TransformType.FIXED);
|
||||
GL11.glPopMatrix();
|
||||
}
|
||||
if(item.equals(ModItems.ironshovelhead) ||
|
||||
if (item.equals(ModItems.ironshovelhead) ||
|
||||
item.equals(ModItems.cleanironshovelhead) ||
|
||||
item.equals(ModItems.steelshovelhead) ||
|
||||
item.equals(ModItems.steelshovelhead)
|
||||
){
|
||||
) {
|
||||
GL11.glPushMatrix();
|
||||
double scale = 1.0D;
|
||||
GL11.glScaled(scale, scale, scale);
|
||||
GL11.glTranslated( tile.getReverseX(a), -0.435D, tile.getReverseZ(i) );
|
||||
GL11.glTranslated(tile.getReverseX(a), -0.435D, tile.getReverseZ(i));
|
||||
GL11.glRotated(90.0F, 1.0F, 0.0F, 0.0F);
|
||||
renderItem.renderItem(tile.getSlotStack(counter), ItemCameraTransforms.TransformType.FIXED);
|
||||
GL11.glPopMatrix();
|
||||
}
|
||||
if(item.equals(ModItems.ironhoehead) ||
|
||||
if (item.equals(ModItems.ironhoehead) ||
|
||||
item.equals(ModItems.cleanironhoehead) ||
|
||||
item.equals(ModItems.steelhoehead) ||
|
||||
item.equals(ModItems.wootzhoehead)
|
||||
){
|
||||
) {
|
||||
GL11.glPushMatrix();
|
||||
double scale = 1.0D;
|
||||
GL11.glScaled(scale, scale, scale);
|
||||
GL11.glTranslated( tile.getReverseX(a), -0.435D, tile.getReverseZ(i) );
|
||||
GL11.glTranslated(tile.getReverseX(a), -0.435D, tile.getReverseZ(i));
|
||||
GL11.glRotated(180.0F, 1.0F, 0.0F, 0.0F);
|
||||
renderItem.renderItem(tile.getSlotStack(counter), ItemCameraTransforms.TransformType.FIXED);
|
||||
GL11.glPopMatrix();
|
||||
}
|
||||
if(Block.getBlockFromItem(item) instanceof IngotBall){
|
||||
if (Block.getBlockFromItem(item) instanceof IngotBall) {
|
||||
GL11.glPushMatrix();
|
||||
double scale = 1.0D;
|
||||
GL11.glScaled(scale, scale, scale);
|
||||
GL11.glTranslated( tile.getReverseX(a), -0.44D, tile.getReverseZ(i) );
|
||||
GL11.glTranslated(tile.getReverseX(a), -0.44D, tile.getReverseZ(i));
|
||||
renderItem.renderItem(tile.getSlotStack(counter), ItemCameraTransforms.TransformType.FIXED);
|
||||
GL11.glPopMatrix();
|
||||
}
|
||||
if(item instanceof BaseMultiItem){
|
||||
if (item instanceof BaseMultiItem) {
|
||||
GL11.glPushMatrix();
|
||||
double scale = 1.0D;
|
||||
GL11.glScaled(scale, scale, scale);
|
||||
GL11.glTranslated( tile.getReverseX(a), -0.44D, tile.getReverseZ(i) );
|
||||
GL11.glTranslated(tile.getReverseX(a), -0.44D, tile.getReverseZ(i));
|
||||
renderItem.renderItem(tile.getSlotStack(counter), ItemCameraTransforms.TransformType.FIXED);
|
||||
GL11.glPopMatrix();
|
||||
}
|
||||
@@ -269,88 +271,88 @@ public class TileAnvilRender extends TileEntitySpecialRenderer<TileAnvil>
|
||||
}
|
||||
}
|
||||
}
|
||||
if(state.getValue(Anvil.FACING) == EnumFacing.WEST){
|
||||
if (state.getValue(Anvil.FACING) == EnumFacing.WEST) {
|
||||
int counter = 0;
|
||||
for(int a=0; a < 5; a++){
|
||||
for(int i=0; i<5; i++){
|
||||
if(!tile.getSlotStack(counter).isEmpty()){
|
||||
for (int a = 0; a < 5; a++) {
|
||||
for (int i = 0; i < 5; i++) {
|
||||
if (!tile.getSlotStack(counter).isEmpty()) {
|
||||
Item item = tile.getSlotStack(counter).getItem();
|
||||
if(item.equals(Items.REDSTONE) ||
|
||||
if (item.equals(Items.REDSTONE) ||
|
||||
(item.equals(Items.DYE) && tile.getSlotStack(counter).getItemDamage() == EnumDyeColor.BLUE.getDyeDamage()) ||
|
||||
item.equals(PrimalItems.EMERALD_KNAPP) ||
|
||||
item.equals(PrimalItems.DIAMOND_KNAPP) ||
|
||||
item.equals(Items.DIAMOND) ||
|
||||
item.equals(Items.EMERALD)
|
||||
){
|
||||
) {
|
||||
GL11.glPushMatrix();
|
||||
GL11.glTranslated( tile.getNormalX(a), -0.49D, tile.getReverseZ(i) );
|
||||
GL11.glTranslated(tile.getNormalX(a), -0.49D, tile.getReverseZ(i));
|
||||
GL11.glRotated(-90.0F, 1.0F, -0.0F, 0.0F);
|
||||
GL11.glScaled(0.25D, 0.25D, 0.25D);
|
||||
GL11.glRotated(-90.0F, 0.0F, 0.0F, 1.0F);
|
||||
renderItem.renderItem(tile.getSlotStack(counter), ItemCameraTransforms.TransformType.FIXED);
|
||||
GL11.glPopMatrix();
|
||||
}
|
||||
if(item.equals(ModItems.pickaxehead) ||
|
||||
if (item.equals(ModItems.pickaxehead) ||
|
||||
item.equals(ModItems.cleanironpickaxehead) ||
|
||||
item.equals(ModItems.steelpickaxehead) ||
|
||||
item.equals(ModItems.wootzpickaxehead)
|
||||
){
|
||||
) {
|
||||
GL11.glPushMatrix();
|
||||
double scale = 1.0D;
|
||||
GL11.glScaled(scale, scale, scale);
|
||||
GL11.glTranslated( tile.getNormalX(a), -0.435D, tile.getReverseZ(i) );
|
||||
GL11.glTranslated(tile.getNormalX(a), -0.435D, tile.getReverseZ(i));
|
||||
GL11.glRotated(-90.0F, 0.0F, 1.0F, 0.0F);
|
||||
renderItem.renderItem(tile.getSlotStack(counter), ItemCameraTransforms.TransformType.FIXED);
|
||||
GL11.glPopMatrix();
|
||||
}
|
||||
if(item.equals(ModItems.ironaxehead) ||
|
||||
if (item.equals(ModItems.ironaxehead) ||
|
||||
item.equals(ModItems.cleanironaxehead) ||
|
||||
item.equals(ModItems.steelaxehead) ||
|
||||
item.equals(ModItems.wootzaxehead)
|
||||
){
|
||||
) {
|
||||
GL11.glPushMatrix();
|
||||
double scale = 1.0D;
|
||||
GL11.glScaled(scale, scale, scale);
|
||||
GL11.glTranslated( tile.getNormalX(a), -0.435D, tile.getReverseZ(i) );
|
||||
GL11.glTranslated(tile.getNormalX(a), -0.435D, tile.getReverseZ(i));
|
||||
GL11.glRotated(90.0F, 1.0F, 0.0F, 0.0F);
|
||||
renderItem.renderItem(tile.getSlotStack(counter), ItemCameraTransforms.TransformType.FIXED);
|
||||
GL11.glPopMatrix();
|
||||
}
|
||||
if(item.equals(ModItems.ironshovelhead) ||
|
||||
if (item.equals(ModItems.ironshovelhead) ||
|
||||
item.equals(ModItems.cleanironshovelhead) ||
|
||||
item.equals(ModItems.steelshovelhead) ||
|
||||
item.equals(ModItems.steelshovelhead)
|
||||
){
|
||||
) {
|
||||
GL11.glPushMatrix();
|
||||
double scale = 1.0D;
|
||||
GL11.glScaled(scale, scale, scale);
|
||||
GL11.glTranslated( tile.getNormalX(a), -0.435D, tile.getReverseZ(i) );
|
||||
GL11.glTranslated(tile.getNormalX(a), -0.435D, tile.getReverseZ(i));
|
||||
GL11.glRotated(90.0F, 1.0F, 0.0F, 0.0F);
|
||||
renderItem.renderItem(tile.getSlotStack(counter), ItemCameraTransforms.TransformType.FIXED);
|
||||
GL11.glPopMatrix();
|
||||
}
|
||||
if(item.equals(ModItems.ironhoehead)){
|
||||
if (item.equals(ModItems.ironhoehead)) {
|
||||
GL11.glPushMatrix();
|
||||
double scale = 1.0D;
|
||||
GL11.glScaled(scale, scale, scale);
|
||||
GL11.glTranslated( tile.getNormalX(a), -0.435D, tile.getReverseZ(i) );
|
||||
GL11.glTranslated(tile.getNormalX(a), -0.435D, tile.getReverseZ(i));
|
||||
GL11.glRotated(180.0F, 1.0F, 0.0F, 0.0F);
|
||||
renderItem.renderItem(tile.getSlotStack(counter), ItemCameraTransforms.TransformType.FIXED);
|
||||
GL11.glPopMatrix();
|
||||
}
|
||||
if(Block.getBlockFromItem(item) instanceof IngotBall){
|
||||
if (Block.getBlockFromItem(item) instanceof IngotBall) {
|
||||
GL11.glPushMatrix();
|
||||
double scale = 1.0D;
|
||||
GL11.glScaled(scale, scale, scale);
|
||||
GL11.glTranslated( tile.getNormalX(a), -0.44D, tile.getReverseZ(i) );
|
||||
GL11.glTranslated(tile.getNormalX(a), -0.44D, tile.getReverseZ(i));
|
||||
renderItem.renderItem(tile.getSlotStack(counter), ItemCameraTransforms.TransformType.FIXED);
|
||||
GL11.glPopMatrix();
|
||||
}
|
||||
if(item instanceof BaseMultiItem){
|
||||
if (item instanceof BaseMultiItem) {
|
||||
GL11.glPushMatrix();
|
||||
double scale = 1.0D;
|
||||
GL11.glScaled(scale, scale, scale);
|
||||
GL11.glTranslated( tile.getNormalX(a), -0.44D, tile.getReverseZ(i) );
|
||||
GL11.glTranslated(tile.getNormalX(a), -0.44D, tile.getReverseZ(i));
|
||||
renderItem.renderItem(tile.getSlotStack(counter), ItemCameraTransforms.TransformType.FIXED);
|
||||
GL11.glPopMatrix();
|
||||
}
|
||||
@@ -359,21 +361,21 @@ public class TileAnvilRender extends TileEntitySpecialRenderer<TileAnvil>
|
||||
}
|
||||
}
|
||||
}
|
||||
if(state.getValue(Anvil.FACING) == EnumFacing.EAST){
|
||||
if (state.getValue(Anvil.FACING) == EnumFacing.EAST) {
|
||||
int counter = 0;
|
||||
for(int a=0; a < 5; a++){
|
||||
for(int i=0; i<5; i++){
|
||||
if(!tile.getSlotStack(counter).isEmpty()){
|
||||
for (int a = 0; a < 5; a++) {
|
||||
for (int i = 0; i < 5; i++) {
|
||||
if (!tile.getSlotStack(counter).isEmpty()) {
|
||||
Item item = tile.getSlotStack(counter).getItem();
|
||||
if(item.equals(Items.REDSTONE) ||
|
||||
if (item.equals(Items.REDSTONE) ||
|
||||
(item.equals(Items.DYE) && tile.getSlotStack(counter).getItemDamage() == EnumDyeColor.BLUE.getDyeDamage()) ||
|
||||
item.equals(PrimalItems.EMERALD_KNAPP) ||
|
||||
item.equals(PrimalItems.DIAMOND_KNAPP) ||
|
||||
item.equals(Items.DIAMOND) ||
|
||||
item.equals(Items.EMERALD)
|
||||
){
|
||||
) {
|
||||
GL11.glPushMatrix();
|
||||
GL11.glTranslated( tile.getReverseX(a), -0.49D, tile.getNormalZ(i) );
|
||||
GL11.glTranslated(tile.getReverseX(a), -0.49D, tile.getNormalZ(i));
|
||||
GL11.glRotated(-90.0F, 1.0F, 0.0F, 0.0F);
|
||||
GL11.glScaled(0.25D, 0.25D, 0.25D);
|
||||
GL11.glRotated(-90.0F, 0.0F, 0.0F, 1.0F);
|
||||
@@ -381,67 +383,67 @@ public class TileAnvilRender extends TileEntitySpecialRenderer<TileAnvil>
|
||||
renderItem.renderItem(tile.getSlotStack(counter), ItemCameraTransforms.TransformType.FIXED);
|
||||
GL11.glPopMatrix();
|
||||
}
|
||||
if(item.equals(ModItems.pickaxehead) ||
|
||||
if (item.equals(ModItems.pickaxehead) ||
|
||||
item.equals(ModItems.cleanironpickaxehead) ||
|
||||
item.equals(ModItems.steelpickaxehead) ||
|
||||
item.equals(ModItems.wootzpickaxehead)
|
||||
){
|
||||
) {
|
||||
GL11.glPushMatrix();
|
||||
double scale = 1.0D;
|
||||
GL11.glScaled(scale, scale, scale);
|
||||
GL11.glTranslated( tile.getReverseX(a), -0.435D, tile.getNormalZ(i) );
|
||||
GL11.glTranslated(tile.getReverseX(a), -0.435D, tile.getNormalZ(i));
|
||||
GL11.glRotated(-90.0F, 0.0F, 1.0F, 0.0F);
|
||||
renderItem.renderItem(tile.getSlotStack(counter), ItemCameraTransforms.TransformType.FIXED);
|
||||
GL11.glPopMatrix();
|
||||
}
|
||||
if(item.equals(ModItems.ironaxehead) ||
|
||||
if (item.equals(ModItems.ironaxehead) ||
|
||||
item.equals(ModItems.cleanironaxehead) ||
|
||||
item.equals(ModItems.steelaxehead) ||
|
||||
item.equals(ModItems.wootzaxehead)
|
||||
){
|
||||
) {
|
||||
GL11.glPushMatrix();
|
||||
double scale = 1.0D;
|
||||
GL11.glScaled(scale, scale, scale);
|
||||
GL11.glTranslated( tile.getReverseX(a), -0.435D, tile.getNormalZ(i) );
|
||||
GL11.glTranslated(tile.getReverseX(a), -0.435D, tile.getNormalZ(i));
|
||||
GL11.glRotated(90.0F, 1.0F, 0.0F, 0.0F);
|
||||
renderItem.renderItem(tile.getSlotStack(counter), ItemCameraTransforms.TransformType.FIXED);
|
||||
GL11.glPopMatrix();
|
||||
}
|
||||
if(item.equals(ModItems.ironshovelhead) ||
|
||||
if (item.equals(ModItems.ironshovelhead) ||
|
||||
item.equals(ModItems.cleanironshovelhead) ||
|
||||
item.equals(ModItems.steelshovelhead) ||
|
||||
item.equals(ModItems.steelshovelhead)
|
||||
){
|
||||
) {
|
||||
GL11.glPushMatrix();
|
||||
double scale = 1.0D;
|
||||
GL11.glScaled(scale, scale, scale);
|
||||
GL11.glTranslated( tile.getReverseX(a), -0.435D, tile.getNormalZ(i) );
|
||||
GL11.glTranslated(tile.getReverseX(a), -0.435D, tile.getNormalZ(i));
|
||||
GL11.glRotated(90.0F, 1.0F, 0.0F, 0.0F);
|
||||
renderItem.renderItem(tile.getSlotStack(counter), ItemCameraTransforms.TransformType.FIXED);
|
||||
GL11.glPopMatrix();
|
||||
}
|
||||
if(item.equals(ModItems.ironhoehead)){
|
||||
if (item.equals(ModItems.ironhoehead)) {
|
||||
GL11.glPushMatrix();
|
||||
double scale = 1.0D;
|
||||
GL11.glScaled(scale, scale, scale);
|
||||
GL11.glTranslated( tile.getReverseX(a), -0.435D, tile.getNormalZ(i) );
|
||||
GL11.glTranslated(tile.getReverseX(a), -0.435D, tile.getNormalZ(i));
|
||||
GL11.glRotated(180.0F, 1.0F, 0.0F, 0.0F);
|
||||
renderItem.renderItem(tile.getSlotStack(counter), ItemCameraTransforms.TransformType.FIXED);
|
||||
GL11.glPopMatrix();
|
||||
}
|
||||
if(Block.getBlockFromItem(item) instanceof IngotBall){
|
||||
if (Block.getBlockFromItem(item) instanceof IngotBall) {
|
||||
GL11.glPushMatrix();
|
||||
double scale = 1.0D;
|
||||
GL11.glScaled(scale, scale, scale);
|
||||
GL11.glTranslated( tile.getReverseX(a), -0.44D, tile.getNormalZ(i) );
|
||||
GL11.glTranslated(tile.getReverseX(a), -0.44D, tile.getNormalZ(i));
|
||||
renderItem.renderItem(tile.getSlotStack(counter), ItemCameraTransforms.TransformType.FIXED);
|
||||
GL11.glPopMatrix();
|
||||
}
|
||||
if(item instanceof BaseMultiItem){
|
||||
if (item instanceof BaseMultiItem) {
|
||||
GL11.glPushMatrix();
|
||||
double scale = 1.0D;
|
||||
GL11.glScaled(scale, scale, scale);
|
||||
GL11.glTranslated( tile.getReverseX(a), -0.455D, tile.getNormalZ(i) );
|
||||
GL11.glTranslated(tile.getReverseX(a), -0.455D, tile.getNormalZ(i));
|
||||
renderItem.renderItem(tile.getSlotStack(counter), ItemCameraTransforms.TransformType.FIXED);
|
||||
GL11.glPopMatrix();
|
||||
}
|
||||
@@ -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);
|
||||
|
||||
@@ -49,7 +54,7 @@ public class TileBloomeryRender extends TileEntitySpecialRenderer<TileBloomery>
|
||||
renderItem.renderItem(stack0, renderItem.getItemModelMesher().getItemModel(stack0));
|
||||
GL11.glPopMatrix();
|
||||
|
||||
for(int i = 0; i < Math.ceil(stackRotation/8) + 1; i++){
|
||||
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);
|
||||
@@ -60,7 +65,7 @@ public class TileBloomeryRender extends TileEntitySpecialRenderer<TileBloomery>
|
||||
}
|
||||
}
|
||||
|
||||
if(!stack1.isEmpty()){
|
||||
if (!stack1.isEmpty()) {
|
||||
GL11.glPushMatrix();
|
||||
GL11.glTranslated(0, 0.50D, 0);
|
||||
renderItem.renderItem(stack1, renderItem.getItemModelMesher().getItemModel(stack1));
|
||||
@@ -70,4 +75,5 @@ public class TileBloomeryRender extends TileEntitySpecialRenderer<TileBloomery>
|
||||
OpenGlHelper.setLightmapTextureCoords(OpenGlHelper.lightmapTexUnit, prevLGTX, prevLGTY);
|
||||
GL11.glPopMatrix();
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -21,22 +21,24 @@ 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);
|
||||
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);
|
||||
|
||||
//ItemStack stack0 = tile.getSlotStack(0);
|
||||
|
||||
if(state.getValue(Breaker.FACING) == EnumFacing.NORTH) {
|
||||
if (state.getValue(Breaker.FACING) == EnumFacing.NORTH) {
|
||||
GL11.glPushMatrix();
|
||||
GL11.glTranslated(0.5D, 0.450D, 0.7);
|
||||
GL11.glRotated(90, 0.0f, 1.0f, 0.0f);
|
||||
@@ -51,7 +53,7 @@ public class TileBreakerRender extends TileEntitySpecialRenderer<TileBreaker>
|
||||
GL11.glPopMatrix();
|
||||
}
|
||||
|
||||
if(state.getValue(Breaker.FACING) == EnumFacing.EAST) {
|
||||
if (state.getValue(Breaker.FACING) == EnumFacing.EAST) {
|
||||
GL11.glPushMatrix();
|
||||
GL11.glTranslated(0.3D, 0.450D, 0.5);
|
||||
//GL11.glRotated(90, 0.0f, 1.0f, 0.0f);
|
||||
@@ -66,7 +68,7 @@ public class TileBreakerRender extends TileEntitySpecialRenderer<TileBreaker>
|
||||
GL11.glPopMatrix();
|
||||
}
|
||||
|
||||
if(state.getValue(Breaker.FACING) == EnumFacing.SOUTH) {
|
||||
if (state.getValue(Breaker.FACING) == EnumFacing.SOUTH) {
|
||||
GL11.glPushMatrix();
|
||||
GL11.glTranslated(0.5D, 0.450D, 0.3);
|
||||
GL11.glRotated(90, 0.0f, 1.0f, 0.0f);
|
||||
@@ -81,7 +83,7 @@ public class TileBreakerRender extends TileEntitySpecialRenderer<TileBreaker>
|
||||
GL11.glPopMatrix();
|
||||
}
|
||||
|
||||
if(state.getValue(Breaker.FACING) == EnumFacing.WEST) {
|
||||
if (state.getValue(Breaker.FACING) == EnumFacing.WEST) {
|
||||
GL11.glPushMatrix();
|
||||
GL11.glTranslated(0.7D, 0.450D, 0.5);
|
||||
//GL11.glRotated(90, 0.0f, 1.0f, 0.0f);
|
||||
@@ -99,4 +101,5 @@ public class TileBreakerRender extends TileEntitySpecialRenderer<TileBreaker>
|
||||
OpenGlHelper.setLightmapTextureCoords(OpenGlHelper.lightmapTexUnit, prevLGTX, prevLGTY);
|
||||
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);
|
||||
|
||||
@@ -48,7 +54,7 @@ public class TileForgeRender extends TileEntitySpecialRenderer<TileForge>
|
||||
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++){
|
||||
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);
|
||||
@@ -59,57 +65,57 @@ public class TileForgeRender extends TileEntitySpecialRenderer<TileForge>
|
||||
}
|
||||
}
|
||||
|
||||
for(int i=2; i < tile.getSlotListSize(); i++){
|
||||
if(!tile.getSlotStack(i).isEmpty()){
|
||||
for (int i = 2; i < tile.getSlotListSize(); i++) {
|
||||
if (!tile.getSlotStack(i).isEmpty()) {
|
||||
GL11.glPushMatrix();
|
||||
float tempScale = 0.8F;
|
||||
GL11.glScalef(tempScale, tempScale, tempScale);
|
||||
GL11.glTranslated(0.0F, 0.1D, 0.0F);
|
||||
if(i == 2){
|
||||
if (i == 2) {
|
||||
GL11.glTranslated(-0.3, -0.05D, -0.3D);
|
||||
if(tile.getSlotStack(i).getItem() == Items.IRON_INGOT){
|
||||
if (tile.getSlotStack(i).getItem() == Items.IRON_INGOT) {
|
||||
GL11.glScalef(0.5f, 0.5f, 0.5f);
|
||||
GL11.glRotated(90.0F, 1.0f, 0.0f, 0.0f);
|
||||
}
|
||||
}
|
||||
if(i == 3){
|
||||
if (i == 3) {
|
||||
GL11.glTranslated(-0.3, -0.05D, 0.3D);
|
||||
if(tile.getSlotStack(i).getItem() == Items.IRON_INGOT){
|
||||
if (tile.getSlotStack(i).getItem() == Items.IRON_INGOT) {
|
||||
GL11.glScalef(0.5f, 0.5f, 0.5f);
|
||||
GL11.glRotated(90.0F, 1.0f, 0.0f, 0.0f);
|
||||
}
|
||||
}
|
||||
if(i == 4){
|
||||
if(tile.getSlotStack(i).getItem() == Items.IRON_INGOT){
|
||||
if (i == 4) {
|
||||
if (tile.getSlotStack(i).getItem() == Items.IRON_INGOT) {
|
||||
GL11.glScalef(0.5f, 0.5f, 0.5f);
|
||||
GL11.glRotated(90.0F, 1.0f, 0.0f, 0.0f);
|
||||
}
|
||||
//GL11.glScalef(0.6F, 0.6F, 0.6F);
|
||||
if(tile.getSlotStack(i).getItem() == ModItems.pickaxehead) {
|
||||
if (tile.getSlotStack(i).getItem() == ModItems.pickaxehead) {
|
||||
GL11.glRotated(180.0F, 0.0F, 1.0F, 0.0F);
|
||||
}
|
||||
if(tile.getSlotStack(i).getItem() == ModItems.ironaxehead) {
|
||||
if (tile.getSlotStack(i).getItem() == ModItems.ironaxehead) {
|
||||
GL11.glRotated(90.0F, 1.0F, 0.0F, 0.0F);
|
||||
}
|
||||
if(tile.getSlotStack(i).getItem() == ModItems.ironshovelhead) {
|
||||
if (tile.getSlotStack(i).getItem() == ModItems.ironshovelhead) {
|
||||
GL11.glRotated(90.0F, 1.0F, 0.0F, 0.0F);
|
||||
}
|
||||
if(tile.getSlotStack(i).getItem() == ModItems.ironhoehead) {
|
||||
if (tile.getSlotStack(i).getItem() == ModItems.ironhoehead) {
|
||||
GL11.glRotated(180.0F, 1.0F, 0.0F, 0.0F);
|
||||
GL11.glTranslated(0.0, 0.025D, 0.0D);
|
||||
}
|
||||
|
||||
}
|
||||
if(i == 5){
|
||||
if (i == 5) {
|
||||
GL11.glTranslated(0.3, -0.05D, -0.3D);
|
||||
if(tile.getSlotStack(i).getItem() == Items.IRON_INGOT){
|
||||
if (tile.getSlotStack(i).getItem() == Items.IRON_INGOT) {
|
||||
GL11.glScalef(0.5f, 0.5f, 0.5f);
|
||||
GL11.glRotated(90.0F, 1.0f, 0.0f, 0.0f);
|
||||
}
|
||||
}
|
||||
if(i == 6){
|
||||
if (i == 6) {
|
||||
GL11.glTranslated(0.3, -0.05D, 0.3D);
|
||||
if(tile.getSlotStack(i).getItem() == Items.IRON_INGOT){
|
||||
if (tile.getSlotStack(i).getItem() == Items.IRON_INGOT) {
|
||||
GL11.glScalef(0.5f, 0.5f, 0.5f);
|
||||
GL11.glRotated(90.0F, 1.0f, 0.0f, 0.0f);
|
||||
}
|
||||
@@ -124,4 +130,5 @@ public class TileForgeRender extends TileEntitySpecialRenderer<TileForge>
|
||||
OpenGlHelper.setLightmapTextureCoords(OpenGlHelper.lightmapTexUnit, prevLGTX, prevLGTY);
|
||||
GL11.glPopMatrix();
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -24,55 +24,61 @@ 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){
|
||||
if (state.getValue(PistonBellows.FACING) == EnumFacing.NORTH) {
|
||||
|
||||
GL11.glRotated(0, 0.0F, 1.0F, 0.0F);
|
||||
if(state.getValue(PistonBellows.ACTIVE) == Boolean.TRUE){
|
||||
if (state.getValue(PistonBellows.ACTIVE) == Boolean.TRUE) {
|
||||
//System.out.println(tile.getAnimation());
|
||||
GL11.glTranslated(0.0D, 0, (double) tile.getAnimation()/25);
|
||||
GL11.glTranslated(0.0D, 0, (double) tile.getAnimation() / 25);
|
||||
}
|
||||
ItemStack stackToRender = new ItemStack(ModItems.pistonbellows, 1);
|
||||
renderItem.renderItem(stackToRender, renderItem.getItemModelMesher().getItemModel(stackToRender));
|
||||
}
|
||||
if(state.getValue(PistonBellows.FACING) == EnumFacing.SOUTH){
|
||||
if (state.getValue(PistonBellows.FACING) == EnumFacing.SOUTH) {
|
||||
//GL11.glPushMatrix();
|
||||
GL11.glRotated(180, 0.0F, 1.0F, 0.0F);
|
||||
if(state.getValue(PistonBellows.ACTIVE) == Boolean.TRUE){
|
||||
if (state.getValue(PistonBellows.ACTIVE) == Boolean.TRUE) {
|
||||
//System.out.println(tile.getAnimation());
|
||||
GL11.glTranslated(0.0D, 0, (double) tile.getAnimation()/25);
|
||||
GL11.glTranslated(0.0D, 0, (double) tile.getAnimation() / 25);
|
||||
}
|
||||
ItemStack stackToRender = new ItemStack(ModItems.pistonbellows, 1);
|
||||
renderItem.renderItem(stackToRender, renderItem.getItemModelMesher().getItemModel(stackToRender));
|
||||
//GL11.glPopMatrix();
|
||||
}
|
||||
if(state.getValue(PistonBellows.FACING) == EnumFacing.EAST){
|
||||
if (state.getValue(PistonBellows.FACING) == EnumFacing.EAST) {
|
||||
//GL11.glPushMatrix();
|
||||
GL11.glRotated(270, 0.0F, 1.0F, 0.0F);
|
||||
if(state.getValue(PistonBellows.ACTIVE) == Boolean.TRUE){
|
||||
if (state.getValue(PistonBellows.ACTIVE) == Boolean.TRUE) {
|
||||
//System.out.println(tile.getAnimation());
|
||||
GL11.glTranslated(0.0D, 0, (double) tile.getAnimation()/25);
|
||||
GL11.glTranslated(0.0D, 0, (double) tile.getAnimation() / 25);
|
||||
}
|
||||
ItemStack stackToRender = new ItemStack(ModItems.pistonbellows, 1);
|
||||
renderItem.renderItem(stackToRender, renderItem.getItemModelMesher().getItemModel(stackToRender));
|
||||
//GL11.glPopMatrix();
|
||||
}
|
||||
if(state.getValue(PistonBellows.FACING) == EnumFacing.WEST){
|
||||
if (state.getValue(PistonBellows.FACING) == EnumFacing.WEST) {
|
||||
//GL11.glPushMatrix();
|
||||
GL11.glRotated(90, 0.0F, 1.0F, 0.0F);
|
||||
if(state.getValue(PistonBellows.ACTIVE) == Boolean.TRUE){
|
||||
if (state.getValue(PistonBellows.ACTIVE) == Boolean.TRUE) {
|
||||
//System.out.println(tile.getAnimation());
|
||||
GL11.glTranslated(0.0D, 0, (double) tile.getAnimation()/25);
|
||||
GL11.glTranslated(0.0D, 0, (double) tile.getAnimation() / 25);
|
||||
}
|
||||
ItemStack stackToRender = new ItemStack(ModItems.pistonbellows, 1);
|
||||
renderItem.renderItem(stackToRender, renderItem.getItemModelMesher().getItemModel(stackToRender));
|
||||
@@ -83,4 +89,5 @@ public class TilePistonBellowsRender extends TileEntitySpecialRenderer<TilePisto
|
||||
OpenGlHelper.setLightmapTextureCoords(OpenGlHelper.lightmapTexUnit, prevLGTX, prevLGTY);
|
||||
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