Commit Graph

268 Commits

Author SHA1 Message Date
bloodmc 603f4bd7a3 Check use item result before calling onItemUseFirst. (#5016) 2018-07-14 14:28:42 -07:00
LexManos 0cf5ef221c Run licenseFormat to apply license header to all files. 2018-07-01 14:17:31 -07:00
LexManos 1007d3e9c5 Added Fluid Place Block Event for when fluid changes blocks in world. (#4627) 2018-06-27 12:06:55 -07:00
UnRealDinnerbone c001d2dbf6 Add Farmland Trample Event (#4895) 2018-06-27 11:31:38 -07:00
Ben Staddon 40b567e962 Add an event to control nether portal formation (#4735) 2018-05-16 22:48:14 -07:00
temp1011 e7cd3d4df6 Preserve original ChunkPos for decoration events. (#4767) 2018-05-14 20:20:50 -07:00
Judge40 b8e411674b Create event for overriding mob griefing flag based on entity. (#4710) 2018-04-01 00:48:25 -07:00
TheCyberBrick 11e623bf4d Added chunk instance to ChunkWatchEvent (#4805) 2018-04-01 00:07:01 -07:00
mezz f9a2695662 Update docs for ItemTooltipEvent 2018-03-21 20:11:17 -07:00
alexbobp 1d48e06798 Add MobSpawnerBaseLogic reference to SpecialSpawn and CheckSpawn events (#4600) 2018-01-18 13:06:53 -08:00
MineMaarten dbf2beb6fa Moved firing the MinecartInteractEvent from individual subclasses up to EntityMinecart, which as a result automatically supports EntityMinecartMobSpawner and EntityMinecartTNT. (#4583) 2018-01-18 12:52:46 -08:00
Melonslise bbf1bef7d3 Added LivingKnockBackEvent event to allow better control over knock back effects. (#4503) 2017-12-16 18:03:45 -08:00
Anthony Lomeli bd494af7ee [1.12] Add Advancement Event (#4467) 2017-12-05 14:05:05 -08:00
Bartek Bok dd69f0623c Add LivingDamageEvent (#4349) 2017-10-31 15:29:19 -07:00
Ben Staddon 31655b3a7d [1.12] Replace ThrowableImpactEvent with a more generic version (#4040) 2017-10-31 11:34:48 -07:00
AEnterprise 22ea5a23ad Improve performance of World.collidesWithAnyBlock (#4286) 2017-10-31 11:20:59 -07:00
Erlend Åmdal 8a285e0fed Add Chunk capabilities (#4228) 2017-10-02 20:24:11 -07:00
Tyler Hancock 523b4f85c2 Added missing MapGen types to the InitMapGenEvent (#4322) 2017-09-03 16:26:29 -07:00
mcenderdragon c8379da83b Added CriticalHitEvent to allow more control over whether a attack is a critical or not, and what damage it does. 2017-08-01 14:13:37 -05:00
InfinityRaider 2158198295 Make LivingEntityUseItemEvent not abstract (#4208) 2017-08-01 13:26:59 -05:00
mezz c1ae2cdbf2 Improve furnace fuel handling (#4083) 2017-07-03 12:54:01 -07:00
Xalcon e1a2bcf902 Add isSpawner parameter to the CheckSpawn event (#4075) 2017-07-03 12:45:57 -07:00
LexManos d0b24313d3 Fix MissingMapping REMAP action. Closes #4069 2017-06-27 16:56:42 -07:00
Ben Staddon 9a09ff68aa Remove some deprecated methods and clean up 2017-06-25 22:30:18 -07:00
LexManos 87054b01fb Fix NPE in MissingMappings event. Closes #4067 2017-06-24 14:51:46 -07:00
Ben Staddon 1b5da5d4fe [1.12] Cleanup of files with old licence headers, Add missing LGPL 2.1 licence headers (#4051) 2017-06-24 01:25:23 -07:00
mezz d769d83224 Update MCP to 20170624 2017-06-24 00:56:21 -07:00
LexManos a26d89c876 First pass of registry rewrite.
Tests do not run yet.
Things of note:
Removed the idea of substitutions, just register multiple items with the same name they will override each other like a normal map.
Decoupled Forge registries from vanilla classes. They now use bouncer classes. MODDERS SHOULD NEVER USE THESE
Introduced more stringent registry locking. As it sits things are only allowed to be registered during the RegistryEvent.Registry phases!
This is to force modders to split up their registrations, and pave the way for calling these functions multiple times during a single MC lifecycle.
ObjectHolder, Missing Mappings, etc... *should* now work for all registry types, nothing should be special cased to Blocks/Items anymore.
Added optional generic dummy factory to registries, to allow registry creators the ability to dummy more then just Blocks.
Re-worked the ItemStack transformer and applied it to ItemBlock and ItemBlockSpecial. Allowing us to cleanup reflective hacks in Block callbacks.
Registry onAdd callback is now only fired on the ACTIVE registry, fixing any issues of temp registries overriding active objects.
2017-06-23 16:59:57 -05:00
Ben Staddon a30316e6a1 Update NoteBlockEvent with new instruments. Resolves #4018. (#4019) 2017-06-20 23:50:32 -07:00
mezz e3777f4559 Add missing Override annotations 2017-06-17 18:24:17 -07:00
mezz 3d322ef925 Update mcp mappings to 20170611 2017-06-17 17:13:44 -07:00
LexManos f1cca475ea Initial patch update to 1.12.
Some things to note:
Netty is screwy so currently can't join single player. @cpw
Crafting has been MAJORY reworked. The current GameRegistry functions are nooped, this is IN THE WORKS.
  Just need to move the recipe list to a full class registry, and then re implement the in-code recipe registration.
  Also, it IS advised that modders move to JSON, because ideally we'll see a S->C recipe syncing system in 1.13
  which would allow servers to have custom recipes.
  OreDictionary currently 1/2 works, need to write a better algorithm for replacing ingredients.
  Please be patient
Rendering:
  A lot of functions got a new float parameter, this is similar to partial ticks, needs more research
2017-06-10 22:22:02 -04:00
Ben Staddon c6f181dcb2 Fixes for PlayerDestroyItemEvent being called with empty itemstacks. (#3728) 2017-05-26 13:54:13 -07:00
Madsthunder 7976ac4a2b [1.11.2] Added support for Village capabilities (#3648) 2017-05-26 13:51:18 -07:00
Max Becker 34463690c5 Changed custom entity selectors from event based to factory based. (#3579) 2017-05-01 18:36:24 -07:00
ichttt 6ffd94a08e Create ItemFishedEvent, the event is cancelable, but items are not mutable. Use LootTables to control that. (#3705) 2017-05-01 18:10:47 -07:00
Ben Staddon 901df8345c Add AnimalTameEvent for handling animal taming (#3763) 2017-04-07 16:47:28 -07:00
Vincent Lee 72dd06ca85 Allow result of PlayerInteractEvent to be changed when it's cancelled (#3744) 2017-04-07 16:38:56 -07:00
Choonster TheMage 5ffbbd3b9f Add EnumHand and ItemStack to BonemealEvent (#3736) 2017-04-07 16:31:51 -07:00
Paulo "JCranky" Siqueira be2d814155 Add LootTableManager to the LootTableLoadEvent (#3717) 2017-04-07 16:22:49 -07:00
Lance 671d462645 Added ClientChatEvent. Closes #1442 (#3704) 2017-04-07 16:09:46 -07:00
Silly511 f0eb941abc New LivingDestroyBlockEvent for controlling if some entities can destroy blocks (#3628) 2017-04-07 15:34:26 -07:00
sjx233 2003dee17f Add DifficultyChangeEvent (#3525) 2017-02-23 18:12:27 -08:00
diesieben07 bf154730bd Start firing AttachCapabilitiesEvent<ItemStack> (#3645) 2017-02-23 17:09:02 -08:00
James Mitchell c545b8ecd4 Clean up null issues, add more annotations (#3590) 2017-01-11 15:17:56 -08:00
Ben Staddon 43efa3cfc4 Small cleanup for PlayerInteractEvent (#3563) 2017-01-11 15:17:08 -08:00
James Mitchell 5165dc52bf Update MCP mappings to snapshot_nodoc_20161220 (#3551) 2016-12-21 15:52:30 -08:00
Hasun a997222aca reset repo to upstream and reapplied patches (#3434) 2016-12-17 13:10:17 -08:00
Rock Hymas 8dc4b5f9b5 [1.11] Added EnchantmentLevelSetEvent (#3433) 2016-12-17 13:06:51 -08:00
TechnicianLP dac8e49f50 Added EquipmentChangeEvent (#3411) 2016-11-30 15:15:14 -08:00
Shadowfacts 9cf74914e7 Initial annotations/nullability changes (#3392) 2016-11-18 13:24:03 -08:00
iChun 1fa0c0c548 Add GetCollisionBoxesEvent. Allows manipulation of the collision boxes of blocks for entities. MC1.11 edition. (#3405) 2016-11-18 12:24:55 -08:00
mezz 150566d9a3 [1.11] Fix nullability issues around ForgeHooks and Capabilities (#3395) 2016-11-17 10:44:31 -08:00
LexManos 6741967608 Make EntityShulker fire EnderTeleportEvent. Closes #3383
(cherry picked from commit d48985fafaed6de6f09136b999ca8aa44184a7b9)
2016-11-16 16:05:41 -08:00
LexManos f0d9bf7886 Added event to allow modification of player visibility to mobs/AI (#3382)
(cherry picked from commit 0a5ef64d6ea96fe85d7c62107081ced649e6a3e9)
2016-11-16 15:10:14 -08:00
cpw 4e6a774075 Initial 1.11-pre1 update 2016-11-13 17:09:55 -05:00
cpw 9ab96fbda6 Update to 20161111 mcp names 2016-11-12 10:05:32 -05:00
Draco18s 998a78c3c1 Added events for crop growth (#3320) 2016-11-07 14:40:44 -08:00
Max Becker 42e0fbbb02 Add support for custom entity selectors in commands (#3356) 2016-11-05 13:12:05 -07:00
Choonster TheMage 9a9c02fa25 Add hand argument to BlockEvent.PlaceEvent (#3221) (#3270) 2016-11-03 11:53:12 -07:00
boni 5f9034d95b Call Looting Event on player death and loot table drops (#3275)
* Call Looting Event on player death and loot table drops

* Simplify patches

* More code cleanup: Replace old usage with compact forgehooks implementation
2016-10-30 10:53:50 -05:00
LexManos bc303074f6 Introduce IContextSetter for events.
This will set the active mod container for events using the normal EventBus.
Fixes improper warnings from initializing mods using the new Registry events.
Modders, you should not use this as it has many performance implementations
and if abused will slow down the event bus A LOT. ActiveModContainer is not
thread safe.
2016-10-08 16:30:53 -07:00
cpw 7a84376044 Add in registry registration events, new subscription events you can use to make sure you're registering things at the "best" time. 2016-09-17 21:13:15 -04:00
LexManos 1107088acb Add support for generic filtering of events.
Please DO NOT use this in performance sensitive environments where you will have tons of things added to the listener list.
If that's the case define sub-classes as they have completely separate lists and will thus be more efficient when firing the event.
2016-09-17 15:08:23 -07:00
Steven Blom 8dca9f2694 New event to allow mutating a baby entity based on it's parents (#3227) 2016-09-13 09:32:27 -07:00
LexManos 0e286f880e Fix World Capabilities NPE when there are no attached capabilities. 2016-08-14 01:48:41 -07:00
Abastro bfddcfb4fc Introduced Capabilities for World (#3069) 2016-08-13 20:42:00 -07:00
MrIbby d17c025557 Added PlayerBrewedPotionEvent (#3187) 2016-08-13 13:38:45 -07:00
cpw 1473334f61 Merge remote-tracking branch 'origin/pr/3120' into 1.10.x 2016-07-28 23:15:32 -04:00
cpw 7e15ab7da1 Fix anvil output slots being wrong by adding new ones. Closes #3121 without breaking existing mod workarounds for the badly ordered slots. 2016-07-28 22:17:35 -04:00
Dakota Pierone 0cf2cdfdb3 Update decorate for biomes to support Decorate event 2016-07-24 10:40:14 -07:00
Joseph C. Sible b95d443f22 Add CreateFluidSourceEvent to control infinite fluid sources 2016-07-23 22:39:54 -04:00
cpw 7e36205ba7 Merge #3060 into 1.10.x 2016-07-09 11:58:09 -04:00
Vincent Lee f76af6103e Add throwable impact event (#3071) 2016-07-08 21:12:45 -07:00
Bernhard Bonigl 432e3ab08a Add an event that allows to modify the looting level based on damage source 2016-07-03 15:19:31 +02:00
diesieben07 4b9bf30fed Fix mob-spawners crashing for non-living entities and simply the patch in the process (#3042) 2016-06-26 16:35:59 -07:00
luacs1998 8e3bc83c3b Simple implementation of a Open/Close container event (#3017) 2016-06-25 12:34:42 -04:00
cpw 260be68723 Update to 1.10 2016-06-23 02:39:55 -04:00
cpw c8d775c865 In accordance with our stated goal of relicensing Forge to LGPL v2.1, this commit enacts that change. Although it is using the 1.9.4 codebase, it is intended that this branch become public with the 1.10 changes, as such the license will take effect at that time. The three commits from persons who have failed to accept the new license, as documented in #2789, have had their commits reverted. This should complete the license transition. Commits after the commit date of this commit should be considered licensed by LGPLv2.1, as indicated in LICENSE-new.txt. All patches are now considered owned by the Forge project and Forge Development LLC in particular (note that they will not get the license boilerplate, as they are machine generated files). 2016-06-22 23:49:48 -04:00
cpw d1f4d71d93 Revert "Added PlayerOpenContainerEvent and added ForgeHooks.canInteractWith"
This reverts commit 8d0b58ee6f.

# Conflicts:
#	common/net/minecraftforge/common/ForgeHooks.java
#	patches/minecraft/net/minecraft/entity/player/EntityPlayer.java.patch
#	patches/minecraft/net/minecraft/entity/player/EntityPlayerMP.java.patch
2016-06-22 23:43:41 -04:00
cpw 18e60a1235 Fire ChunkWatchEvent.Watch event, closes #2767. Based on @sfPlayer1 patch suggestion. It looks like this logic has shifted relative to 1.8, so there may be differences in event behaviour now. 2016-06-04 11:13:44 -04:00
Vincent Lee 35cd9fe212 Several bugfixes for PlayerInteractEvent (#2943)
* Don't change Result if setCanceled(false) called

* Fix RightClickEmpty firing even when targeting a block or entity

* Add a left click empty event

* Move hook point for EntityInteractSpecific to the right place

* Fix LeftClickBlock not firing clientside in creative, and clarify docs about creative
2016-06-03 18:52:01 -07:00
cpw caa61e1be9 Merge branch '1.9.4' 2016-05-31 00:34:03 -04:00
mezz 86baf7462f Improve JavaDoc links, fix some broken JavaDocs (#2833)
Improve JavaDoc links, fix broken JavaDocs
2016-05-29 14:05:07 -07:00
LexManos 0406267d89 Fix javadocs for BiomeColor events. Closes #2093 2016-05-28 20:15:32 -07:00
LexManos debe0ffdf8 Fire LivingSpawnEvents for MobSpawners. Closes #2079 2016-05-28 20:13:03 -07:00
LexManos cdc86e9af6 Update mappoings snapshot to 20160518 2016-05-18 05:23:30 -07:00
LexManos b9ac73b0f1 1.9.4 Update.
Major things to note:
Class renames: https://gist.github.com/LexManos/44dd211f90f498ad4015279b103dff86
Tile Entities are now packed in the ChunkData packet.
Forge intends to work around this to better support large moded worlds, but for the time being modders should implement the new function carefully and only send what data they need to!
Minecraft's codebase now has annotations, these are directly from Mojang and should be adheared to!
Added support for package-info.java's containing @Nullable information for all MC code base.
2016-05-18 03:29:10 -07:00
LexManos aaa146c10d New LootTable interaction system and event.
Modders can now modify and reference internal elements of a loot table by name.
Editing can ONLY be done in the event and any external editing will cause a exception to be thrown.
See this gist for more information: https://gist.github.com/LexManos/77c983d67b9ad27010428478b66d50fd
2016-05-09 14:15:59 -07:00
mezz 363e84b2c5 Fix the rand given to PopulateChunkEvent (#2834) 2016-05-07 11:17:18 -07:00
Vincent Lee e8ea52558b Player Interact Event 2016-04-04 19:58:46 -05:00
LexManos 38c57d9038 Make NoteBlockEvent raw constructor protected to allow subclasses. Closes #2153 2016-03-30 15:26:48 -07:00
LexManos dd201c066e Merge pull request #2645 from diesieben07/populate_event
Fix PopulateChunkEvent.Post not firing.
2016-03-24 14:37:55 -07:00
RainWarrior 75032ebf9c Made some more public fields either private or final. 2016-03-24 22:22:21 +03:00
RainWarrior 756c58d5cb Removed RenderWorldEvent, encapsulated all public event fields. 2016-03-24 22:22:21 +03:00
RainWarrior a9d23f5e78 Cleanup: removed IEEP, removed redundant casts, fixed imports, fixed typos. 2016-03-24 22:22:20 +03:00
Take Weiland bc5313c67b Fix PopulateChunkEvent.Post not firing 2016-03-24 02:24:36 +01:00
RainWarrior 4650ee2789 Updated to latest mappings. Exc is broken, some anonymous classes didn't map to srg names. 2016-03-13 04:40:03 +03:00
LexManos 7b7156e87f Interaction hooks need to be re-added but compiles {Doesn't run} 2016-03-09 14:11:56 -08:00
cpw e8a7e28110 Another AT, for the player 2016-03-09 00:59:28 -05:00
cpw aa24916736 Finish world, chunkloading should work again? 2016-03-09 00:48:32 -05:00
RainWarrior 4b4146bbed World 2016-03-08 22:43:05 +03:00
LexManos 26ca27193c More patch work, client patches. 2016-03-07 21:06:54 -08:00
cpw f0e5baa8e5 Few more compile fixups 2016-03-07 00:23:00 -05:00
LexManos 74b2c3dfe6 World Patches work. 2016-03-04 16:40:34 -08:00
LexManos 8863aab9e5 Items done, <1000 errors whoot! 2016-03-01 23:38:31 -08:00
LexManos ad788880e5 Some entity patches. 2016-03-01 20:42:36 -08:00
LexManos ac7c4d2f6c Some import renames and compile error fixes, killed ~800. 2016-03-01 04:58:03 -08:00
LexManos f654157adb net.minecraft.block.* patches 2016-03-01 00:31:58 -08:00
Matthew Miller (Me4502) f1ad05dd8e Added local click position to PlayerInteractEvent. 2016-02-27 11:27:21 +10:00
Bernhard Bonigl 17e960c158 Fix WordServer.canCreatureTypeSpawnHere not using Forge Events.
Followup of #2496
2016-02-23 09:53:26 +01:00
Bernhard Bonigl de1c270644 Fix WorldEvent.PotentialSpawns Event passing the list instance of the ChunkProvider to users 2016-02-22 18:45:31 +01:00
VikeStep 026d179c0d Add EntityTravelToDimensionEvent
Resolve Merge Conflict

Move event call inside conditional
2016-01-25 17:57:52 +10:00
LexManos 3c5103acfb Fix ItemStacks not getting the parent capability provider from items. Closes #2383 2016-01-17 13:37:57 -08:00
Bartek Bok fae5ff67ed Allow sleeping without bed 2016-01-17 00:43:29 +01:00
LexManos 17db34ae31 New Capability system allowing for more manageable world object features.
When combined with @Optional this should address all issues of soft dependancy on mods/apis.
This also addresses the issue of dynamic functionality in TileEntities/Entities.

Current capability providers: TileEntity, Entity, ItemStack

Also added INBTSerializeable, a generic interface for game objects that can be written to/from NBT tags.

Vanilla capabilities will be coming soon, mostly on request and review.
So start requesting capabiliteis on vanilla/Forge features.
2016-01-11 16:04:22 -08:00
LexManos 2302963a9f Add EMERALD and SILVERFISH to GenerateMinable event. Closes #1158 2015-12-10 02:16:58 -08:00
LexManos 5549b06f96 Compiler warnings pass, undeprecated SplashProgress related stuff. 2015-11-26 19:38:21 -08:00
cpw 68dfcccd57 Update mappings to 20151122. 2015-11-23 23:18:52 -05:00
darkevilmac b9f5e152de Add PlayerSetSpawnEvent 2015-10-10 15:39:27 -07:00
diesieben07 ebef4553f3 Re-introduce RenderBlockOverlayEvent, seems to have been missed during 1.8 update 2015-06-25 19:09:32 +02:00
LexManos 7406e3df9f Merge pull request #1795 from lumien231/ExperienceEvent
Added LivingExperienceDropsEvent to change how much experience an entity drops
2015-06-09 13:23:01 -07:00
Lex Manos df5e594e95 Loosen up ServerChatEvent to support IChatComponent Closes #1893 2015-05-25 13:34:34 -07:00
Lumien 81ab4cbc5f Added LivingExperienceDropsEvent to change the amount of experience an entity drops 2015-04-14 11:58:00 +02:00
JamiesWhiteShirt 3b567a92d8 Added newVolume and newPitch to PlaySoundAtEntityEvent. Deprecated ForgeEventFactory.onPlaySoundAt, added replacement ForgeEventFactory.onPlaySoundAtEntity. 2015-03-19 12:37:21 +01:00
LexManos 888bab92c3 Merge pull request #1723 from Geforce132/master
Add an EntityMountEvent.
2015-03-16 10:01:53 -07:00
Geforce132 d2f36d56f1 -Added EntityMountEvent. 2015-03-13 19:12:16 -05:00
Me4502 c21e38cd3b Add NeighborNotiftyEvent. 2015-03-01 16:53:32 +10:00
Lex Manos 48c24246a5 Fixed InitMapGenEvent's fire order so values are used. And added OCEAN_MONUMENT type. Closes #1681 2015-02-04 12:20:24 -08:00
Lex Manos 924db0ff03 Fixed NPE thrown when brewing event is fired and not all slots are filled. Closes #1564 2014-12-10 05:12:36 -08:00
Lex Manos f9955efb08 Expand PlayerWakupEvent to expose the three parameters passed into EntityPlayer.wakeUp. 2014-12-07 05:48:26 -08:00
Lex Manos 4cc11b220a Add quartz_ore tool init, more mojang special casing -.- 2014-12-07 03:41:53 -08:00
Lex Manos 27524a02ae Added PotionBrewEvent.Pre/Post. To allow for modification and cancelation of Brewing. 2014-12-07 03:30:10 -08:00
Lex Manos 44b21681e2 Add LivingHealEvent called from EntityLivingBase.heal() 2014-12-07 02:34:28 -08:00
Lex Manos f2b1622355 Added CreateSpawnPosition event. 2014-12-07 01:52:29 -08:00
Lex Manos 42938a1e7f Added Explosion Start and Detonate events to control explosion. 2014-12-07 00:28:41 -08:00
Lex Manos 59df94bd90 Updated FML:
MinecraftForge/FML@9c8ca4a4e3 Unlink banner block and item id. Mojang should of matched these up but they didn't -.-
MinecraftForge/FML@84a101f344 Update Dev mcp mappings to 11-30 snapshot.
2014-12-01 19:11:17 -08:00
Lex Manos d6d4735a70 Fixed Entity extended properties init order. Closes #1532 2014-11-29 23:03:26 -08:00
Lex Manos 6bb769268f Fix interacting with entities. 2014-11-28 12:04:09 -08:00
Lex Manos 53659fca06 Initial update to 1.8, Super beta. Most rendering related hooks are out due to major changes in 1.8.
Some notes:
Almost all int x, int y, int z parameters have been changed to BlockPos class
ForgeDirection has been removed, replaced by net.minecraft.util.EnumFacing.
All FML classes have moved from packet cpw.mods.fml to net.minecraftforge.fml
Fluid Rendering has been disabled for the time being, to be re-evaulated and a test mod created for it.
Minecraft now uses a Model based system for rendering blocks and Items. The intention is to expand the model format to better suit modder's needed once it is evaulated.
As such, The model loaders from Forge have been removed, to be replaced by expanding vanilla's model format.
Metadata has been extracted out in Minecraft to IBlockState, which holds a list of properties instead of magic number metadata. DO NOT listen to the fearmongering, you can do EVERYTHING with block states you could previously with metadata.
Stencil Bits are disabled entirely by for the main Display, Modders must enable and recreate the FrameBuffer if they wish to use Stencil Bits.
2014-11-26 00:00:54 -08:00
LexManos 3aef547046 Merge pull request #1418 from Parker8283/wakeupevent
Added PlayerWakeUpEvent
2014-10-11 11:34:50 -07:00
Parker ff36d4f1d3 Added PlayerWakeUpEvent 2014-10-11 14:13:25 -04:00
bloodshot 37f91681d9 Added PlaceEvent and MultiPlaceEvent which fires before placing a block.
Before calling "ItemStack.tryPlaceItemInWorld", a recording flag is turned on for
setBlock to capture a blocksnapshot for each block that attempts to be placed.

If 1 block is captured, a "BlockEvent.PlaceEvent" is fired to notify mods.
If 2 or more blocks are captured, a "BlockEvent.PlaceEvent" is fired first with the first block
captured followed by a "BlockEvent.MultiPlaceEvent" with all captured blocks. This extra event
is required for items that have the ability to place 2 or more blocks such as a BlockBed.

If either event is cancelled, the recorded block snapshot(s), item stacksize, and item meta will
revert back to the captured snapshot(s).
If the events are not cancelled, a notification will be sent to clients and block physics will be updated.

What this means for mods is Forge will be able to capture all player block placement automatically and fire
a PlaceEvent and/or MultiPlaceEvent.
If for whatever reason your mod does not use the standard placement methods then you will need to fire the
appropriate placement events in order to notify mods/servers.

This commit also includes a new utility class called BlockSnapshot which is serializable. This new class is used in conjunction with
both PlaceEvent and MultiPlaceEvent in order to record a snapshot of block space before it is altered. This
allows us to restore the block(s) if an event is cancelled. The class also provides the ability to restore a snapshot
to any location using the restoreToLocation method. This should be helpful to many mods that are looking to be able
to capture block data then restore it to back to any location required.
2014-10-02 11:33:25 -04:00
DemoXin 68fd0049fb * Added AT for ContainerRepair.stackSizeToBeUsedInRepair (Now public)
* Added ability to AnvilUpdateEvent to alter stackSizeToBeUsedInRepair (vanilla behavior is now reproducable)
* Added AnvilRepairEvent, fired when the player removes an ItemStack from the output slot of ContainerRepair, and allows the chance to damage the anvil to be altered.
2014-08-04 16:54:35 -04:00
Lex Manos f6471c3c08 Added World to ChunkProviderEvent.ReplaceBiomeBlocks, and exposed metadata to End and Nether generation events. Close #1201 2014-07-07 19:47:50 -07:00
LexManos 53ce6f69e7 Merge pull request #1200 from tterrag1098/master
Add AchievementEvent
2014-07-07 18:37:53 -07:00
Alex c410a2d9fc Added Javadoc comments for Forge Event documentation. 2014-07-06 18:41:11 -04:00
tterrag1098 a3c268b577 Add AchievementEvent
Allows modders to react to players receiving achievements, and cancel
them.

Fix indentation

More shortening

Down to one line...

Remove newline
2014-07-02 20:18:53 -04:00
Christian 4778c33902 And fix firing for single player loading. 2014-06-22 14:39:23 -04:00
Christian 127605ec3e Fix derpity derp. 2014-06-22 10:11:32 -04:00