Commit Graph

186 Commits

Author SHA1 Message Date
Flaxbeard e1ddc4315c Update EntityPlayer armor calculations and ISpecialArmor (#3838) 2017-05-26 14:11:52 -07:00
John Protsen dbc6baf2f7 Add Item.canDestroyBlocksInCreative() allowing more items to not break blocks in creative (#3805) 2017-04-07 16:59:21 -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
Ben Staddon f7f46be8ff Revert block snapshots in reverse order. Fixes #3608. 2017-04-07 16:24:59 -07:00
Paulo "JCranky" Siqueira be2d814155 Add LootTableManager to the LootTableLoadEvent (#3717) 2017-04-07 16:22:49 -07:00
sjx233 2003dee17f Add DifficultyChangeEvent (#3525) 2017-02-23 18:12:27 -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
mezz 2bd8b95a3b Cleanup some null checks and remove deprecated methods in Item and Block (#3429) 2016-11-22 15:20:05 -08:00
Shadowfacts 9cf74914e7 Initial annotations/nullability changes (#3392) 2016-11-18 13:24:03 -08:00
mezz 150566d9a3 [1.11] Fix nullability issues around ForgeHooks and Capabilities (#3395) 2016-11-17 10:44:31 -08:00
Shadowfacts bf8fa5d286 Fix crafting causing crash (#3388) Closes #3387 2016-11-16 16:15:24 -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
Draco18s 998a78c3c1 Added events for crop growth (#3320) 2016-11-07 14:40:44 -08: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
Paul Fulham 0c8f51bc95 Fix item use stats (#3216) 2016-08-22 21:29:48 -07:00
boni 8dbfe1baad Expand getHarvestLevel to include player and blockstate (#3192) 2016-08-19 15:54:37 -07: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
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
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
LexManos 4824d647f4 Set Enchantment table's harvest level. Closes #1349 2016-05-28 17:55:27 -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 34d4b0b93f Fix type in LootEntry json name. And rename LootTable.finalize to freeze to avoid overriding Object function. Closes #2846 and #2847 2016-05-10 23:35:02 -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
Matthew Messinger 5f74a75435 Fix url regex (#2815)
Fixed url detection in chat messages. Stops false positives such as `um.....no`
2016-05-04 10:46:33 -07:00
Matthew Prenger 2a3774def3 Don't use import static with net.minecraft classes. Using the latest MCP snapshots this causes an import conflict. (#2742) 2016-04-09 16:03:46 -07:00
Vincent Lee e8ea52558b Player Interact Event 2016-04-04 19:58:46 -05: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
Vincent Lee b38cfc1769 Actually fix dupe drop 2016-03-21 22:39:48 -05:00
Vincent Lee c39328993e Fix double dropping of items. Closes #2549 2016-03-19 19:57:11 -05:00
LexManos ae72fa7ceb Fixed breaking of tall grass. It now uses fortune. Expanded grass seed hooks to allow Fortune. Potentially removing in future in favor of LootTables. 2016-03-15 01:17:38 -07: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 25256c8ddd More fixups, removing chestgenstuff aggressively. Use loot tables. Any missing ones WILL be added by Mojang. 2016-03-08 23:22:54 -05:00
RainWarrior befbb45522 Most of ItemInWorldManager reject, various small error fixes. 2016-03-08 23:33:28 +03:00
LexManos 776eb00ed3 10 more rejects down.
98 errors 6 rejects left.
2016-03-07 23:34:40 -08:00
LexManos 26ca27193c More patch work, client patches. 2016-03-07 21:06:54 -08:00
LexManos 8a506022d7 More work on misc things. 2016-03-03 02:57:38 -08:00
LexManos 7fadb5aeb8 Small renames before bed. 2016-03-02 01:44:41 -08:00
LexManos 8863aab9e5 Items done, <1000 errors whoot! 2016-03-01 23:38:31 -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
VikeStep 026d179c0d Add EntityTravelToDimensionEvent
Resolve Merge Conflict

Move event call inside conditional
2016-01-25 17:57:52 +10: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
cpw 41c3846c51 Some generic and other warning cleanups 2015-11-13 10:13:47 -05:00
cpw 13c7d038eb LoadingScreenRenderer,Minecraft,GuiContainerCreative,PlayerControllerMP,LanguageManager,Locale,SimpleReloadableResourceManager,EntityList,EntityLivingBase,EntityWither,EntityMinecart,EntityPlayerMP
NethanlderPlayClient patch is now in vanilla. The FMLCommonHandler future exception catcher is not needed anymore, it's in Util. The caching of player profiles is now in vanilla (SkinManager).
2015-11-11 10:33:37 -05:00
Lex Manos 479c7f8b54 Redesign the ModList GUI to use a scrolling list for the main body content.
Allowing for larger information to be displayed.
URLs are auto-detected and now clickable.
Mod Logos are now centered, it looks better.
2015-11-04 13:57:47 -08:00
Timothy Tomkins dfd42ab573 Player sensitive version of Block.getPickBlock
Block.getPickBlock was patched in 1.7 but was overlooked in 1.8.

Closes: https://github.com/MinecraftForge/MinecraftForge/issues/1709
2015-04-09 02:09:58 -04:00
Lex Manos 5b28eb53e8 Add safty to URL detection in chat. Closes #1712 2015-02-16 22:46:55 -08:00
Lex Manos 51271dcc3a Fix MC-30864 (sending web links in chat) 2014-12-23 15:04:41 -08:00
Lex Manos 4cc11b220a Add quartz_ore tool init, more mojang special casing -.- 2014-12-07 03:41:53 -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 cbcdbf56bb Fixed Entities not being able to climb ladders, Closes #1535 2014-11-29 23:03:55 -08:00
Lex Manos 17e5480b6e Fix Entityies not taking damage correctly. Closes #1511 2014-11-28 07:43:10 -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
Lex Manos 47305ff691 Player sensitive version of Block.getPickBlock Closes #1348 2014-11-04 18:27:02 -08: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 42fc3c9516 Added Noteblock change and play events. Closes #1027 #1025 2014-06-02 16:57:04 -07:00
Lex Manos 5f62afb5f2 Add AnvilUpdateEvent which is fired when a user places a item in both input slots of a Anvil and allows modders to control the output. Closes #838 2014-04-02 18:33:13 -07:00
Lex Manos d9a1c718bf Add position to BreakSpeed event. Closes #621 2014-04-01 15:00:25 -07:00
Lex Manos e68577ffd3 Updated FML:
MinecraftForge/FML@03fb1879d7 Fix obf error when right clicking a Empty Map.
MinecraftForge/FML@6bb9b8b953 Clean up FMLEventChannel. Closes #367.
MinecraftForge/FML@b7b3450dcd Update MCP mapping snapshot to latest crowdsourced names.
MinecraftForge/FML@8c9e8b5270 Fix isRemote, this is integral to so many parts of the code, everyone knows it by this name, People should not change it.
2014-02-05 01:14:24 -08:00
Lex Manos baf95e747a Fix warnings in Forge codebase. 2014-01-17 21:55:48 -08:00
Christian cf3447feea Tidier implementation of previous commit. Should fix for subclasses of individual tools too 2013-12-27 21:48:42 -05:00
Christian 78b1b54e2b Add in harvesting abilities of the items, should fix effectiveness 2013-12-27 21:26:42 -05:00
Lex Manos a6827f9820 Fix dig speed on redstone ore and obsidian. 2013-12-25 00:41:21 -08:00
Lex Manos 40d02fe6c3 Add a version check mechanic to startup, it is done in a seperate thread and has a config option to compleetly disable it. This allows us to notify users of new recomended builds. Hopefully stemming the flow of outdated help request. Also adds a warning to the main screen if you are running a 'Beta' Forge. Which means a Forge for a new version of Minecraft that we have not promoted a recomended build for yet. 2013-12-25 00:35:59 -08:00
Lex Manos 8ca1179e04 Move Grass {Flower} registry to BiomeGenBase as 1.7 made flowers Biome specifc, this means modders who wish to add global base flowers need to add them to all the biomes indavidually. 2013-12-23 20:34:39 -08:00
Lex Manos 9ee5053b71 Fix:
Block placement/interaction
  Tesselator crash due to wrong mapping
  Missing isreplaceable check in world.canPlaceAt
  Small foratting/logging cleanup
  Temporarly commented out efficancy changes till I implement it.
2013-12-22 18:25:26 -08:00
Lex Manos a6c45a7ade Inital patch update for 1.7.2, Doesn't compile, not done yet. 2013-12-22 03:06:10 -08:00
Christian ae478c92a2 Moved the core event handler parts to FML. Implemented the Forge network handler based on the new
netty strategy.

Updated FML:
MinecraftForge/FML@3b2994a3de Some patching touchups
MinecraftForge/FML@557357fe17 Update for log4j2
MinecraftForge/FML@a2b324beb2 Copy eventhandler from Forge into FML. It is going to replace a lot of the runtime event systems.
MinecraftForge/FML@4071ff38af Patch some GUIs. We're gonna add some basic mod gui config support.
MinecraftForge/FML@0b419ac79c Fire a user event down the channels when a handshake has occured.
2013-12-16 20:19:03 -05:00
Lex Manos 439dbd8bb3 Killed a few hundred compile errors. 2013-12-12 23:32:36 -08:00
AbrarSyed 74104fe5d0 Update forge 2013-11-17 12:07:22 -06:00
AbrarSyed 797399ff7f Step 2: The Reformation 2013-11-09 15:57:08 -06:00
Renamed from common/net/minecraftforge/common/ForgeHooks.java (Browse further)