mirror of
https://github.com/SquidDev-CC/CC-Tweaked
synced 2025-07-07 04:22:53 +00:00
Fall back to the default item when rendering non-turtles
Closes #1328. This isn't an actual fix - I have no clue what's going on there - but it should be less crashy.
This commit is contained in:
parent
58f2c0bd71
commit
68f6fa9343
@ -111,6 +111,9 @@ public class TurtleSmartItemModel implements IBakedModel
|
|||||||
@Override
|
@Override
|
||||||
public IBakedModel resolve( @Nonnull IBakedModel originalModel, @Nonnull ItemStack stack, @Nullable ClientWorld world, @Nullable LivingEntity entity )
|
public IBakedModel resolve( @Nonnull IBakedModel originalModel, @Nonnull ItemStack stack, @Nullable ClientWorld world, @Nullable LivingEntity entity )
|
||||||
{
|
{
|
||||||
|
// Should never happen, but just in case!
|
||||||
|
if ( !(stack.getItem() instanceof ItemTurtle) ) return familyModel;
|
||||||
|
|
||||||
ItemTurtle turtle = (ItemTurtle) stack.getItem();
|
ItemTurtle turtle = (ItemTurtle) stack.getItem();
|
||||||
int colour = turtle.getColour( stack );
|
int colour = turtle.getColour( stack );
|
||||||
ITurtleUpgrade leftUpgrade = turtle.getUpgrade( stack, TurtleSide.LEFT );
|
ITurtleUpgrade leftUpgrade = turtle.getUpgrade( stack, TurtleSide.LEFT );
|
||||||
|
Loading…
x
Reference in New Issue
Block a user