mirror of
https://github.com/GTNewHorizons/TinkersConstruct.git
synced 2026-11-27 23:45:48 +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
@@ -6,119 +6,100 @@ import net.minecraft.client.renderer.RenderBlocks;
|
||||
import net.minecraft.world.IBlockAccess;
|
||||
import tconstruct.util.ItemHelper;
|
||||
|
||||
public class BarricadeRender implements ISimpleBlockRenderingHandler
|
||||
{
|
||||
public class BarricadeRender implements ISimpleBlockRenderingHandler {
|
||||
public static int model;
|
||||
|
||||
public BarricadeRender()
|
||||
{
|
||||
public BarricadeRender() {
|
||||
model = RenderingRegistry.getNextAvailableRenderId();
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean renderWorldBlock (IBlockAccess world, int x, int y, int z, Block barricade, int modelId, RenderBlocks renderer)
|
||||
{
|
||||
if (modelId == model)
|
||||
{
|
||||
public boolean renderWorldBlock(
|
||||
IBlockAccess world, int x, int y, int z, Block barricade, int modelId, RenderBlocks renderer) {
|
||||
if (modelId == model) {
|
||||
int meta = world.getBlockMetadata(x, y, z);
|
||||
int type = meta % 4;
|
||||
|
||||
if (meta / 4 == 0)
|
||||
{
|
||||
if (meta / 4 == 0) {
|
||||
// if (type >= 0)
|
||||
// TODO setRenderBounds
|
||||
renderer.setRenderBounds(0.125, 0.0, 0.5, 0.375, 1.0, 0.75);
|
||||
renderer.renderStandardBlock(barricade, x, y, z);
|
||||
|
||||
if (type >= 1)
|
||||
{
|
||||
if (type >= 1) {
|
||||
renderer.setRenderBounds(0.625, 0.0, 0.5, 0.875, 1.0, 0.75);
|
||||
renderer.renderStandardBlock(barricade, x, y, z);
|
||||
}
|
||||
|
||||
if (type >= 2)
|
||||
{
|
||||
if (type >= 2) {
|
||||
renderer.setRenderBounds(0.0, 0.125, 0.25, 1.0, 0.375, 0.5);
|
||||
renderer.renderStandardBlock(barricade, x, y, z);
|
||||
}
|
||||
|
||||
if (type >= 3)
|
||||
{
|
||||
if (type >= 3) {
|
||||
renderer.setRenderBounds(0.0, 0.625, 0.25, 1.0, 0.875, 0.5);
|
||||
renderer.renderStandardBlock(barricade, x, y, z);
|
||||
}
|
||||
}
|
||||
|
||||
if (meta / 4 == 1)
|
||||
{
|
||||
if (meta / 4 == 1) {
|
||||
// if (type >= 0)
|
||||
renderer.setRenderBounds(0.25, 0.0, 0.125, 0.5, 1.0, 0.375);
|
||||
renderer.renderStandardBlock(barricade, x, y, z);
|
||||
|
||||
if (type >= 1)
|
||||
{
|
||||
if (type >= 1) {
|
||||
renderer.setRenderBounds(0.25, 0.0, 0.625, 0.5, 1.0, 0.875);
|
||||
renderer.renderStandardBlock(barricade, x, y, z);
|
||||
}
|
||||
|
||||
if (type >= 2)
|
||||
{
|
||||
if (type >= 2) {
|
||||
renderer.setRenderBounds(0.5, 0.125, 0.0, 0.75, 0.375, 1.0);
|
||||
renderer.renderStandardBlock(barricade, x, y, z);
|
||||
}
|
||||
|
||||
if (type >= 3)
|
||||
{
|
||||
if (type >= 3) {
|
||||
renderer.setRenderBounds(0.5, 0.625, 0.0, 0.75, 0.875, 1.0);
|
||||
renderer.renderStandardBlock(barricade, x, y, z);
|
||||
}
|
||||
}
|
||||
|
||||
if (meta / 4 == 2)
|
||||
{
|
||||
if (meta / 4 == 2) {
|
||||
// if (type >= 0)
|
||||
renderer.setRenderBounds(0.125, 0.0, 0.25, 0.375, 1.0, 0.5);
|
||||
renderer.renderStandardBlock(barricade, x, y, z);
|
||||
|
||||
if (type >= 1)
|
||||
{
|
||||
if (type >= 1) {
|
||||
renderer.setRenderBounds(0.625, 0.0, 0.25, 0.875, 1.0, 0.5);
|
||||
renderer.renderStandardBlock(barricade, x, y, z);
|
||||
}
|
||||
|
||||
if (type >= 2)
|
||||
{
|
||||
if (type >= 2) {
|
||||
renderer.setRenderBounds(0.0, 0.125, 0.5, 1.0, 0.375, 0.75);
|
||||
renderer.renderStandardBlock(barricade, x, y, z);
|
||||
}
|
||||
|
||||
if (type >= 3)
|
||||
{
|
||||
if (type >= 3) {
|
||||
renderer.setRenderBounds(0.0, 0.625, 0.5, 1.0, 0.875, 0.75);
|
||||
renderer.renderStandardBlock(barricade, x, y, z);
|
||||
}
|
||||
}
|
||||
|
||||
if (meta / 4 == 3)
|
||||
{
|
||||
if (meta / 4 == 3) {
|
||||
// if (type >= 0)
|
||||
renderer.setRenderBounds(0.5, 0.0, 0.125, 0.75, 1.0, 0.375);
|
||||
renderer.renderStandardBlock(barricade, x, y, z);
|
||||
|
||||
if (type >= 1)
|
||||
{
|
||||
if (type >= 1) {
|
||||
renderer.setRenderBounds(0.5, 0.0, 0.625, 0.75, 1.0, 0.875);
|
||||
renderer.renderStandardBlock(barricade, x, y, z);
|
||||
}
|
||||
|
||||
if (type >= 2)
|
||||
{
|
||||
if (type >= 2) {
|
||||
renderer.setRenderBounds(0.25, 0.125, 0.0, 0.5, 0.375, 1.0);
|
||||
renderer.renderStandardBlock(barricade, x, y, z);
|
||||
}
|
||||
|
||||
if (type >= 3)
|
||||
{
|
||||
if (type >= 3) {
|
||||
renderer.setRenderBounds(0.25, 0.625, 0.0, 0.5, 0.875, 1.0);
|
||||
renderer.renderStandardBlock(barricade, x, y, z);
|
||||
}
|
||||
@@ -130,10 +111,8 @@ public class BarricadeRender implements ISimpleBlockRenderingHandler
|
||||
}
|
||||
|
||||
@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) {
|
||||
renderer.setRenderBounds(0.375F, 0.0F, 0.375F, 0.625F, 1.0F, 0.625F);
|
||||
ItemHelper.renderStandardInvBlock(renderer, block, metadata);
|
||||
renderer.setRenderBounds(0.375F, 0.375F, 0.0F, 0.625F, 0.625F, 1.0F);
|
||||
@@ -142,15 +121,12 @@ public class BarricadeRender implements ISimpleBlockRenderingHandler
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean shouldRender3DInInventory (int modelId)
|
||||
{
|
||||
public boolean shouldRender3DInInventory(int modelId) {
|
||||
return true;
|
||||
}
|
||||
|
||||
@Override
|
||||
public int getRenderId ()
|
||||
{
|
||||
public int getRenderId() {
|
||||
return model;
|
||||
}
|
||||
|
||||
}
|
||||
Reference in new issue
Block a user