From 0493df938f415fe16279f6a12f868a89832c2ba5 Mon Sep 17 00:00:00 2001 From: Ellpeck Date: Mon, 20 Apr 2020 19:22:30 +0200 Subject: [PATCH] fixed pipe frames picking the wrong item in creative --- .../de/ellpeck/prettypipes/entities/PipeFrameEntity.java | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/main/java/de/ellpeck/prettypipes/entities/PipeFrameEntity.java b/src/main/java/de/ellpeck/prettypipes/entities/PipeFrameEntity.java index 45b1927..cce301b 100644 --- a/src/main/java/de/ellpeck/prettypipes/entities/PipeFrameEntity.java +++ b/src/main/java/de/ellpeck/prettypipes/entities/PipeFrameEntity.java @@ -23,6 +23,7 @@ import net.minecraft.util.Direction; import net.minecraft.util.Hand; import net.minecraft.util.SoundEvents; import net.minecraft.util.math.BlockPos; +import net.minecraft.util.math.RayTraceResult; import net.minecraft.world.GameRules; import net.minecraft.world.World; import net.minecraft.world.storage.MapData; @@ -155,6 +156,11 @@ public class PipeFrameEntity extends ItemFrameEntity implements IEntityAdditiona return false; } + @Override + public ItemStack getPickedResult(RayTraceResult target) { + return new ItemStack(Registry.pipeFrameItem); + } + @Override public IPacket createSpawnPacket() { return NetworkHooks.getEntitySpawningPacket(this);