mirror of
https://github.com/Thorfusion/Mekanism-Community-Edition.git
synced 2026-11-26 06:42:56 +00:00
Fixed Dynamic Tank crash, fixed certain blocks not rendering
This commit is contained in:
1 parent
20d40351cf
commit
83e9b84f1a
4 files changed
+6
-9
No files matched your search
@@ -140,7 +140,7 @@ public class CTMModelFactory implements IPerspectiveAwareModel
|
||||
{
|
||||
TextureCTM face = model.getFace(facing);
|
||||
|
||||
if(ctx == null || layer == face.layer)
|
||||
if(ctx == null || layer == state.getBlock().getBlockLayer())
|
||||
{
|
||||
ICTMBlock block = (ICTMBlock)state.getBlock();
|
||||
CTMData data = block.getCTMData(state);
|
||||
|
||||
@@ -9,7 +9,6 @@ import net.minecraft.client.Minecraft;
|
||||
import net.minecraft.client.renderer.block.model.IBakedModel;
|
||||
import net.minecraft.client.renderer.block.model.ModelResourceLocation;
|
||||
import net.minecraft.client.renderer.block.model.ModelRotation;
|
||||
import net.minecraft.util.BlockRenderLayer;
|
||||
import net.minecraft.util.ResourceLocation;
|
||||
import net.minecraftforge.client.event.ModelBakeEvent;
|
||||
import net.minecraftforge.client.event.TextureStitchEvent;
|
||||
@@ -79,6 +78,6 @@ public class CTMRegistry
|
||||
register(callbacks[0]);
|
||||
register(callbacks[1]);
|
||||
|
||||
return new TextureCTM(BlockRenderLayer.CUTOUT, callbacks);
|
||||
return new TextureCTM(callbacks);
|
||||
}
|
||||
}
|
||||
@@ -15,13 +15,10 @@ import net.minecraft.util.ResourceLocation;
|
||||
|
||||
public class TextureCTM
|
||||
{
|
||||
protected BlockRenderLayer layer;
|
||||
|
||||
public TextureSpriteCallback[] sprites;
|
||||
|
||||
public TextureCTM(BlockRenderLayer layer, TextureSpriteCallback[] sprites)
|
||||
public TextureCTM(TextureSpriteCallback[] sprites)
|
||||
{
|
||||
this.layer = layer;
|
||||
this.sprites = sprites;
|
||||
}
|
||||
|
||||
|
||||
@@ -580,7 +580,7 @@ public abstract class BlockBasic extends Block implements ICTMBlock
|
||||
return false;
|
||||
}
|
||||
|
||||
ItemStack copyStack = StackUtils.size(itemStack.copy(), 1);
|
||||
ItemStack copyStack = StackUtils.size(itemStack, 1);
|
||||
|
||||
if(FluidContainerUtils.isFluidContainer(itemStack))
|
||||
{
|
||||
@@ -1035,7 +1035,8 @@ public abstract class BlockBasic extends Block implements ICTMBlock
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean isBeaconBase(IBlockAccess worldObj, BlockPos pos, BlockPos beacon) {
|
||||
public boolean isBeaconBase(IBlockAccess worldObj, BlockPos pos, BlockPos beacon)
|
||||
{
|
||||
return BasicBlockType.get(worldObj.getBlockState(pos)).isBeaconBase;
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user