Merge pull request #255 from Kaloyan501/1.21.1

Fix parchment mappings so they are actually used and fix #251
This commit is contained in:
DrMangoTea
2025-11-03 20:01:07 +01:00
committed by GitHub
3 changed files with 17 additions and 14 deletions

View File

@@ -14,6 +14,7 @@ import net.minecraft.nbt.CompoundTag;
import net.minecraft.network.chat.Component;
import net.minecraft.world.entity.item.ItemEntity;
import net.minecraft.world.item.ItemStack;
import net.minecraft.world.item.Items;
import net.minecraft.world.level.block.entity.BlockEntityType;
import net.minecraft.world.level.block.state.BlockState;
import net.minecraft.world.phys.Vec3;
@@ -79,13 +80,17 @@ public class BlastFurnaceHatchBlockEntity extends SmartBlockEntity implements IH
public void dropItems(){
if(level.getBlockState(getBlockPos().below()).isAir()){
Vec3 dropVec = VecHelper.getCenterOf(worldPosition)
.add(0, -12 / 16f, 0);
ItemEntity dropped = new ItemEntity(level, dropVec.x, dropVec.y, dropVec.z, inventory.getItem(0).copy());
dropped.setDefaultPickUpDelay();
dropped.setDeltaMovement(0, -.25f, 0);
level.addFreshEntity(dropped);
inventory.setStackInSlot(0, ItemStack.EMPTY);
if (inventory.getItem(0).getItem() == Items.AIR){
return;
} else {
Vec3 dropVec = VecHelper.getCenterOf(worldPosition)
.add(0, -12 / 16f, 0);
ItemEntity dropped = new ItemEntity(level, dropVec.x, dropVec.y, dropVec.z, inventory.getItem(0).copy());
dropped.setDefaultPickUpDelay();
dropped.setDeltaMovement(0, -.25f, 0);
level.addFreshEntity(dropped);
inventory.setStackInSlot(0, ItemStack.EMPTY);
}
}
}