mirror of
https://github.com/SquidDev-CC/CC-Tweaked
synced 2025-10-23 09:57:39 +00:00
Fix several craches caused by incorrect NonNull annotations.
Awfully sorry about this. It appears that Minecraft's annotations are occasionally wrong. IntelliJ will automatically add "not-null" checks on these annotations, resulting in crashes when they are actually null.
This commit is contained in:
@@ -29,6 +29,7 @@ import net.minecraft.world.World;
|
||||
import org.apache.commons.lang3.tuple.Pair;
|
||||
|
||||
import javax.annotation.Nonnull;
|
||||
import javax.annotation.Nullable;
|
||||
import javax.vecmath.Matrix4f;
|
||||
import java.util.ArrayList;
|
||||
import java.util.HashMap;
|
||||
@@ -103,7 +104,7 @@ public class TurtleSmartItemModel implements IBakedModel, IResourceManagerReload
|
||||
{
|
||||
@Nonnull
|
||||
@Override
|
||||
public IBakedModel handleItemState( @Nonnull IBakedModel originalModel, ItemStack stack, @Nonnull World world, @Nonnull EntityLivingBase entity)
|
||||
public IBakedModel handleItemState( @Nonnull IBakedModel originalModel, ItemStack stack, @Nullable World world, @Nullable EntityLivingBase entity)
|
||||
{
|
||||
ItemTurtleBase turtle = (ItemTurtleBase) stack.getItem();
|
||||
ComputerFamily family = turtle.getFamily( stack );
|
||||
|
Reference in New Issue
Block a user