mirror of
https://github.com/GTNewHorizons/TinkersConstruct.git
synced 2026-11-21 20:52:26 +00:00
Fix JABBA-related issues with crafting station slots (#54)
* Fix shift-merging tools voiding items fixes <https://github.com/GTNewHorizons/GT-New-Horizons-Modpack/issues/11392> * Change 0-sized ItemStacks into null stacks in crafting station attached slots Fixes <https://github.com/GTNewHorizons/GT-New-Horizons-Modpack/issues/10425> * Update buildscript * spotlessApply
This commit is contained in:
1 parent
18bfeaff32
commit
39be06c23b
571 files changed
+25959
-28223
No files matched your search
@@ -7,19 +7,16 @@ import net.minecraft.world.IBlockAccess;
|
||||
import org.lwjgl.opengl.GL11;
|
||||
import tconstruct.tools.TinkerTools;
|
||||
|
||||
public class TableRender implements ISimpleBlockRenderingHandler
|
||||
{
|
||||
public class TableRender implements ISimpleBlockRenderingHandler {
|
||||
public static int model = RenderingRegistry.getNextAvailableRenderId();
|
||||
|
||||
@Override
|
||||
public void renderInventoryBlock (Block block, int metadata, int modelID, RenderBlocks renderer)
|
||||
{
|
||||
if (modelID == model)
|
||||
{
|
||||
public void renderInventoryBlock(Block block, int metadata, int modelID, RenderBlocks renderer) {
|
||||
if (modelID == model) {
|
||||
// until we get the new model.. finally...
|
||||
if(block == TinkerTools.toolStationWood && metadata >= 5 && metadata <= 9) {
|
||||
if (block == TinkerTools.toolStationWood && metadata >= 5 && metadata <= 9) {
|
||||
// pattern chest
|
||||
renderer.setRenderBounds(0,0,0,1,0.875,1);
|
||||
renderer.setRenderBounds(0, 0, 0, 1, 0.875, 1);
|
||||
renderStandardInvBlock(renderer, block, metadata);
|
||||
return;
|
||||
}
|
||||
@@ -38,16 +35,15 @@ public class TableRender implements ISimpleBlockRenderingHandler
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean renderWorldBlock (IBlockAccess world, int x, int y, int z, Block block, int modelID, RenderBlocks renderer)
|
||||
{
|
||||
if (modelID == model)
|
||||
{
|
||||
int metadata = world.getBlockMetadata(x,y,z);
|
||||
public boolean renderWorldBlock(
|
||||
IBlockAccess world, int x, int y, int z, Block block, int modelID, RenderBlocks renderer) {
|
||||
if (modelID == model) {
|
||||
int metadata = world.getBlockMetadata(x, y, z);
|
||||
// until we get the new model.. finally...
|
||||
if(block == TinkerTools.toolStationWood && metadata >= 5 && metadata <= 9) {
|
||||
if (block == TinkerTools.toolStationWood && metadata >= 5 && metadata <= 9) {
|
||||
// pattern chest
|
||||
renderer.setRenderBounds(0,0,0,1,0.875,1);
|
||||
renderer.renderStandardBlock(block, x,y,z);
|
||||
renderer.setRenderBounds(0, 0, 0, 1, 0.875, 1);
|
||||
renderer.renderStandardBlock(block, x, y, z);
|
||||
return true;
|
||||
}
|
||||
|
||||
@@ -67,19 +63,16 @@ public class TableRender implements ISimpleBlockRenderingHandler
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean shouldRender3DInInventory (int modelID)
|
||||
{
|
||||
public boolean shouldRender3DInInventory(int modelID) {
|
||||
return true;
|
||||
}
|
||||
|
||||
@Override
|
||||
public int getRenderId ()
|
||||
{
|
||||
public int getRenderId() {
|
||||
return model;
|
||||
}
|
||||
|
||||
public static void renderStandardInvBlock (RenderBlocks renderblocks, Block block, int meta)
|
||||
{
|
||||
public static void renderStandardInvBlock(RenderBlocks renderblocks, Block block, int meta) {
|
||||
Tessellator tessellator = Tessellator.instance;
|
||||
GL11.glTranslatef(-0.5F, -0.5F, -0.5F);
|
||||
tessellator.startDrawingQuads();
|
||||
|
||||
Reference in new issue
Block a user