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 TurtleSmartItemModel( IBakedModel familyModel, IBakedModel colourModel )
|
|||
@Override
|
||||
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();
|
||||
int colour = turtle.getColour( stack );
|
||||
ITurtleUpgrade leftUpgrade = turtle.getUpgrade( stack, TurtleSide.LEFT );
|
||||
|
|
Loading…
Reference in New Issue