Skip to content

Commit

Permalink
Fix crash when trying to upgrade a dyed shulker box. Closes #22
Browse files Browse the repository at this point in the history
  • Loading branch information
alexbegt committed Jan 7, 2021
1 parent 54446d2 commit 57db93a
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 6 deletions.
Expand Up @@ -272,13 +272,11 @@ public IronShulkerBoxesTypes getType() {
}

@Nullable
@OnlyIn(Dist.CLIENT)
public static DyeColor getColorFromItem(Item itemIn) {
return getColorFromBlock(Block.getBlockFromItem(itemIn));
}

@Nullable
@OnlyIn(Dist.CLIENT)
public static DyeColor getColorFromBlock(Block blockIn) {
return blockIn instanceof GenericIronShulkerBlock ? ((GenericIronShulkerBlock) blockIn).getColor() : null;
}
Expand Down
Expand Up @@ -19,7 +19,6 @@
import net.minecraft.nbt.CompoundNBT;
import net.minecraft.tileentity.ITickableTileEntity;
import net.minecraft.tileentity.LockableLootTileEntity;
import net.minecraft.tileentity.ShulkerBoxTileEntity;
import net.minecraft.tileentity.TileEntityType;
import net.minecraft.util.Direction;
import net.minecraft.util.NonNullList;
Expand All @@ -31,8 +30,6 @@
import net.minecraft.util.math.vector.Vector3d;
import net.minecraft.util.text.ITextComponent;
import net.minecraft.util.text.TranslationTextComponent;
import net.minecraftforge.api.distmarker.Dist;
import net.minecraftforge.api.distmarker.OnlyIn;

import javax.annotation.Nullable;
import java.util.List;
Expand Down Expand Up @@ -313,7 +310,6 @@ public float getProgress(float p_190585_1_) {
}

@Nullable
@OnlyIn(Dist.CLIENT)
public DyeColor getColor() {
if (this.needsColorFromWorld) {
this.color = GenericIronShulkerBlock.getColorFromBlock(this.getBlockState().getBlock());
Expand Down

0 comments on commit 57db93a

Please sign in to comment.