Commit Graph
153 Commits
Author SHA1 Message Date
Jake Potrebic cb51a4fbcd more compile fixes 2024-12-15 14:12:59 -08:00
Lulu13022002 ec57b99bf5 readd removal cause for thrown eggs 2024-12-15 23:07:15 +01:00
MiniDigger | Martin 8f1dcdd0b7 update restamp, add back entity ATs, rebuild patches 2024-12-15 22:39:52 +01:00
Nassim Jahnke 6dcb4a33b6 Fix some compilation errors 2024-12-15 21:28:08 +01:00
Lulu13022002 62b6e85d1a prevent duplicate EntityInsideBlockEvent in fire 2024-12-15 19:57:44 +01:00
Lulu13022002 56e3949c61 call the right damage event for conduit damages 2024-12-15 18:57:22 +01:00
Lulu13022002 a5b1875b2d readd conduit effect cause 2024-12-15 18:47:15 +01:00
Lulu13022002 7b4afa8b82 readd EntityInsideBlockEvent for pitcher crop 2024-12-15 17:27:42 +01:00
Lulu13022002 da1947b2ad readd chorus flower events 2024-12-15 16:48:03 +01:00
Lulu13022002 46eccd8c7d readd cactus config 2024-12-15 16:40:47 +01:00
Jake Potrebic 172a80cb66 Somehow a bunch of items were missed 2024-12-14 22:35:35 -08:00
Jake Potrebic 0262d9a165 fix a bunch of compile issues 2024-12-14 20:15:49 -08:00
Jake Potrebic e9680a5afe partial: net.minecraft.world.level.block 2024-12-14 18:33:16 -08:00
Owen1212055 b16f6f533a net/minecraft/world/level/block/a-r 2024-12-14 21:31:12 -05:00
Owen1212055 97043e3e5b net/minecraft/world/level/block/piston/ 2024-12-14 16:24:09 -05:00
Jake Potrebic 004ee8651c net.minecraft.world.effect 2024-12-14 13:12:42 -08:00
Jake Potrebic 8ec3dedfbd net.minecraft.world.level.block.grower 2024-12-14 13:03:13 -08:00
Noah van der Aa 6a84e88e76 net/minecraft/world/level/block/entity/vault 2024-12-14 19:37:38 +01:00
Bjarne Koll 216f3118ae net/minecraft/world/level/block/entity/trialspawner 2024-12-14 17:17:22 +01:00
Bjarne Koll afa25753de Fix compile issue in MinecraftServer 2024-12-14 05:48:25 +01:00
Bjarne Koll f25c1a33a0 Finish block entity 2024-12-14 05:45:11 +01:00
Jake Potrebic f98d879f07 net.minecraft.world.level.block.state.properties 2024-12-13 16:05:23 -08:00
Jake Potrebic f0e7d7e5f7 net.minecraft.world.level.block.state 2024-12-13 15:50:44 -08:00
Nassim Jahnke f73e864f18 Commands 2024-12-13 21:21:57 +01:00
Bjarne Koll 4091c6ac4d Follow up on block entities 2024-12-13 20:17:16 +01:00
Bjarne Koll e0fae5ef02 Part of block entities 2024-12-13 20:11:23 +01:00
Nassim Jahnke 45ddf764d9 Move patches to unapplied 2024-12-12 12:30:31 +01:00
Shane Freeder 8f7365707a Always send Banner patterns to the client
The mojang client will not remove patterns from a Banner when none
are sent inside of an update packet, given that this is not an expected
flow for them, this is not all too surprising. So, we shall resort to always
sending the patterns over the network for update packets.
2024-10-20 18:23:59 +01:00
Mariell Hoversholm 411498e394 Add PlayerInsertLecternBookEvent 2024-09-29 16:21:26 +02:00
Jake Potrebic 5b0133e675 Call bucket events for cauldrons 2022-01-16 10:13:33 -08:00
Tamion 8b8acbb898 Add recipeBrewTime
== AT ==
public net.minecraft.world.inventory.BrewingStandMenu brewingStandData
2024-09-15 19:17:12 +02:00
Bjarne Koll c8efaa46cb Remove wall-time / unused skip tick protection
Spigot still maintains some partial implementation of "tick skipping", a
practice in which the MinecraftServer.currentTick field is updated not
by an increment of one per actual tick, but instead set to
System.currentTimeMillis() / 50. This behaviour means that the tracked
tick may "skip" a tick value in case a previous tick took more than the
expected 50ms.

To compensate for this in important paths, spigot/craftbukkit
implements "wall-time". Instead of incrementing/decrementing ticks on
block entities/entities by one for each call to their tick() method,
they instead increment/decrement important values, like
an ItemEntity's age or pickupDelay, by the difference of
`currentTick - lastTick`, where `lastTick` is the value of
`currentTick` during the last tick() call.

These "fixes" however do not play nicely with minecraft's simulation
distance as entities/block entities implementing the above behaviour
would "catch up" their values when moving from a non-ticking chunk to a
ticking one as their `lastTick` value remains stuck on the last tick in
a ticking chunk and hence lead to a large "catch up" once ticked again.

Paper completely removes the "tick skipping" behaviour (See patch
"Further-improve-server-tick-loop"), making the above precautions
completely unnecessary, which also rids paper of the previous described
incompatibility with non-ticking chunks.
2024-09-16 23:07:29 +02:00
Tamion 2742ad6a9a Fix InventoryOpenEvent cancellation 2024-08-19 18:05:26 +02:00
Jake Potrebic 8a940ca0ba Fix SculkBloomEvent firing for block entity loading 2024-08-19 13:43:06 -07:00
Nassim Jahnke 334058fa69 Check for block type in SculkSensorBlock#canActivate 2024-08-07 14:33:25 +02:00
Jake Potrebic d9e3bee3b5 Fix NPE for Jukebox#setRecord
Fallback to the global registry if no level exists
2024-06-17 17:41:09 -07:00
SoSeDiK b50682ab2b More Chest Block API
== AT ==
public net.minecraft.world.level.block.ChestBlock isBlockedChestByBlock(Lnet/minecraft/world/level/BlockGetter;Lnet/minecraft/core/BlockPos;)Z
2024-05-01 08:22:13 +03:00
Jake PotrebicandGhastCraftHD 31725bc039 General ItemMeta fixes
== AT ==
private-f net/minecraft/world/item/ItemStack components
public net/minecraft/world/food/FoodProperties DEFAULT_EAT_SECONDS
public org/bukkit/craftbukkit/block/CraftBlockStates getBlockState(Lorg/bukkit/World;Lnet/minecraft/core/BlockPos;Lnet/minecraft/world/level/block/state/BlockState;Lnet/minecraft/world/level/block/entity/BlockEntity;)Lorg/bukkit/craftbukkit/block/CraftBlockState;
public net/minecraft/world/level/block/entity/BlockEntity saveId(Lnet/minecraft/nbt/CompoundTag;)V

Co-authored-by: GhastCraftHD <julius.gruenberg@leghast.de>
2024-04-27 20:56:17 -07:00
Aikar eb626e1176 Protect Bedrock and End Portal/Frames from being destroyed
This fixes exploits that let players destroy bedrock by Pistons, explosions
and Mushrooom/Tree generation.

These blocks are designed to not be broken except by creative players/commands.
So protect them from a multitude of methods of destroying them.

A config is provided if you rather let players use these exploits, and let
them destroy the worlds End Portals and get on top of the nether easy.
2020-05-13 23:01:26 -04:00
Jake Potrebic 6c400a907b Fix possible StackOverflowError and NPE for some dispenses
For saddles, carpets, horse armor, and chests for horse-likes
a BlockDispenseEvent handler that always mutated the item without
changing the type would result in a SO error because when it went
to find the replacement dispense behavior (since the item "changed")
it didn't properly handle if the replacement was the same instance
of dispense behavior.

Additionally equippable mob heads, wither skulls, and carved pumpkins
are subject to the same possible error.

Furthermore since 1.21.2, the DISPENSER_REGISTRY map doesn't have a default
return value anymore and some dispense behaviors like equippable and
regular items will not have a defined behavior in that map and might throw
a NPE in that case.
2022-10-29 17:02:42 -07:00
Jake Potrebic 93a2600891 Fix bees aging inside hives
Fixes bees incorrectly being aged up due to upstream's
resetting the ticks inside hive on a failed release
2021-08-21 21:54:16 -07:00
Owen1212055 21837e419b Properly handle experience dropping on block break
This causes spawnAfterBreak to spawn xp by default, removing the need to manually add xp wherever this method is used.
For classes that use custom xp amounts, they can drop the resources with disabling
2023-12-30 15:00:06 -05:00
Nassim Jahnke 2506babe8e Validate ResourceLocation in NBT reading 2024-01-04 13:49:14 +01:00
Lulu13022002 93c87bedaf Fix NPE in SculkBloomEvent world access 2023-10-20 19:50:22 +02:00
Warrior d4ab21c047 Call BlockRedstoneEvents properly
Call BlockRedstoneEvents for lecterns.
Fix previous power level for experimental redstone wire.
2023-09-13 05:46:10 +02:00
Lulu13022002 d66a2c4c26 Configure sniffer egg hatch time 2023-06-27 13:26:06 +02:00
Jake Potrebic 597cb633e8 Properly handle BlockBreakEvent#isDropItems
Setting whether a block break dropped items controlled
far more than just whether blocks dropped, like stat increases
food consumption, turtle egg count decreases, ice to water
conversions and beehive releases
2023-03-04 10:52:52 -08:00
Warrior d2f251cc5c Use correct source for mushroom block spread event 2023-08-08 11:49:32 +02:00
Jake Potrebic 36ae0bcfea Only capture actual tree growth 2021-08-21 18:53:03 -07:00
Jacob Litewski 1b118883f2 Make Amethyst throw both Spread and Grow Events 2023-06-13 19:16:39 -04:00