mirror of
https://github.com/PurpurMC/Purpur.git
synced 2026-02-18 08:57:44 +01:00
Update to 1.18.2
This commit is contained in:
@@ -37,10 +37,10 @@ index 8a5f6d955577a8f8a63a846169a63fe9685b6321..eb595d1b6ef59ca18ce1c3c3ccd2aa05
|
||||
|
||||
@Nullable
|
||||
diff --git a/src/main/java/net/minecraft/world/level/block/Block.java b/src/main/java/net/minecraft/world/level/block/Block.java
|
||||
index 9a4858eb3a3289d3da9c1984d94ba7244db254bf..caff1d4ae9f7c2fe7faf1305b1e60528cc00aeb0 100644
|
||||
index 5dede264fc3cb045b6330e35123b5b416c1b1f56..10fa3a544d01ce3cdb72e72952073d86913bd65b 100644
|
||||
--- a/src/main/java/net/minecraft/world/level/block/Block.java
|
||||
+++ b/src/main/java/net/minecraft/world/level/block/Block.java
|
||||
@@ -18,6 +18,9 @@ import net.minecraft.core.Direction;
|
||||
@@ -20,6 +20,9 @@ import net.minecraft.core.Holder;
|
||||
import net.minecraft.core.IdMapper;
|
||||
import net.minecraft.core.NonNullList;
|
||||
import net.minecraft.core.Registry;
|
||||
@@ -50,15 +50,15 @@ index 9a4858eb3a3289d3da9c1984d94ba7244db254bf..caff1d4ae9f7c2fe7faf1305b1e60528
|
||||
import net.minecraft.network.chat.Component;
|
||||
import net.minecraft.network.chat.MutableComponent;
|
||||
import net.minecraft.network.chat.TranslatableComponent;
|
||||
@@ -26,6 +29,7 @@ import net.minecraft.stats.Stats;
|
||||
@@ -27,6 +30,7 @@ import net.minecraft.server.level.ServerLevel;
|
||||
import net.minecraft.stats.Stats;
|
||||
import net.minecraft.tags.BlockTags;
|
||||
import net.minecraft.tags.Tag;
|
||||
import net.minecraft.util.Mth;
|
||||
+import net.minecraft.world.Nameable;
|
||||
import net.minecraft.world.damagesource.DamageSource;
|
||||
import net.minecraft.world.entity.Entity;
|
||||
import net.minecraft.world.entity.EntityType;
|
||||
@@ -323,7 +327,7 @@ public class Block extends BlockBehaviour implements ItemLike {
|
||||
@@ -325,7 +329,7 @@ public class Block extends BlockBehaviour implements ItemLike {
|
||||
public static void dropResources(BlockState state, LevelAccessor world, BlockPos pos, @Nullable BlockEntity blockEntity) {
|
||||
if (world instanceof ServerLevel) {
|
||||
Block.getDrops(state, (ServerLevel) world, pos, blockEntity).forEach((itemstack) -> {
|
||||
@@ -67,7 +67,7 @@ index 9a4858eb3a3289d3da9c1984d94ba7244db254bf..caff1d4ae9f7c2fe7faf1305b1e60528
|
||||
});
|
||||
state.spawnAfterBreak((ServerLevel) world, pos, ItemStack.EMPTY);
|
||||
}
|
||||
@@ -339,7 +343,7 @@ public class Block extends BlockBehaviour implements ItemLike {
|
||||
@@ -341,7 +345,7 @@ public class Block extends BlockBehaviour implements ItemLike {
|
||||
io.papermc.paper.event.block.BlockBreakBlockEvent event = new io.papermc.paper.event.block.BlockBreakBlockEvent(org.bukkit.craftbukkit.block.CraftBlock.at(world, pos), org.bukkit.craftbukkit.block.CraftBlock.at(world, source), items);
|
||||
event.callEvent();
|
||||
for (var drop : event.getDrops()) {
|
||||
@@ -76,7 +76,7 @@ index 9a4858eb3a3289d3da9c1984d94ba7244db254bf..caff1d4ae9f7c2fe7faf1305b1e60528
|
||||
}
|
||||
state.spawnAfterBreak(world.getMinecraftWorld(), pos, ItemStack.EMPTY);
|
||||
}
|
||||
@@ -350,13 +354,53 @@ public class Block extends BlockBehaviour implements ItemLike {
|
||||
@@ -352,13 +356,53 @@ public class Block extends BlockBehaviour implements ItemLike {
|
||||
public static void dropResources(BlockState state, Level world, BlockPos pos, @Nullable BlockEntity blockEntity, Entity entity, ItemStack stack) {
|
||||
if (world instanceof ServerLevel) {
|
||||
Block.getDrops(state, (ServerLevel) world, pos, blockEntity, entity, stack).forEach((itemstack1) -> {
|
||||
@@ -132,10 +132,10 @@ index 9a4858eb3a3289d3da9c1984d94ba7244db254bf..caff1d4ae9f7c2fe7faf1305b1e60528
|
||||
float f = EntityType.ITEM.getHeight() / 2.0F;
|
||||
// Paper start - don't convert potentially massive numbers to floats
|
||||
diff --git a/src/main/java/net/minecraft/world/level/block/entity/BlockEntity.java b/src/main/java/net/minecraft/world/level/block/entity/BlockEntity.java
|
||||
index 5601d0c2fe635a2a4f073c333531e1a8adf1833c..9e7d2fbdfa89736807d2025a5814ddd83122ad5e 100644
|
||||
index 905ec2917fe1e5ef08b8a930afb0c0d8432fa444..9cd7a1100783c602055c29ac59027ffadcd87640 100644
|
||||
--- a/src/main/java/net/minecraft/world/level/block/entity/BlockEntity.java
|
||||
+++ b/src/main/java/net/minecraft/world/level/block/entity/BlockEntity.java
|
||||
@@ -5,6 +5,8 @@ import net.minecraft.CrashReportCategory;
|
||||
@@ -6,6 +6,8 @@ import net.minecraft.CrashReportCategory;
|
||||
import net.minecraft.core.BlockPos;
|
||||
import net.minecraft.core.Registry;
|
||||
import net.minecraft.nbt.CompoundTag;
|
||||
|
||||
Reference in New Issue
Block a user