mirror of
https://github.com/Sollace/Unicopia.git
synced 2024-11-23 21:38:00 +01:00
Fixed server crash when ticking jar items
This commit is contained in:
parent
cda4e5b0b6
commit
da38726bc0
2 changed files with 0 additions and 16 deletions
|
@ -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) {
|
||||
|
|
|
@ -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
|
||||
|
|
Loading…
Reference in a new issue