Implement GriefingData#407
Conversation
|
I was going to do it myself, but it was more complex than I thought. Thanks for taking over it for me 😄 |
There was a problem hiding this comment.
Implementation shouldn't be required for testing a boolean based value.
|
@JBYoshi Haha, no problem, there had claimed it when I looked through the list ;) |
There was a problem hiding this comment.
Why call the GameRules object this$0?
There was a problem hiding this comment.
It was like that in the examples, but I should probably change it.
There was a problem hiding this comment.
this$0 sounds fine if the redirect you have actually refers to the same object as the current mixin you're in, however if it refers to a different object like in this case you should better name it differently.
|
@Cybermaxke: Could you rebase and squash this? |
|
RIP |
Signed-off-by: Gabriel Harris-Rouquette <gabizou@me.com>
Signed-off-by: Gabriel Harris-Rouquette <gabizou@me.com>
Summary of changes since the last release: - Add test plugin for WitherSpawnTest - Implement interaction slots for ClickInventoryEvents - Fix missing EventContextKeys during Interact events (#2181) - Implement EnderDragon phase API (#1032) - Compatibility changes for TileEntity registry with ForgeMultiPart performing duplicate registrations - Allow modifying ItemStack sizes to more than 64 - Allow GameRegistry.register to be used for recipes - Fix PositionOutOfBoundsException when calling getHighestYAt - Implement Entity spawn logging - Fix artificial requirement to prefix particle type lookups with ":minecraft" - Add team/display name length checks - Fix missing DataManipulators - Fix scaled health stripping attribute modifiers potentially added by mods and vanilla - Fix owner/notifier checks with TileEntities - Add FlowerPot test to verify part of #2144 being resolved - Remove hasSetOwner/hasSetNotifier usage for performance in MixinTileEntity - Relocate timings implementation under the Sponge package name - Implement Rotate/Position events - Implement Chunk Regeneration API - Add debugging when failing to find a TileEntity by string id - Improve CustomInventory performance - Close Sponge specific data file IO earlier to avoid corruption - Fix cause frame usage with interaction events (#2193) - Use actual entity erlated to atttackTargetEntityWithCurrentItem - Generate unique id's for smelting recipes that don't override getId() - Add Eigencraft redstone optimization - Cleanup handling for unregistered TileEntities - Actually get VirtualPortalAgent functioning as it should - Implement EventContextKeys.USED_HAND (#2191) - Fix exploit mixin breaking intrinsic chunkExists method - Add hooks for persisting chunk ticks refactor - Provide both parents in the cause for a Breeding event - Add Enhanced PhaseTracker capabilities. This was over several commits and took a while to get stable, but it's better than the old system and well tested and functioning now for release. - Add test plugin for altering the message for chat event - Don't recreate structures if map features are disabled - Add BlockSnapshot tracking between Neighbor Notification Requests - Improve overall BlockState property CPU performance - Implement BlockEventData context handling - Actually use ReusableLenses - Bail out when we create a ReusableLens - Don't process transactions that aren't valid - Fix possible NPE during BlockEventTickPhaseState - Add enable/disable system for test plugins (#2195) - Fix sponge reload command (#2036) - Check init before registering event hooks - Add missing Player to causes for events - Fix CancellationException when cancelling CooldownEvent.Set - Fix instanceof check and safe cast to PortalAgent (#2036) - Fix same dimensionIDs after creating multiple worlds (#2206) - Fix Overwrite missing a few method calls (#2203) - Fix failing tests with ItemStackSnapshot.NONE serializing and deserializing - Make sure there's always a LocatableBlock for BlockEventQueue - Fix recursive setting of TileEntities when requesting the current TileEntity - Revert #2207 due to negative dimension id's - Unregister listeners for closed CustomInventory on next tick - Ensure consistent implementation of interaction logic between SV and SF - Use unmarkRemoval when adding a TileEntity to avoid closing a Proxy twice - Fix TileEntities replacing their BlockStates and later replacing themselves back in the same update tick - Minor optimizations with PhaseTracker, remove PhaseData - Register custom inventory listeners before firing InteractInventoryEvent.Open - Fix chunk packet data length inconsistencies caused by async lighting - Fix lens generation for modded inventories that do not use the entire source inventory in containers - Implement API for Shulkers, ShulkerBullets and ShulkerBoxes (#2087) - Implement missing DamageSources and DamageTypes (#1914) - Add RegistryModule test plugin (#2167) - Throw a more meaningful exception when passing an empty path in DataView#set() - Misccellaneous fixes for EntitySnapshot implementation (#2220) - Fix no offset in CustomLensProvider - Deduplicate configuration files - Fix dimension id duplication (#2215) - Add disabled frame modifiers for BlockDynamicLiquids for their updates - Implement ItemStack#setRawData with little to no validation for plugin developers - Add handling for fetching Forge Capabilities when writing toContainer() - Fix issues with cancelling blocks where restoration would fail - Fix fire blocks removing themselves during their ticks - Fix custom DataManipulators not being removed completely from ItemStacks - Fix World generation pahses unexpectedly being included in captures - Fix neighborChanged mapping (#2229) - Fix issues with ShouldFire not being checked during block change processing with the Enhanced PhaseTracker - Fix custom DamageSources being misidentified for custom types when they are constructed with a specific type - Fix notifications not being processed when Shouldfire prevented blocks being changed (#2228) - Do not capture TileEntity transactions when ShouldFire has it set to false - Do not attempt to pop off PhaseContext that are not intended to be popped off. - Block ticking doesn't use a TileEntity as a source - Fix neighbor notifications not being captured properly when ChangeBlockEvent is being acted upon, but NeighborNotificationEvent is not - Clean up the BlockProxy if there hasn't been sufficient cleaning of it's proxied BlockStates - Fix InvalidDataException when deserializing Instant - Fix NeighborNotification tracking when block tracking is not enabled, resulting in those transactions being ignored - Correctly detect the DamageType in our registry versus matching vanilla DamageTypes - NeighborNotificationState should not be pushing to the Cause stack, only adding to the EventContext - Fix pushing duplicate player objects during UseItemPacketState and PlaceBlockPacketState - Wrap ChangeStatisticEvent firing with a try-with-resources - If blocks are ticking, they should be pushing to the Cause Stack - Only fire BreedEntityEvent.ReadyToMate on the server - Fix CommandPhaseContext not providing captures to their checks for inventory mangement (#2187) - Attempt to ensure that TileEntities being queued for addition have their world object set prior to setting positions - Fix TileEntity removal during block processing - Don't randomize seeds unless creating a new World (#2234) - Allow setting items on furnace output-slot via API - Fix PassedBurnTimeValueProcessor - Implement SlabDataProcessor only when item damage is changed (#2236) - Fix off-by-one errors in screo selectors - Fix post processing accidentally capturing using the Enhanced PhaseTracker System - Fix ClassCastException when using wrapped sources - Fix decaying block drops being captured but no listeners for block changes causing those drops to be un-processed - Sanity check for fake players and PhaseContexts before trying to use the PacketPhase processing methods - Make sure we do not create dictionary entries for null ItemTypes - Fix infinite loop when cancelling transactions (#2244) - Set renderYawOffset when setting living head rotation - Fix wrong cast in SlabDataProcessor (#2236) - Move InteractionEvent static fields to related mixins, avoids global state quirksthat could break on FakePlayer usage from mods - Actually switch into the World Conversion context (#2246) - Nuke some more static field usage in SpongeCommonEventFactory - Merge SpongeForge changes into Sponge for processRightClickBlock to allow guaranteed unified expected flow - Fix placing TileEntities on the client and breaking containers missing inventories - Ensure that TileEntities are not being queued for removal unless they are defined to do so by their parent BlockState - ShouldFire-ify some inventory events (#2188) - Fix advancements not rendering when some mods are in use - Fix NPE when retrieving user data (#2251) - Re-fix TileEntity resetting during their tick after changing their contained BlockState - Null check neighbors in async lighting system - Ensure exit of PhaseContext in error states - Fix re-entrant single block captures on Unwinding causing missed updates on clients - Fix cancelling events and removing from an empty map (#2253) - Fix block drops requesting a potentially removed TileEntity during player interactions - Refactor RegistryModule registration (#2223) - Perform block breaks on set instead of delaying until PhaseTracker processing - Implement Sponge Schematic Specification Format 2 with API - Allow re-entrance of ListenerPhaseStates - Add Forge Capabilities deserialization - Fix attempting to prune a single snapshot during NeighborNotification processing - Ensure TileEntity unloading singularly captures block changes events - Fix multiple requests at removing the same TileEntity while breaking blocks - Add hook for detecting Client Event classes - All ListenerPhaseStates need ot process block captures - Ensure vehicle teleporting with passengers when teleporting to other worlds - Fix Hopper events using the IInventory instead of Forge's IItemHandler if it's provided - Do not attempt to serialize and deserialize Player entities (#2261) - Fix hit vector calculation points - Fix recursive exceptions in UnwindingPhase for block processing - InteractionPackets shoud be processing per-entity-item-drops - Fix legacy schematic importing - Don't attempt to pull from an empty block change list - Prevent duplicate block drops occurring when future block transactions already performed a drop - Remove canSwitchTo check for all PhaseStates - Avoid calling extended states when we create Transactions for block capturing - Check for position equality as well when checking for processing transactions and block breaks - Fix FallingBlocks when ShouldFire has block changes disabled (#2263) - Re-add sandstone generation (#2237) - Implement SmeltEvent - Fix PlayerProfileCache and optimize UsernameCache (#2267) - Fix bad cast in LegacySchematicTranslator - Fire DropItemEvent in DispenserPhaseState (#2269) - Re-fix doors for position checking on duplicate drops - Improve runaway detection on deeply nested Event listeners - Fix custom Item entities not being spawned when ShouldFire has no captures - Fix SchematicTranslator failing to locate TileEntityTypes by id - Fix Plugin based Teleporters not calling the correct server code - Warn on first occurrance of modded containers not being captured - Start ignoring redstone neighbor propogation logic due to extended recursive nature of redstone - Refactor TileEntityActivation for cleaner mixins - Increase default and pre-defined max-depth-processing to 1000 due to various valid sources for possible recursive natures - Process per block Item Entity drops for all states - Fix API loaded worlds not calculating spawn on initial server sessions - Cleanup SpongeEntityType usages, fix Damaging on custom Entities - Fix using the incorrect type for ItemStack replacement events (#2255) - Fix explosions not performing item drops (#2272) - Clean up runaway explosion spam - Fix UserDiscoverer not catching ReportedException swhile reading NBT (#2266) - Fix placing blocks not performing hand restores when block changes were cancelled (#2242) - Use pre-existing ItemStackSnapshot instead of regenerating one for EventContext creation - Migrate the pendingContext flag to an AtomicBoolean for better thread safety - Push the target BlockSnapshot in InteractionPacketContexts - Check that the used Item is not NONE (#2242) - Fix MoveEntityEvent when fired from the NetworkHandler - Fix a few issues with WorldManager - Fix unintended portal sounds for every interdimensional teleport! - Update Configurate for de-duplicating fix (#2258) - Improve User Data API integration (#2250) - Fix local variable table optimization in vanilla (#407) - Add slots added by mods extending ContainerWorkbench - Show an error message if PhaseStates are not completed by the end of each tick - Replace broken condition in MixinBlock.dropBlockasItemWithChance - Spawn block-specific drops in BlockDropItemsPhaseState (#2786) - Explicitly implement getIsInvulnerable - Schematic implementation fixes with integration test using MCTester - Remove MultiBlockCaptureSupplier.hasMulti field that can fall out of sync - Do not allow setting a location on an Entity to an unknown World - Cleanup redirecting WorldInfo for mods - Honor disableLevelSave flag when stopping all worlds - Fix disappearing TileEntities during removals and un-marking (#2277) - Sanity check all access to getting a World out of a BlockSnapshot - Dragon eggs fall too - Fix SpongeConfig not being able to fetch doubly nested nodes - Fix redstone not being updated on the proxy (#2283) - Explicitly specify if we're shutting down the server during an unload - Don't ignore classes that end up with errors when looking up methods for optimization additions - Clear manipulators if tag has been set on an ItemStack - Do not always assume the Nether and End exist when loading all worlds - Add Java Vendor/Version and OS information to the version command - Provide the MCP-Mappings-Version in the manifest - Small changes to support throwgin ChangeBlockEvent.Pre events for modded fluids in SpongeForge Signed-off-by: Gabriel Harris-Rouquette <gabizou@me.com>
Todo:
Test plugin code:
Note:
There are much more entities (almost all living ones) that are able to grief the world, mainly through destroying crops. And in the explanation of
GriefingDatais it only limited toEndermanandHumanoids.