geforkt von Mirrors/AxiomPaperPlugin
backport1.20.1 #6
@ -8,7 +8,7 @@ plugins {
|
|||||||
}
|
}
|
||||||
|
|
||||||
group = "com.moulberry.axiom"
|
group = "com.moulberry.axiom"
|
||||||
version = "1.5.6"
|
version = "1.5.7"
|
||||||
description = "Serverside component for Axiom on Paper"
|
description = "Serverside component for Axiom on Paper"
|
||||||
|
|
||||||
java {
|
java {
|
||||||
|
@ -16,7 +16,9 @@ import net.minecraft.server.level.ServerPlayer;
|
|||||||
import net.minecraft.world.InteractionHand;
|
import net.minecraft.world.InteractionHand;
|
||||||
import net.minecraft.world.entity.ai.village.poi.PoiType;
|
import net.minecraft.world.entity.ai.village.poi.PoiType;
|
||||||
import net.minecraft.world.entity.ai.village.poi.PoiTypes;
|
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.ItemStack;
|
||||||
|
import net.minecraft.world.item.context.BlockPlaceContext;
|
||||||
import net.minecraft.world.level.block.Block;
|
import net.minecraft.world.level.block.Block;
|
||||||
import net.minecraft.world.level.block.EntityBlock;
|
import net.minecraft.world.level.block.EntityBlock;
|
||||||
import net.minecraft.world.level.block.entity.BlockEntity;
|
import net.minecraft.world.level.block.entity.BlockEntity;
|
||||||
@ -115,6 +117,8 @@ public class SetBlockPacketListener implements PluginMessageListener {
|
|||||||
|
|
||||||
CraftWorld world = player.level().getWorld();
|
CraftWorld world = player.level().getWorld();
|
||||||
|
|
||||||
|
BlockPlaceContext blockPlaceContext = new BlockPlaceContext(player, hand, player.getItemInHand(hand), blockHit);
|
||||||
|
|
||||||
// Update blocks
|
// Update blocks
|
||||||
if (updateNeighbors) {
|
if (updateNeighbors) {
|
||||||
int count = 0;
|
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) {
|
if (sequenceId >= 0) {
|
||||||
player.connection.ackBlockChangesUpTo(sequenceId);
|
player.connection.ackBlockChangesUpTo(sequenceId);
|
||||||
}
|
}
|
||||||
|
Laden…
In neuem Issue referenzieren
Einen Benutzer sperren