From da38726bc09529454ebd75f420b63fb3d28656c7 Mon Sep 17 00:00:00 2001 From: Sollace Date: Fri, 26 Apr 2024 15:14:13 +0100 Subject: [PATCH] Fixed server crash when ticking jar items --- .../com/minelittlepony/unicopia/block/JarBlock.java | 11 ----------- .../minelittlepony/unicopia/item/EmptyJarItem.java | 5 ----- 2 files changed, 16 deletions(-) diff --git a/src/main/java/com/minelittlepony/unicopia/block/JarBlock.java b/src/main/java/com/minelittlepony/unicopia/block/JarBlock.java index 2bf5777b..01f8bb35 100644 --- a/src/main/java/com/minelittlepony/unicopia/block/JarBlock.java +++ b/src/main/java/com/minelittlepony/unicopia/block/JarBlock.java @@ -84,17 +84,6 @@ public class JarBlock extends AbstractGlassBlock implements Waterloggable { } } - @Deprecated - @Override - public void onStateReplaced(BlockState state, World world, BlockPos pos, BlockState newState, boolean moved) { - super.onStateReplaced(state, world, pos, newState, moved); - } - - @Override - public void onBreak(World world, BlockPos pos, BlockState state, PlayerEntity player) { - super.onBreak(world, pos, state, player); - } - @Override public void onDestroyedByExplosion(World world, BlockPos pos, Explosion explosion) { if (asItem() instanceof WeatherJarItem jar) { diff --git a/src/main/java/com/minelittlepony/unicopia/item/EmptyJarItem.java b/src/main/java/com/minelittlepony/unicopia/item/EmptyJarItem.java index e156ccb5..0f53a535 100644 --- a/src/main/java/com/minelittlepony/unicopia/item/EmptyJarItem.java +++ b/src/main/java/com/minelittlepony/unicopia/item/EmptyJarItem.java @@ -1,12 +1,9 @@ package com.minelittlepony.unicopia.item; -import com.minelittlepony.unicopia.block.UBlocks; import com.minelittlepony.unicopia.entity.IItemEntity; import com.minelittlepony.unicopia.entity.ItemImpl; -import net.fabricmc.fabric.api.blockrenderlayer.v1.BlockRenderLayerMap; import net.minecraft.block.Block; -import net.minecraft.client.render.RenderLayer; import net.minecraft.entity.EntityType; import net.minecraft.entity.ItemEntity; import net.minecraft.entity.LightningEntity; @@ -24,8 +21,6 @@ public class EmptyJarItem extends BlockItem implements ItemImpl.GroundTickCallba public ActionResult onGroundTick(IItemEntity item) { ItemEntity entity = item.get().asEntity(); - BlockRenderLayerMap.INSTANCE.putBlocks(RenderLayer.getCutout(), UBlocks.CLOUD_JAR, UBlocks.STORM_JAR, UBlocks.LIGHTNING_JAR, UBlocks.ZAP_JAR); - entity.setInvulnerable(true); if (!entity.getWorld().isClient