Mirror von
https://github.com/Moulberry/AxiomPaperPlugin.git
synchronisiert 2024-11-12 19:20:11 +01:00
Copy custom block entity tag when doing custom placement
Dieser Commit ist enthalten in:
Ursprung
bb57b07323
Commit
53ee4ee813
@ -8,7 +8,7 @@ plugins {
|
||||
}
|
||||
|
||||
group = "com.moulberry.axiom"
|
||||
version = "1.5.6"
|
||||
version = "1.5.7"
|
||||
description = "Serverside component for Axiom on Paper"
|
||||
|
||||
java {
|
||||
|
@ -16,7 +16,9 @@ import net.minecraft.server.level.ServerPlayer;
|
||||
import net.minecraft.world.InteractionHand;
|
||||
import net.minecraft.world.entity.ai.village.poi.PoiType;
|
||||
import net.minecraft.world.entity.ai.village.poi.PoiTypes;
|
||||
import net.minecraft.world.item.BlockItem;
|
||||
import net.minecraft.world.item.ItemStack;
|
||||
import net.minecraft.world.item.context.BlockPlaceContext;
|
||||
import net.minecraft.world.level.block.Block;
|
||||
import net.minecraft.world.level.block.EntityBlock;
|
||||
import net.minecraft.world.level.block.entity.BlockEntity;
|
||||
@ -115,6 +117,8 @@ public class SetBlockPacketListener implements PluginMessageListener {
|
||||
|
||||
CraftWorld world = player.level().getWorld();
|
||||
|
||||
BlockPlaceContext blockPlaceContext = new BlockPlaceContext(player, hand, player.getItemInHand(hand), blockHit);
|
||||
|
||||
// Update blocks
|
||||
if (updateNeighbors) {
|
||||
int count = 0;
|
||||
@ -252,6 +256,10 @@ public class SetBlockPacketListener implements PluginMessageListener {
|
||||
}
|
||||
}
|
||||
|
||||
if (!breaking) {
|
||||
BlockItem.updateCustomBlockEntityTag(player.level(), player, blockPlaceContext.getClickedPos(), player.getItemInHand(hand));
|
||||
}
|
||||
|
||||
if (sequenceId >= 0) {
|
||||
player.connection.ackBlockChangesUpTo(sequenceId);
|
||||
}
|
||||
|
Laden…
In neuem Issue referenzieren
Einen Benutzer sperren