mirror of
https://github.com/Creators-of-Create/Create.git
synced 2024-12-29 08:27:03 +01:00
Fix cart contraption pickup
This commit is contained in:
parent
737b7ad255
commit
6feacd3fc2
1 changed files with 2 additions and 2 deletions
|
@ -2,7 +2,6 @@ package com.simibubi.create.content.contraptions.components.structureMovement.mo
|
||||||
|
|
||||||
import java.io.IOException;
|
import java.io.IOException;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
import java.util.Optional;
|
|
||||||
|
|
||||||
import javax.annotation.Nullable;
|
import javax.annotation.Nullable;
|
||||||
|
|
||||||
|
@ -42,7 +41,6 @@ import net.minecraft.util.Direction;
|
||||||
import net.minecraft.util.NonNullList;
|
import net.minecraft.util.NonNullList;
|
||||||
import net.minecraft.util.math.BlockPos;
|
import net.minecraft.util.math.BlockPos;
|
||||||
import net.minecraft.util.text.TextFormatting;
|
import net.minecraft.util.text.TextFormatting;
|
||||||
import net.minecraft.util.text.TranslationTextComponent;
|
|
||||||
import net.minecraft.world.World;
|
import net.minecraft.world.World;
|
||||||
import net.minecraftforge.event.entity.player.PlayerInteractEvent;
|
import net.minecraftforge.event.entity.player.PlayerInteractEvent;
|
||||||
import net.minecraftforge.eventbus.api.SubscribeEvent;
|
import net.minecraftforge.eventbus.api.SubscribeEvent;
|
||||||
|
@ -209,6 +207,8 @@ public class MinecartContraptionItem extends Item {
|
||||||
entity = entity.getRidingEntity();
|
entity = entity.getRidingEntity();
|
||||||
if (!(entity instanceof AbstractMinecartEntity))
|
if (!(entity instanceof AbstractMinecartEntity))
|
||||||
return;
|
return;
|
||||||
|
if (!entity.isAlive())
|
||||||
|
return;
|
||||||
AbstractMinecartEntity cart = (AbstractMinecartEntity) entity;
|
AbstractMinecartEntity cart = (AbstractMinecartEntity) entity;
|
||||||
Type type = cart.getMinecartType();
|
Type type = cart.getMinecartType();
|
||||||
if (type != Type.RIDEABLE && type != Type.FURNACE && type != Type.CHEST)
|
if (type != Type.RIDEABLE && type != Type.FURNACE && type != Type.CHEST)
|
||||||
|
|
Loading…
Reference in a new issue