@@ -1,6 +1,6 @@
|
||||
--- a/net/minecraft/world/level/block/entity/TileEntityBrewingStand.java
|
||||
+++ b/net/minecraft/world/level/block/entity/TileEntityBrewingStand.java
|
||||
@@ -24,6 +24,20 @@
|
||||
@@ -25,6 +25,20 @@
|
||||
import net.minecraft.world.level.block.BlockBrewingStand;
|
||||
import net.minecraft.world.level.block.state.IBlockData;
|
||||
|
||||
@@ -21,7 +21,7 @@
|
||||
public class TileEntityBrewingStand extends TileEntityContainer implements IWorldInventory {
|
||||
|
||||
private static final int INGREDIENT_SLOT = 3;
|
||||
@@ -41,6 +55,36 @@
|
||||
@@ -42,6 +56,36 @@
|
||||
private Item ingredient;
|
||||
public int fuel;
|
||||
protected final IContainerProperties dataAccess;
|
||||
@@ -58,7 +58,7 @@
|
||||
|
||||
public TileEntityBrewingStand(BlockPosition blockposition, IBlockData iblockdata) {
|
||||
super(TileEntityTypes.BREWING_STAND, blockposition, iblockdata);
|
||||
@@ -108,8 +152,19 @@
|
||||
@@ -109,8 +153,19 @@
|
||||
ItemStack itemstack = (ItemStack) tileentitybrewingstand.items.get(4);
|
||||
|
||||
if (tileentitybrewingstand.fuel <= 0 && itemstack.is(Items.BLAZE_POWDER)) {
|
||||
@@ -80,7 +80,7 @@
|
||||
setChanged(world, blockposition, iblockdata);
|
||||
}
|
||||
|
||||
@@ -117,12 +172,17 @@
|
||||
@@ -118,12 +173,17 @@
|
||||
boolean flag1 = tileentitybrewingstand.brewTime > 0;
|
||||
ItemStack itemstack1 = (ItemStack) tileentitybrewingstand.items.get(3);
|
||||
|
||||
@@ -101,7 +101,7 @@
|
||||
setChanged(world, blockposition, iblockdata);
|
||||
} else if (!flag || !itemstack1.is(tileentitybrewingstand.ingredient)) {
|
||||
tileentitybrewingstand.brewTime = 0;
|
||||
@@ -130,7 +190,11 @@
|
||||
@@ -131,7 +191,11 @@
|
||||
}
|
||||
} else if (flag && tileentitybrewingstand.fuel > 0) {
|
||||
--tileentitybrewingstand.fuel;
|
||||
@@ -114,7 +114,7 @@
|
||||
tileentitybrewingstand.ingredient = itemstack1.getItem();
|
||||
setChanged(world, blockposition, iblockdata);
|
||||
}
|
||||
@@ -186,11 +250,33 @@
|
||||
@@ -187,11 +251,33 @@
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
--- a/net/minecraft/world/level/block/entity/TileEntityConduit.java
|
||||
+++ b/net/minecraft/world/level/block/entity/TileEntityConduit.java
|
||||
@@ -28,6 +28,11 @@
|
||||
@@ -27,6 +27,11 @@
|
||||
import net.minecraft.world.phys.AxisAlignedBB;
|
||||
import net.minecraft.world.phys.Vec3D;
|
||||
|
||||
@@ -12,7 +12,7 @@
|
||||
public class TileEntityConduit extends TileEntity {
|
||||
|
||||
private static final int BLOCK_REFRESH_RATE = 2;
|
||||
@@ -202,7 +207,7 @@
|
||||
@@ -201,7 +206,7 @@
|
||||
EntityHuman entityhuman = (EntityHuman) iterator.next();
|
||||
|
||||
if (blockposition.closerThan(entityhuman.blockPosition(), (double) j) && entityhuman.isInWaterOrRain()) {
|
||||
@@ -21,15 +21,15 @@
|
||||
}
|
||||
}
|
||||
|
||||
@@ -231,8 +236,13 @@
|
||||
@@ -230,8 +235,13 @@
|
||||
}
|
||||
|
||||
if (tileentityconduit.destroyTarget != null) {
|
||||
- world.playSound((EntityHuman) null, tileentityconduit.destroyTarget.getX(), tileentityconduit.destroyTarget.getY(), tileentityconduit.destroyTarget.getZ(), SoundEffects.CONDUIT_ATTACK_TARGET, SoundCategory.BLOCKS, 1.0F, 1.0F);
|
||||
- tileentityconduit.destroyTarget.hurt(DamageSource.MAGIC, 4.0F);
|
||||
- tileentityconduit.destroyTarget.hurt(world.damageSources().magic(), 4.0F);
|
||||
+ // CraftBukkit start
|
||||
+ CraftEventFactory.blockDamage = CraftBlock.at(world, blockposition);
|
||||
+ if (tileentityconduit.destroyTarget.hurt(DamageSource.MAGIC, 4.0F)) {
|
||||
+ if (tileentityconduit.destroyTarget.hurt(world.damageSources().magic(), 4.0F)) {
|
||||
+ world.playSound((EntityHuman) null, tileentityconduit.destroyTarget.getX(), tileentityconduit.destroyTarget.getY(), tileentityconduit.destroyTarget.getZ(), SoundEffects.CONDUIT_ATTACK_TARGET, SoundCategory.BLOCKS, 1.0F, 1.0F);
|
||||
+ }
|
||||
+ CraftEventFactory.blockDamage = null;
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
--- a/net/minecraft/world/level/block/entity/TileEntityFurnace.java
|
||||
+++ b/net/minecraft/world/level/block/entity/TileEntityFurnace.java
|
||||
@@ -46,6 +46,20 @@
|
||||
@@ -47,6 +47,20 @@
|
||||
import net.minecraft.world.level.block.state.IBlockData;
|
||||
import net.minecraft.world.phys.Vec3D;
|
||||
|
||||
@@ -21,7 +21,7 @@
|
||||
public abstract class TileEntityFurnace extends TileEntityContainer implements IWorldInventory, RecipeHolder, AutoRecipeOutput {
|
||||
|
||||
protected static final int SLOT_INPUT = 0;
|
||||
@@ -114,7 +128,7 @@
|
||||
@@ -115,7 +129,7 @@
|
||||
}
|
||||
};
|
||||
this.recipesUsed = new Object2IntOpenHashMap();
|
||||
@@ -30,7 +30,7 @@
|
||||
}
|
||||
|
||||
public static Map<Item, Integer> getFuel() {
|
||||
@@ -182,6 +196,40 @@
|
||||
@@ -183,6 +197,40 @@
|
||||
return map;
|
||||
}
|
||||
|
||||
@@ -71,7 +71,7 @@
|
||||
private static boolean isNeverAFurnaceFuel(Item item) {
|
||||
return item.builtInRegistryHolder().is(TagsItem.NON_FLAMMABLE_WOOD);
|
||||
}
|
||||
@@ -270,7 +318,7 @@
|
||||
@@ -271,7 +319,7 @@
|
||||
IRecipe irecipe;
|
||||
|
||||
if (flag2) {
|
||||
@@ -80,10 +80,10 @@
|
||||
} else {
|
||||
irecipe = null;
|
||||
}
|
||||
@@ -278,9 +326,20 @@
|
||||
@@ -279,9 +327,20 @@
|
||||
int i = tileentityfurnace.getMaxStackSize();
|
||||
|
||||
if (!tileentityfurnace.isLit() && canBurn(irecipe, tileentityfurnace.items, i)) {
|
||||
if (!tileentityfurnace.isLit() && canBurn(world.registryAccess(), irecipe, tileentityfurnace.items, i)) {
|
||||
- tileentityfurnace.litTime = tileentityfurnace.getBurnDuration(itemstack);
|
||||
+ // CraftBukkit start
|
||||
+ CraftItemStack fuel = CraftItemStack.asCraftMirror(itemstack);
|
||||
@@ -103,10 +103,10 @@
|
||||
flag1 = true;
|
||||
if (flag3) {
|
||||
Item item = itemstack.getItem();
|
||||
@@ -296,11 +355,23 @@
|
||||
@@ -297,11 +356,23 @@
|
||||
}
|
||||
|
||||
if (tileentityfurnace.isLit() && canBurn(irecipe, tileentityfurnace.items, i)) {
|
||||
if (tileentityfurnace.isLit() && canBurn(world.registryAccess(), irecipe, tileentityfurnace.items, i)) {
|
||||
+ // CraftBukkit start
|
||||
+ if (irecipe != null && tileentityfurnace.cookingProgress == 0) {
|
||||
+ CraftItemStack source = CraftItemStack.asCraftMirror(tileentityfurnace.items.get(0));
|
||||
@@ -123,20 +123,20 @@
|
||||
if (tileentityfurnace.cookingProgress == tileentityfurnace.cookingTotalTime) {
|
||||
tileentityfurnace.cookingProgress = 0;
|
||||
tileentityfurnace.cookingTotalTime = getTotalCookTime(world, tileentityfurnace);
|
||||
- if (burn(irecipe, tileentityfurnace.items, i)) {
|
||||
+ if (burn(tileentityfurnace.level, tileentityfurnace.worldPosition, irecipe, tileentityfurnace.items, i)) { // CraftBukkit
|
||||
- if (burn(world.registryAccess(), irecipe, tileentityfurnace.items, i)) {
|
||||
+ if (burn(tileentityfurnace.level, tileentityfurnace.worldPosition, world.registryAccess(), irecipe, tileentityfurnace.items, i)) { // CraftBukkit
|
||||
tileentityfurnace.setRecipeUsed(irecipe);
|
||||
}
|
||||
|
||||
@@ -339,17 +410,44 @@
|
||||
@@ -340,17 +411,44 @@
|
||||
}
|
||||
}
|
||||
|
||||
- private static boolean burn(@Nullable IRecipe<?> irecipe, NonNullList<ItemStack> nonnulllist, int i) {
|
||||
+ private static boolean burn(World world, BlockPosition blockposition, @Nullable IRecipe<?> irecipe, NonNullList<ItemStack> nonnulllist, int i) { // CraftBukkit
|
||||
if (irecipe != null && canBurn(irecipe, nonnulllist, i)) {
|
||||
- private static boolean burn(IRegistryCustom iregistrycustom, @Nullable IRecipe<?> irecipe, NonNullList<ItemStack> nonnulllist, int i) {
|
||||
+ private static boolean burn(World world, BlockPosition blockposition, IRegistryCustom iregistrycustom, @Nullable IRecipe<?> irecipe, NonNullList<ItemStack> nonnulllist, int i) { // CraftBukkit
|
||||
if (irecipe != null && canBurn(iregistrycustom, irecipe, nonnulllist, i)) {
|
||||
ItemStack itemstack = (ItemStack) nonnulllist.get(0);
|
||||
ItemStack itemstack1 = irecipe.getResultItem();
|
||||
ItemStack itemstack1 = irecipe.getResultItem(iregistrycustom);
|
||||
ItemStack itemstack2 = (ItemStack) nonnulllist.get(2);
|
||||
|
||||
+ // CraftBukkit start - fire FurnaceSmeltEvent
|
||||
@@ -174,7 +174,7 @@
|
||||
|
||||
if (itemstack.is(Blocks.WET_SPONGE.asItem()) && !((ItemStack) nonnulllist.get(1)).isEmpty() && ((ItemStack) nonnulllist.get(1)).is(Items.BUCKET)) {
|
||||
nonnulllist.set(1, new ItemStack(Items.WATER_BUCKET));
|
||||
@@ -373,7 +471,7 @@
|
||||
@@ -374,7 +472,7 @@
|
||||
}
|
||||
|
||||
private static int getTotalCookTime(World world, TileEntityFurnace tileentityfurnace) {
|
||||
@@ -183,7 +183,7 @@
|
||||
}
|
||||
|
||||
public static boolean isFuel(ItemStack itemstack) {
|
||||
@@ -492,14 +590,20 @@
|
||||
@@ -493,14 +591,20 @@
|
||||
@Override
|
||||
public void awardUsedRecipes(EntityHuman entityhuman) {}
|
||||
|
||||
@@ -206,7 +206,7 @@
|
||||
List<IRecipe<?>> list = Lists.newArrayList();
|
||||
ObjectIterator objectiterator = this.recipesUsed.object2IntEntrySet().iterator();
|
||||
|
||||
@@ -508,14 +612,14 @@
|
||||
@@ -509,14 +613,14 @@
|
||||
|
||||
worldserver.getRecipeManager().byKey((MinecraftKey) entry.getKey()).ifPresent((irecipe) -> {
|
||||
list.add(irecipe);
|
||||
@@ -223,7 +223,7 @@
|
||||
int j = MathHelper.floor((float) i * f);
|
||||
float f1 = MathHelper.frac((float) i * f);
|
||||
|
||||
@@ -523,6 +627,17 @@
|
||||
@@ -524,6 +628,17 @@
|
||||
++j;
|
||||
}
|
||||
|
||||
|
||||
@@ -109,9 +109,9 @@
|
||||
|
||||
if (itemstack1.isEmpty()) {
|
||||
iinventory1.setChanged();
|
||||
@@ -226,7 +294,36 @@
|
||||
@@ -226,7 +294,34 @@
|
||||
|
||||
if (!itemstack.isEmpty() && canTakeItemFromContainer(iinventory, itemstack, i, enumdirection)) {
|
||||
if (!itemstack.isEmpty() && canTakeItemFromContainer(ihopper, iinventory, itemstack, i, enumdirection)) {
|
||||
ItemStack itemstack1 = itemstack.copy();
|
||||
- ItemStack itemstack2 = addItem(iinventory, ihopper, iinventory.removeItem(i, 1), (EnumDirection) null);
|
||||
+ // ItemStack itemstack2 = addItem(iinventory, ihopper, iinventory.removeItem(i, 1), (EnumDirection) null);
|
||||
@@ -136,8 +136,6 @@
|
||||
+
|
||||
+ if (ihopper instanceof TileEntityHopper) {
|
||||
+ ((TileEntityHopper) ihopper).setCooldown(8); // Delay hopper checks
|
||||
+ } else if (ihopper instanceof EntityMinecartHopper) {
|
||||
+ ((EntityMinecartHopper) ihopper).setCooldown(4); // Delay hopper minecart checks
|
||||
+ }
|
||||
+
|
||||
+ return false;
|
||||
@@ -147,7 +145,7 @@
|
||||
|
||||
if (itemstack2.isEmpty()) {
|
||||
iinventory.setChanged();
|
||||
@@ -241,6 +338,13 @@
|
||||
@@ -241,6 +336,13 @@
|
||||
|
||||
public static boolean addItem(IInventory iinventory, EntityItem entityitem) {
|
||||
boolean flag = false;
|
||||
@@ -161,7 +159,7 @@
|
||||
ItemStack itemstack = entityitem.getItem().copy();
|
||||
ItemStack itemstack1 = addItem((IInventory) null, iinventory, itemstack, (EnumDirection) null);
|
||||
|
||||
@@ -327,16 +431,40 @@
|
||||
@@ -366,16 +468,40 @@
|
||||
return itemstack;
|
||||
}
|
||||
|
||||
@@ -196,7 +194,7 @@
|
||||
+ // CraftBukkit start
|
||||
+ IInventory inventory = getContainerAt(world, ihopper.getLevelX(), ihopper.getLevelY() + 1.0D, ihopper.getLevelZ());
|
||||
+
|
||||
+ BlockPosition blockPosition = new BlockPosition(ihopper.getLevelX(), ihopper.getLevelY(), ihopper.getLevelZ());
|
||||
+ BlockPosition blockPosition = BlockPosition.containing(ihopper.getLevelX(), ihopper.getLevelY(), ihopper.getLevelZ());
|
||||
+ CraftBlock hopper = CraftBlock.at(world, blockPosition);
|
||||
+ CraftBlock container = CraftBlock.at(world, blockPosition.above());
|
||||
+ return runHopperInventorySearchEvent(inventory, hopper, container, HopperInventorySearchEvent.ContainerType.SOURCE);
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
--- a/net/minecraft/world/level/block/entity/TileEntityLectern.java
|
||||
+++ b/net/minecraft/world/level/block/entity/TileEntityLectern.java
|
||||
@@ -24,13 +24,71 @@
|
||||
@@ -25,13 +25,71 @@
|
||||
import net.minecraft.world.phys.Vec2F;
|
||||
import net.minecraft.world.phys.Vec3D;
|
||||
|
||||
@@ -74,7 +74,7 @@
|
||||
@Override
|
||||
public int getContainerSize() {
|
||||
return 1;
|
||||
@@ -75,11 +133,20 @@
|
||||
@@ -76,11 +134,20 @@
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -84,7 +84,7 @@
|
||||
+ if (i == 0) {
|
||||
+ TileEntityLectern.this.setBook(itemstack);
|
||||
+ if (TileEntityLectern.this.getLevel() != null) {
|
||||
+ BlockLectern.resetBookState(TileEntityLectern.this.getLevel(), TileEntityLectern.this.getBlockPos(), TileEntityLectern.this.getBlockState(), TileEntityLectern.this.hasBook());
|
||||
+ BlockLectern.resetBookState(null, TileEntityLectern.this.getLevel(), TileEntityLectern.this.getBlockPos(), TileEntityLectern.this.getBlockState(), TileEntityLectern.this.hasBook());
|
||||
+ }
|
||||
+ }
|
||||
+ }
|
||||
@@ -97,7 +97,7 @@
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -159,7 +226,7 @@
|
||||
@@ -160,7 +227,7 @@
|
||||
if (j != this.page) {
|
||||
this.page = j;
|
||||
this.setChanged();
|
||||
@@ -106,7 +106,7 @@
|
||||
}
|
||||
|
||||
}
|
||||
@@ -182,6 +249,32 @@
|
||||
@@ -183,6 +250,32 @@
|
||||
return itemstack;
|
||||
}
|
||||
|
||||
@@ -139,7 +139,7 @@
|
||||
private CommandListenerWrapper createCommandSourceStack(@Nullable EntityHuman entityhuman) {
|
||||
String s;
|
||||
Object object;
|
||||
@@ -196,7 +289,8 @@
|
||||
@@ -197,7 +290,8 @@
|
||||
|
||||
Vec3D vec3d = Vec3D.atCenterOf(this.worldPosition);
|
||||
|
||||
@@ -149,7 +149,7 @@
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -234,7 +328,7 @@
|
||||
@@ -235,7 +329,7 @@
|
||||
|
||||
@Override
|
||||
public Container createMenu(int i, PlayerInventory playerinventory, EntityHuman entityhuman) {
|
||||
|
||||
@@ -1,26 +0,0 @@
|
||||
--- a/net/minecraft/world/level/block/entity/TileEntitySkull.java
|
||||
+++ b/net/minecraft/world/level/block/entity/TileEntitySkull.java
|
||||
@@ -33,7 +33,7 @@
|
||||
@Nullable
|
||||
public GameProfile owner;
|
||||
@Nullable
|
||||
- private MinecraftKey noteBlockSound;
|
||||
+ public MinecraftKey noteBlockSound; // PAIL private->public
|
||||
private int animationTickCount;
|
||||
private boolean isAnimating;
|
||||
|
||||
@@ -148,9 +148,12 @@
|
||||
gameprofile1 = TileEntitySkull.sessionService.fillProfileProperties(gameprofile1, true);
|
||||
}
|
||||
|
||||
+ // CraftBukkit start - decompile error
|
||||
+ final GameProfile finalgameprofile1 = gameprofile1;
|
||||
TileEntitySkull.mainThreadExecutor.execute(() -> {
|
||||
- TileEntitySkull.profileCache.add(gameprofile1);
|
||||
- consumer.accept(gameprofile1);
|
||||
+ TileEntitySkull.profileCache.add(finalgameprofile1);
|
||||
+ consumer.accept(finalgameprofile1);
|
||||
+ // CraftBukkit end
|
||||
});
|
||||
}, () -> {
|
||||
TileEntitySkull.mainThreadExecutor.execute(() -> {
|
||||
Reference in New Issue
Block a user