Compare commits

...
146 Commits
Author SHA1 Message Date
cpw 4e6a774075 Initial 1.11-pre1 update 2016-11-13 17:09:55 -05:00
cpw c177219ff3 regenerate entitylivingbase patch 2016-11-12 10:16:10 -05:00
cpw 9ab96fbda6 Update to 20161111 mcp names 2016-11-12 10:05:32 -05:00
mezz 7a4aa5a1c4 Improve error message from crashes during loading (#3362) 2016-11-10 20:00:11 -06: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
LatvianModder 27ebd0e9b9 Added PermissionAPI (#3155) 2016-11-04 13:36:30 -07:00
Choonster TheMage 9a9c02fa25 Add hand argument to BlockEvent.PlaceEvent (#3221) (#3270) 2016-11-03 11:53:12 -07:00
Jezza 5802a3b0b6 Fixes #3237 and #2752. (#3347)
* Fix #3237 by correctly utilising the keepLooking argument.

* Explain within SimpleNetworkWrapper's javadoc that the execute of the handler isn't on the main Minecraft thread.
2016-11-03 03:34:25 -07:00
Draco18s dc871ea273 Made default slot implementation respect inventory stack size limit. 2016-11-01 13:41:14 -07:00
Aaron Hill 5c78361b27 Fixed Block.setBedOccupied ignoring 'occupied' parameter 2016-10-31 17:45:43 -07:00
Raoul 56e347d05a Add Item#getNBTShareTag (#3342)
* Add Item#getNBTShareTag

* Update comment
2016-10-30 12:24:14 -05: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 858056c089 Fix POTENTIAL issue with Texture Stitcher exceeding max size. 2016-10-25 00:34:45 -07:00
CoderAtParadise bd62cf81fd Fixed Ore Dictionary replacing the oak boat recipe (#3329)
Fixes the oak boat recipe being able to be crafted with any wood
2016-10-24 13:44:18 -07:00
RWTema a1bbcf8a0b Improve the default isItemValid() and getItemStackLimit() implementations in SlotItemHandler. You can now properly swap the player's held itemstack with the slot's itemstack. (#3273) 2016-10-24 12:44:56 -07:00
LexManos 1eee6cd382 Fixed texture stitcher not using full texture height before expanding width. 2016-10-23 19:57:49 -07:00
LexManos 129f58c02f Update readme to be a little more clear. 2016-10-23 14:07:48 -07:00
LexManos 159ca09c54 Special case not drooping snowballs for water and snow layers. Closes #3326 2016-10-23 14:07:24 -07:00
Ben Staddon 9ecb005e98 Fix MC-105406 (OpenGL leak in View Frustum) (#3308) 2016-10-23 12:32:44 -07:00
mezz b0558c63de Fix very laggy mipmap slider MC-64581 (#3305) 2016-10-23 12:30:44 -07:00
Shadowfacts 80f0e0bb93 Add Block#getStateForPlacement (#3129) 2016-10-15 11:09:23 -07:00
mezz bea5d44273 Add better key modifier behavior for GUI contexts (#3307) 2016-10-14 13:14:27 -07:00
tterrag 7bbd3954f5 Make item repair recipe respect itemstack's getMaxDamage (#3295) 2016-10-11 16:40:59 -07:00
LexManos cfa63792bc Fix infinite loop in dragon fight when the dragon is over the void. 2016-10-11 12:35:18 -07:00
LexManos 490573a71f Fix Tabbing issues with config classes. 2016-10-11 12:21:14 -07:00
LexManos 9c7d20b3a1 Initial pass a re-working the configuration system.
Work in progress.
2016-10-10 22:15:35 -07:00
cpw d7b241c224 Add in missing test runner for a test. Fixes failing tests on jenkins, hopefully. 2016-10-10 15:20:51 -04:00
cpw d7dda9e960 Fix substitutions being broken after freezing - actually store the original state in registry copies, not the computed state, which is wrong because it only sees the sub, not the original. 2016-10-10 15:04:45 -04:00
cpw 5f06c95cfa Revert "Another fix for registry substitutions. Closes #3212"
This reverts commit ec2977afc9.
2016-10-10 15:04:45 -04:00
LexManos 6e8c05343c @ObjectHolder will now inject null for dummied objects. Closes #3301 2016-10-09 15:57:18 -07:00
Steven Blom d3da111c08 Allow all Forge Registries to work with ObjectHolder (#3220) 2016-10-09 13:34:38 -07:00
LexManos 7a63e67e9d Revert commits related to filtering proxy and Automatic Subscriber annotations.
Broke some existing setups, will require a annotation definition change in 1.11.
2016-10-09 12:36:21 -07:00
mezz d159f5f4e2 Fix proxy injector filtering. (#3300) 2016-10-09 01:22:28 -07:00
LexManos 92eb71ae9c Bump version for new Recommended Build. 2016-10-08 16:33:27 -07: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
LexManos c0db34796b Filter out proxy injectors for incorrect mods.
Prevents mod classes being initialized early when multiple mods are in the same source.
2016-10-08 16:27:49 -07:00
LexManos ad1324d478 Small Cleanup in example build.gradle. 2016-10-08 16:26:24 -07:00
mezz 3a3c436e3f Fix unbound keybindings are activated by unknown keyboard keys (#3288) 2016-10-02 11:02:48 -07:00
mmehnert 4feb1dff50 caseSensitiveCustomCategories must be set before loading the configuration file. (#3269)
Otherwise one set with categories in lowercase letters and on case sensitive
set is generated.
2016-09-22 17:03:35 -07:00
tterrag d3ad8aed76 Fix typo in sky rendering causing tons of BlockPos allocations (#3267) 2016-09-21 12:50:24 -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
Ivorius c58a66a816 Fix roofed forests posting decoration events for small mushrooms rather than big (#3259) 2016-09-17 10:51:35 -07:00
Matthew Messinger 2aaa4f424d Add support for offhand bow aiming animation (#3085)
Vanilla allows you to use a bow in your offhand, but it's not visible to others or in third person.
Fixes MC-88356
2016-09-16 18:53:17 -07:00
James Mitchell 89eb8f067d Remove oredict for Bone Block recipe, stop white dye to bonemeal exploit (#3255) 2016-09-15 01:03:52 -07:00
LexManos f08f3c1105 Fixed Biome.platFlower not being called when bonemealing grass. Closes #3254 2016-09-14 12:57:56 -07:00
LatvianModder 3b5ada083e Added getCommandMap() & getSortedCommandList() in CommandTreeBase (#3251) 2016-09-13 12:46: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
LatvianModder 4e3b6b0f15 Added CommandTreeBase (#3193) 2016-09-13 00:36:51 -07:00
Paul Fulham cac55abec2 Fix debug command creating empty file (MC-103399) (#3218) 2016-09-13 00:31:43 -07:00
Marvin Rösch bf6437c12a Fix universal bucket not being returned in crafting recipes (#3234) 2016-09-13 00:02:01 -07:00
cpw 853667c084 Create EnergySystems.md 2016-09-12 20:45:52 -04:00
LexManos b879cc9b73 Fix potential shading issue in GuiEditArrayEntries. Closes #3247 2016-09-12 14:48:55 -07:00
LexManos 45097fed0c Introducing a new standardized energy capability system.
Heavily inspired by the old RedstoneFlux API developed by King Lemming and Team CoFH.
2016-09-12 14:47:59 -07:00
LexManos 5964bf8cb2 Fixed ItemStacks having ForgeCaps tag when no caps are serialized. 2016-09-11 11:05:48 -07:00
LexManos 24cccab718 Fix Cactus being able top be planted on incorrect soil. 2016-09-11 10:42:06 -07:00
bloodmc ca1f704e2f Fix wrong var being used during getMaxSpawnPackSize check. (#3240) 2016-09-09 11:27:10 -07:00
LexManos f9c7caaf0c Move dismount version of EntityMountEvent to Entity class. Should fix canceling dismounting. Closes #3226 2016-08-29 15:49:59 -07:00
LexManos a05d4234f0 Yet another fix for stupid stairs. Closes #3224 2016-08-26 22:01:01 -07:00
LexManos c3fe6ecf7c Make StructureBlock TESRs always render. Closes #3222 2016-08-26 15:26:29 -07:00
Paul Fulham 0c8f51bc95 Fix item use stats (#3216) 2016-08-22 21:29:48 -07:00
LexManos 12769dbaae Fixed decorate event being called with SHROOM type for both convered trees and large mushrooms. Closes #3215 2016-08-22 16:40:24 -07:00
LexManos ec2977afc9 Another fix for registry substitutions. Closes #3212 2016-08-21 15:54:57 -07:00
LexManos a01bfc260a Update gradle wrapper to 2.14, reference MC json, and add java6 compat lines to default MDK build.gradle. 2016-08-20 17:11:17 -07:00
LexManos d6d9a45100 Add legacy support for signature change of AddCallback. 2016-08-20 17:11:17 -07:00
boni 3222a9a771 Revert changes to ItemTool for binary compatibility (#3211) 2016-08-20 13:53:04 -07:00
boni 8dbfe1baad Expand getHarvestLevel to include player and blockstate (#3192) 2016-08-19 15:54:37 -07:00
LexManos 7f40d90b75 Make enchantment tables spawn particles for any custom energy provider. Closes #3208 2016-08-19 15:11:43 -07:00
Vincent Lee b25a9256d3 Allow blocks to affect the beacon color (#3205) 2016-08-17 16:06:35 -07:00
LexManos f3d0d99404 Fix armors rendering badly. Closes #3196 2016-08-15 15:19:52 -07:00
Abastro dd41990db4 Fixed NPE from missing Capabilities (#3191) 2016-08-14 13:58:54 -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
LexManos b5db198f8b Fix vanilla bug in BlockFalling that caused blocks to loose state info during world gen. Closes #3183 2016-08-13 14:52:58 -07:00
MrIbby d17c025557 Added PlayerBrewedPotionEvent (#3187) 2016-08-13 13:38:45 -07:00
cpw 03c8852961 Don't crash if you select a fake player 2016-08-13 16:37:58 -04:00
LexManos 3a48a9cd73 Skip searching for mods in the JAVA_HOME directory. Closes #2249 and #2250 2016-08-13 13:28:21 -07:00
LexManos 20c662c1d0 Fix leather armor overlay not rendering when armor is pure white. Closes #3184 2016-08-13 13:02:59 -07:00
Joseph C. Sible 8195c36434 Fix test mod IDs, names, and versions (#3122)
Most of our test mods have bad IDs (uppercase) and are missing names or
versions. Forge produces a bunch of warnings in the console about this, which
makes it more likely that an important message will be missed.
2016-08-12 15:10:47 -07:00
Florian "Sangar" Nücke 180692ae5d Make InventoryHelper#spawnItemStack use ItemStack#splitStack to avoid losing capability data. (#3163) 2016-08-12 14:38:24 -07:00
shartte 7643be8cdc Unlike BakedQuad, UnpackedBakedQuad does not propagate the diffuse lighting flag to Vertex Consumers. Made UnpackedBakedQuad conform to BakedQuad's behavior. (#3181) 2016-08-12 14:33:38 -07:00
LexManos 4cd0f88a69 Add RenderTooltipEvent (#3034) 2016-08-12 13:57:07 -07:00
LexManos 1c8f22ed43 Set ModelLoader.WHITE's texture size iniatlly instead of defaulting to zero and being set later. 2016-08-12 13:49:46 -07:00
James Mitchell f20d728ed7 Fix #3165 Dispensers with buckets can destroy fluid handler blocks (#3180) 2016-08-12 01:36:18 -07:00
LexManos 704b683e27 Fix Fire not using getFireSpreadSpeed. Closes #3175 2016-08-09 17:04:55 -07:00
LexManos 1c11a3622e Fix issue with stairs. 2016-08-09 02:34:17 -07:00
LexManos fe2243df9f Removed unintentional functionality when using the Splash Screen. 2016-08-08 17:54:12 -07:00
LexManos fdea60f89a Disable DecorateEventDebug by default.
Prevents me thinking that decoration is broken >.<
2016-08-08 17:35:48 -07:00
LexManos 62ec59103a Compleetly skip FML handshake for Vanilla connections. Should fix race condition. Closes #3084 2016-08-08 17:35:15 -07:00
LexManos 69af6a9b8c Fix name in legacy support in registry changes. 2016-08-08 17:32:49 -07:00
LexManos ef28edb526 Make stair culling use actual state, and be more robust. Closes #3170 2016-08-08 17:32:32 -07:00
AlgorithmX2 bc6b008364 Fix Vertex Transformer for breaking models (#3132)
* Add setTexture to IVertexConsumer and propagate it.
2016-08-04 16:37:59 -07:00
LexManos 7c4ffde39c Fix Forge fluids not serializing properly. Closes #3152 2016-08-02 15:55:46 -07:00
LexManos f4e8804c8a Restone binary compatibility with registry substitution rework.
Modders please switch to using the provided RegistryBuilder to ensure more forward compatbility. Closes #3144
2016-08-02 15:55:18 -07:00
LexManos f088e3df6b Second pass at fixing 'Dissapearing Doors' This now more robustly fixes ALL uses of get and has slight performance improvements for itterable states. Closes #3139 2016-07-31 14:30:05 -07:00
LexManos 0f6b16cada Added config option to disable Forge's fix of Stair/Slab face culling.
Some vanilla resource packs exploit this issue in their custom models causing unintended rendering issues.
2016-07-30 10:31:46 -07:00
LexManos 4694152124 Fixed 'Dissapearing Doors', An issue where the world would try to save blockstates that are not serializeable. 2016-07-29 16:54:25 -07:00
cpw 0cba2ed4eb Allow CommandEvent to change the parameter set. Closes #1762 2016-07-29 17:15:19 -04:00
cpw 4dcee246d5 Another pass at substitutions - now capable of fixing up ItemBlock to point at the right block when a block is substituted, should also handle substituting itemblocks. There's some hackery in the way we have to change the value of ItemBlock.block, but it's not too egregious in my opinion. 2016-07-29 17:08:52 -04:00
cpw 53b43a6e1f Clean up AT file 2016-07-28 23:15:44 -04: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
Vincent Lee 40f335ba66 Expose vanilla brewing recipe registration
(cherry picked from commit 24bf163)
2016-07-28 22:00:28 -04:00
cpw de80d4c4af Clean up some legacy settings, making sure there's translation strings. Closes #2965 Thanks for the prompt Zaggy! 2016-07-28 21:47:36 -04:00
cpw 2aa7260bbb Refresh patch after cherry pick (cherry picked from commit 71f75bf) 2016-07-28 21:12:17 -04:00
Vincent Lee 2eb3b72618 Fix MC-91728
(cherry picked from commit 71f75bf)
2016-07-28 21:10:02 -04:00
Vincent Lee 36d7148c5f Remove sideonly on all other SoundType methods
(cherry picked from commit 46c7cac)
2016-07-28 21:03:08 -04:00
Me4502 579f028294 Fixed NeighborNotifyEvent not containing the piston facing direction.
(cherry picked from commit 5637c41)
2016-07-28 20:51:06 -04:00
AlgorithmX2 a3d8664028 Use extended state for breaking models (#3086) 2016-07-28 16:00:36 -07:00
cpw b380ba717f Clean up block patch. Also push json update. 2016-07-28 18:51:40 -04:00
cpw 9f9554f7e2 Merge remote-tracking branch 'origin/pr/3116' into 1.10.x 2016-07-28 18:48:51 -04:00
cpw 46cfaae3db Merge remote-tracking branch 'origin/pr/3089' into 1.10.x 2016-07-28 18:43:40 -04:00
cpw 5d9169db0f Merge remote-tracking branch 'origin/pr/3125' into 1.10.x 2016-07-28 18:25:45 -04:00
cpw bc82f2ae5a Fix #3126 - duplicate stat id error - don't use the "universal iterators" in statbuilding, use the one without the duplicate entries. (The duplicate entry one is for rendering setup) 2016-07-28 15:56:30 -04:00
Alexandre DUPONCHEL b0fd97557e FIX : IndexOutOfBoundException 2016-07-28 17:59:59 +02:00
cpw 543156a008 Tidy up some more todos 2016-07-27 10:52:48 -04:00
cpw 056ff67a81 Mark it for actual removal in 1.11 2016-07-27 10:41:20 -04:00
cpw ab64d1a166 Fix a vanilla bug with the blockstate ID map not being properly symmetric with respect to block.getStateFromMeta - closes #3012 properly but probably has a random MCJIRA ticket somewhere too. 2016-07-26 17:16:42 -04:00
Dakota Pierone 0cf2cdfdb3 Update decorate for biomes to support Decorate event 2016-07-24 10:40:14 -07:00
Vincent Lee f8ec3602f2 No-nonsense getSoundType 2016-07-24 11:44:21 -05:00
cpw 5a3047fbc2 Merge remote-tracking branch 'origin/pr/3072' into 1.10.x 2016-07-24 11:09:54 -04:00
cpw fe96792506 Merge remote-tracking branch 'origin/pr/3087' into 1.10.x 2016-07-24 10:57:47 -04:00
cpw cfba330459 Rename the event to RenderSpecificHandEvent 2016-07-24 10:56:05 -04:00
cpw 31b3825069 Merge remote-tracking branch 'origin/pr/3115' into 1.10.x 2016-07-24 10:38:20 -04:00
cpw cace1f00b2 Merge remote-tracking branch 'origin/pr/3110' into 1.10.x 2016-07-24 10:08:46 -04:00
cpw f96a31c945 Merge remote-tracking branch 'origin/pr/3112' into 1.10.x 2016-07-24 09:57:08 -04:00
Bernhard Bonigl bc27f0e204 Add shouldCauseBlockBreakReset callback to Item. This allows to keep breaking blocks if the NBT or similar changes. 2016-07-24 13:52:27 +02:00
Joseph C. Sible fc43ebbd7e Use CreateFluidSourceEvent for mod fluids as well 2016-07-23 22:39:54 -04:00
Joseph C. Sible 5ebf77bfd9 Add a test for CreateFluidSourceEvent 2016-07-23 22:39:54 -04:00
Joseph C. Sible b95d443f22 Add CreateFluidSourceEvent to control infinite fluid sources 2016-07-23 22:39:54 -04:00
cpw d7245c5ffe Merge remote-tracking branch 'origin/pr/3055' into 1.10.x - closes #3055 and #3043 hopefully. Complex solution, but it seems legit. Needs testing. 2016-07-23 20:14:51 -04:00
cpw 45b299ce06 Something that needs to happen: warn people about bad modids- if they're not lowercased, or if they're too long. 2016-07-23 20:01:54 -04:00
Vincent Lee 7ed5fc7e00 Add missing cancelable 2016-07-23 12:33:14 -05:00
Vincent Lee 94a41e1fcc Add hand-specific render event 2016-07-23 12:29:58 -05:00
mezz a963c9854d Fix hotkey with default modifier loading wrong when modifier set to NONE 2016-07-23 03:10:29 -07:00
Terrence Ezrol cc0e6a1825 Fix async race condition on new chunks (closes #3020) (#3090)
This patch fixes a race condition that sometimes caused a just generated chunk
to be generated a second time.  In some this caused generated structures to
appear incomplete such as in Issue #3020 when the second generated version
effectively overwrote the original version of the chunk.

This patch ensures when ProvideChunk calls LoadChunk synchronously we always
attempt to load the chunk (if not cached) thus avoid the race condition without
changing the logic for async loading for chunks already saved to disk.

Thus this should retain the async functionality from PR #2946 while preventing
generation issues caused by the race condition.
2016-07-21 18:51:45 -04:00
cpw b7739ffc71 Some tweaks to ContainedDeps - it should extract to a file in versionedMods directly, even if the tag in the jar has a subpath element. It'll also skip if there is a matching filename in the main mods dir. 2016-07-21 13:59:02 -04:00
cpw 8f74d05d02 Add the new tests into the suite 2016-07-20 21:29:13 -04:00
mezz 93a7ac3d89 Add TextureDump forge test mod 2016-07-13 17:04:47 -07:00
CreativeMD db2f5ab416 Fixed sound paused/resume issue 2016-07-13 20:10:38 +02:00
mezz ae0c02159f Force mipmap even if textures are the wrong size 2016-07-13 05:23:01 -07:00
Vincent Lee 17858ef497 Remove event stuff 2016-07-09 08:54:38 -05:00
Vincent Lee 591ecdd7c9 Move to a hook in EntityMinecart 2016-07-09 08:53:07 -05:00
Vincent Lee 7b5a5fbcbe Add ability for custom detector rail output 2016-07-08 21:14:55 -05:00
Mumfrey 32459b01b6 Store member field mappings in the mapping table, possible fix for #3043 2016-06-29 15:33:27 +01:00
436 changed files with 9777 additions and 3145 deletions

No files matched your search

+9
View File
@@ -0,0 +1,9 @@
# On the Contribution of an RF-lite Energy System: "Energy"
Forge has acquired an Energy system, after many years of debate on the topic. The prevalence of the RF API has warranted the inclusion of a similar (but simpler) implementation to forge for 1.10.2 and onwards.
Those who wish to use an RF like API, feel free to use it. If you don't want to think about Energy, but know you need it, you can use it *if you wish*. If you want to interoperate with other energy systems, feel free to use this to broker with them.
# On Diversity in Energy Systems
Forge has always supported diversity in energy-like systems. If you have a burning desire to simulate electricity flow in all it's glory, we fully support you and look forward to playing your mod. If you wish to have pneumatic power, we have no objections, and would love to see your wonderful creations. If you have a power system of your own devising that is simply beyond our imagination, please, blow us away.
# On Modder Obligations
As a modder, you are under *no* obligation to use or support the forge Energy system. If anyone, user, mod-pack maker or even us, tells you otherwise, refer them to this statement. The Forge energy system is not intended to supplant diversity in energy systems. It is not intended to be one-size-fits-all. The choice to support it, is the choice of the modder.
+4 -1
View File
@@ -35,8 +35,11 @@ Here is a short video from @cpw showing how to install and setup the MDK
If you wish to actually inspect Forge, submit PRs or otherwise work
with Forge itself, you're in the right place! Clone this (either
directly, or make a Fork first if you want to make a PR) and run
```gradlew.bat setup``` or ```gradlew setup```. This will download and
```gradlew.bat setupForge``` or ```gradlew setupForge```. This will download and
setup all the bits you need to have a functional Forge workspace.
After that, open a workspace in your favorite IDE and import existing projects
the projects folder.
Here is a short video from @cpw showing how to install and setup Forge
in Intellij.
-36
View File
@@ -1,36 +0,0 @@
*** HOW TO INSTALL ***
For Mod Users:
Download the latest installer from http://files.minecraftforge.net and follow instructions given by the installer.
For Mod Devs:
Download the latest Forge source distribution from http://files.minecraftforge.net and unzip it to a folder.
Open a command prompt, navigate to the directory where you unzipped the Forge sources, and run:
If you have Gradle: gradle setupDevWorkspace
If you DO NOT have Gradle installed:
Windows: ./gradlew.bat setupDevWorkspace
MacOS/Linux: ./gradlew setupDevWorkspace
If you wish to use the Eclipse IDE, run gradle eclipse instead of gradle setupDevWorkspace, or install the Gradle plugin for Eclipse and import the Forge source folder as a Gradle project.
To get the decompiled classes:
If you have Gradle: gradle setupDecompWorkspace
If you DO NOT have Gradle installed:
Windows: ./gradlew.bat setupDecompWorkspace
MacOS/Linux: ./gradlew setupDecompWorkspace
For Contributors: (Note: This assumes you have Gradle installed. If you don't, use ./gradlew(.bat) instead of gradle.
Clone this repository to a folder.
Open a command prompt and navigate to the folder where you cloned this repo.
Run gradle setupForge to setup your development environment.
To use Eclipse, point your Eclipse workspace at the eclipse folder inside the repo.
Requirements (for both mod devs and contributors):
You must have a JDK installed and accessible.
If you do not wish to use the gradle wrapper, you can install Gradle from http://www.gradle.org/ .
+2 -2
View File
@@ -26,10 +26,10 @@ apply plugin: "maven"
apply plugin: "net.minecraftforge.gradle.patcher"
apply plugin: "net.minecraftforge.gradle.launch4j"
minecraft.version = "1.10.2"
minecraft.version = "1.11-pre1"
minecraft {
mappings = 'snapshot_nodoc_20160518'
mappings = 'snapshot_nodoc_20161111'
workspaceDir = "projects"
versionJson = "jsons/${minecraft.version}-dev.json"
buildUserdev = true
+1 -1
View File
@@ -3,4 +3,4 @@ distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-2.7-bin.zip
distributionUrl=https\://services.gradle.org/distributions/gradle-2.14-bin.zip
+10 -10
View File
@@ -1,10 +1,10 @@
{
"assetIndex": {
"id": "1.10",
"sha1": "d3bfc4ffba1ea334c725dd91eaf4ecd402d641f7",
"size": 145627,
"url": "https://launchermeta.mojang.com/mc/assets/1.10/d3bfc4ffba1ea334c725dd91eaf4ecd402d641f7/1.10.json",
"totalSize": 121931230
"sha1": "72241db3c0bdc39e39b202182ff0000da5271a1d",
"size": 145874,
"url": "https://launchermeta.mojang.com/mc/assets/1.10/72241db3c0bdc39e39b202182ff0000da5271a1d/1.10.json",
"totalSize": 122198775
},
"assets": "1.10",
"downloads": {
@@ -242,13 +242,13 @@
}
},
{
"name": "com.mojang:realms:1.9.3",
"name": "com.mojang:realms:1.9.8",
"downloads": {
"artifact": {
"size": 1575798,
"sha1": "b291425bf7ef763452eaa894575018706339f72b",
"path": "com/mojang/realms/1.9.3/realms-1.9.3.jar",
"url": "https://libraries.minecraft.net/com/mojang/realms/1.9.3/realms-1.9.3.jar"
"size": 1577897,
"sha1": "c9609760e050cd7c369292252552c0cc81c54331",
"path": "com/mojang/realms/1.9.8/realms-1.9.8.jar",
"url": "https://libraries.minecraft.net/com/mojang/realms/1.9.8/realms-1.9.8.jar"
}
}
},
@@ -558,6 +558,6 @@
"minecraftArguments": "--username ${auth_player_name} --version ${version_name} --gameDir ${game_directory} --assetsDir ${assets_root} --assetIndex ${assets_index_name} --uuid ${auth_uuid} --accessToken ${auth_access_token} --userType ${user_type} --versionType ${version_type}",
"minimumLauncherVersion": 18,
"releaseTime": "2016-06-23T09:17:32+00:00",
"time": "2016-06-23T09:45:47+00:00",
"time": "2016-10-22T20:28:03+00:00",
"type": "release"
}
+92
View File
@@ -0,0 +1,92 @@
{
"id": "@minecraft_version@-@project@@version@",
"time": "@timestamp@",
"releaseTime": "1960-01-01T00:00:00-0700",
"type": "release",
"inheritsFrom": "1.11-pre1",
"minecraftArguments": "--version FML_DEV --tweakClass net.minecraftforge.fml.common.launcher.FMLTweaker",
"libraries": [
{
"name": "net.minecraft:launchwrapper:1.12"
},
{
"name": "jline:jline:2.13",
"children": ["sources"],
"url" : "http://repo.maven.apache.org/maven2"
},
{
"name": "com.google.code.findbugs:jsr305:1.3.9",
"children": ["sources"],
"url" : "http://repo.maven.apache.org/maven2"
},
{
"name": "org.ow2.asm:asm-debug-all:5.0.3",
"children" : ["sources"],
"url" : "http://repo.maven.apache.org/maven2"
},
{
"name": "com.typesafe.akka:akka-actor_2.11:2.3.3",
"children" : ["sources"],
"url" : "http://repo.maven.apache.org/maven2"
},
{
"name": "com.typesafe:config:1.2.1",
"children" : ["sources"],
"url" : "http://repo.maven.apache.org/maven2"
},
{
"name": "org.scala-lang:scala-actors-migration_2.11:1.1.0",
"children" : ["sources"],
"url" : "http://repo.maven.apache.org/maven2"
},
{
"name": "org.scala-lang:scala-compiler:2.11.1",
"children" : ["sources"],
"url" : "http://repo.maven.apache.org/maven2"
},
{
"name": "org.scala-lang.plugins:scala-continuations-library_2.11:1.0.2",
"children" : ["sources"],
"url" : "http://repo.maven.apache.org/maven2"
},
{
"name": "org.scala-lang.plugins:scala-continuations-plugin_2.11.1:1.0.2",
"children" : ["sources"],
"url" : "http://repo.maven.apache.org/maven2"
},
{
"name": "org.scala-lang:scala-library:2.11.1",
"children" : ["sources"],
"url" : "http://repo.maven.apache.org/maven2"
},
{
"name": "org.scala-lang.modules:scala-parser-combinators_2.11:1.0.1",
"children" : ["sources"],
"url" : "http://repo.maven.apache.org/maven2"
},
{
"name": "org.scala-lang:scala-reflect:2.11.1",
"children" : ["sources"],
"url" : "http://repo.maven.apache.org/maven2"
},
{
"name": "org.scala-lang.modules:scala-swing_2.11:1.0.1",
"children" : ["sources"],
"url" : "http://repo.maven.apache.org/maven2"
},
{
"name": "org.scala-lang.modules:scala-xml_2.11:1.0.2",
"children" : ["sources"],
"url" : "http://repo.maven.apache.org/maven2"
},
{
"name": "lzma:lzma:0.0.1"
},
{
"name": "java3d:vecmath:1.5.2"
},
{
"name": "net.sf.trove4j:trove4j:3.0.3"
}
]
}
+139
View File
@@ -0,0 +1,139 @@
{
"install": {
"profileName": "@project@",
"target":"@minecraft_version@-@project@@version@",
"path":"@artifact@",
"version":"@project@ @version@",
"filePath":"@universal_jar@",
"welcome":"Welcome to the simple @project@ installer.",
"minecraft":"@minecraft_version@",
"mirrorList" : "http://files.minecraftforge.net/mirror-brand.list",
"logo":"/big_logo.png"
},
"versionInfo": {
"id": "@minecraft_version@-@project@@version@",
"time": "@timestamp@",
"releaseTime": "1960-01-01T00:00:00-0700",
"type": "release",
"minecraftArguments": "--username ${auth_player_name} --version ${version_name} --gameDir ${game_directory} --assetsDir ${assets_root} --assetIndex ${assets_index_name} --uuid ${auth_uuid} --accessToken ${auth_access_token} --userType ${user_type} --tweakClass net.minecraftforge.fml.common.launcher.FMLTweaker --versionType Forge",
"mainClass": "net.minecraft.launchwrapper.Launch",
"inheritsFrom": "1.11-pre1",
"jar": "1.11-pre1",
"libraries": [
{
"name": "@artifact@",
"url": "http://files.minecraftforge.net/maven/"
},
{
"name": "net.minecraft:launchwrapper:1.12",
"serverreq":true
},
{
"name": "org.ow2.asm:asm-all:5.0.3",
"serverreq":true
},
{
"name": "jline:jline:2.13",
"url" : "http://files.minecraftforge.net/maven/",
"checksums" : [ "2d9530d0a25daffaffda7c35037b046b627bb171" ],
"serverreq":true,
"clientreq":false
},
{
"name": "com.typesafe.akka:akka-actor_2.11:2.3.3",
"url" : "http://files.minecraftforge.net/maven/",
"checksums" : [ "ed62e9fc709ca0f2ff1a3220daa8b70a2870078e", "25a86ccfdb6f6dfe08971f4825d0a01be83a6f2e" ],
"serverreq":true,
"clientreq":true
},
{
"name": "com.typesafe:config:1.2.1",
"url" : "http://files.minecraftforge.net/maven/",
"checksums" : [ "f771f71fdae3df231bcd54d5ca2d57f0bf93f467", "7d7bc36df0989d72f2d5d057309675777acc528b" ],
"serverreq":true,
"clientreq":true
},
{
"name": "org.scala-lang:scala-actors-migration_2.11:1.1.0",
"url" : "http://files.minecraftforge.net/maven/",
"checksums" : [ "dfa8bc42b181d5b9f1a5dd147f8ae308b893eb6f", "8c9aaeeb68487ca519411a14068e1b4d69739207" ],
"serverreq":true,
"clientreq":true
},
{
"name": "org.scala-lang:scala-compiler:2.11.1",
"url" : "http://files.minecraftforge.net/maven/",
"checksums" : [ "56ea2e6c025e0821f28d73ca271218b8dd04926a", "1444992390544ba3780867a13ff696a89d7d1639" ],
"serverreq":true,
"clientreq":true
},
{
"name": "org.scala-lang.plugins:scala-continuations-library_2.11:1.0.2",
"url" : "http://files.minecraftforge.net/maven/",
"checksums" : [ "87213338cd5a153a7712cb574c0ddd2edfee0386", "0b4c1bf8d48993f138d6e10c0c144e50acfff581" ],
"serverreq":true,
"clientreq":true
},
{
"name": "org.scala-lang.plugins:scala-continuations-plugin_2.11.1:1.0.2",
"url" : "http://files.minecraftforge.net/maven/",
"checksums" : [ "1f7371605d4ba42aa26d3443440c0083c587b4e9", "1ea655dda4504ae0a367327e2340cd3beaee6c73" ],
"serverreq":true,
"clientreq":true
},
{
"name": "org.scala-lang:scala-library:2.11.1",
"url" : "http://files.minecraftforge.net/maven/",
"checksums" : [ "0e11da23da3eabab9f4777b9220e60d44c1aab6a", "1e4df76e835201c6eabd43adca89ab11f225f134" ],
"serverreq":true,
"clientreq":true
},
{
"name": "org.scala-lang:scala-parser-combinators_2.11:1.0.1",
"url" : "http://files.minecraftforge.net/maven/",
"checksums" : [ "f05d7345bf5a58924f2837c6c1f4d73a938e1ff0", "a1cbbcbde1dcc614f4253ed1aa0b320bc78d8f1d" ],
"serverreq":true,
"clientreq":true
},
{
"name": "org.scala-lang:scala-reflect:2.11.1",
"url" : "http://files.minecraftforge.net/maven/",
"checksums" : [ "6580347e61cc7f8e802941e7fde40fa83b8badeb", "91ce0f0be20f4a536321724b4b3bbc6530ddcd88" ],
"serverreq":true,
"clientreq":true
},
{
"name": "org.scala-lang:scala-swing_2.11:1.0.1",
"url" : "http://files.minecraftforge.net/maven/",
"checksums" : [ "b1cdd92bd47b1e1837139c1c53020e86bb9112ae", "d77152691dcf5bbdb00529af37aa7d3d887b3e63" ],
"serverreq":true,
"clientreq":true
},
{
"name": "org.scala-lang:scala-xml_2.11:1.0.2",
"url" : "http://files.minecraftforge.net/maven/",
"checksums" : [ "7a80ec00aec122fba7cd4e0d4cdd87ff7e4cb6d0", "62736b01689d56b6d09a0164b7ef9da2b0b9633d" ],
"serverreq":true,
"clientreq":true
},
{
"name": "lzma:lzma:0.0.1",
"serverreq":true
},
{
"name": "net.sf.jopt-simple:jopt-simple:4.6",
"serverreq":true
},
{
"name": "java3d:vecmath:1.5.2",
"clientreq":true,
"serverreq":true
},
{
"name": "net.sf.trove4j:trove4j:3.0.3",
"clientreq":true,
"serverreq":true
}
]
}
}
+563
View File
@@ -0,0 +1,563 @@
{
"assetIndex": {
"id": "1.11",
"sha1": "a3d659674093b94bb39b9ddc7d63ed75c7a340e0",
"size": 157388,
"url": "https://launchermeta.mojang.com/mc/assets/1.11/a3d659674093b94bb39b9ddc7d63ed75c7a340e0/1.11.json",
"totalSize": 123827946
},
"assets": "1.11",
"downloads": {
"client": {
"sha1": "fdc07c099ad33f77c426464754841747a09ee8d7",
"size": 9183464,
"url": "https://launcher.mojang.com/mc/game/1.11-pre1/client/fdc07c099ad33f77c426464754841747a09ee8d7/client.jar"
},
"server": {
"sha1": "7e2884f11e3fb52ed1ad82376e3cada3aa95152e",
"size": 9713399,
"url": "https://launcher.mojang.com/mc/game/1.11-pre1/server/7e2884f11e3fb52ed1ad82376e3cada3aa95152e/server.jar"
}
},
"id": "1.11-pre1",
"libraries": [
{
"name": "com.mojang:netty:1.6",
"downloads": {
"artifact": {
"size": 7877,
"sha1": "4b75825a06139752bd800d9e29c5fd55b8b1b1e4",
"path": "com/mojang/netty/1.6/netty-1.6.jar",
"url": "https://libraries.minecraft.net/com/mojang/netty/1.6/netty-1.6.jar"
}
}
},
{
"name": "oshi-project:oshi-core:1.1",
"downloads": {
"artifact": {
"size": 30973,
"sha1": "9ddf7b048a8d701be231c0f4f95fd986198fd2d8",
"path": "oshi-project/oshi-core/1.1/oshi-core-1.1.jar",
"url": "https://libraries.minecraft.net/oshi-project/oshi-core/1.1/oshi-core-1.1.jar"
}
}
},
{
"name": "net.java.dev.jna:jna:3.4.0",
"downloads": {
"artifact": {
"size": 1008730,
"sha1": "803ff252fedbd395baffd43b37341dc4a150a554",
"path": "net/java/dev/jna/jna/3.4.0/jna-3.4.0.jar",
"url": "https://libraries.minecraft.net/net/java/dev/jna/jna/3.4.0/jna-3.4.0.jar"
}
}
},
{
"name": "net.java.dev.jna:platform:3.4.0",
"downloads": {
"artifact": {
"size": 913436,
"sha1": "e3f70017be8100d3d6923f50b3d2ee17714e9c13",
"path": "net/java/dev/jna/platform/3.4.0/platform-3.4.0.jar",
"url": "https://libraries.minecraft.net/net/java/dev/jna/platform/3.4.0/platform-3.4.0.jar"
}
}
},
{
"name": "com.ibm.icu:icu4j-core-mojang:51.2",
"downloads": {
"artifact": {
"size": 1634692,
"sha1": "63d216a9311cca6be337c1e458e587f99d382b84",
"path": "com/ibm/icu/icu4j-core-mojang/51.2/icu4j-core-mojang-51.2.jar",
"url": "https://libraries.minecraft.net/com/ibm/icu/icu4j-core-mojang/51.2/icu4j-core-mojang-51.2.jar"
}
}
},
{
"name": "net.sf.jopt-simple:jopt-simple:4.6",
"downloads": {
"artifact": {
"size": 62477,
"sha1": "306816fb57cf94f108a43c95731b08934dcae15c",
"path": "net/sf/jopt-simple/jopt-simple/4.6/jopt-simple-4.6.jar",
"url": "https://libraries.minecraft.net/net/sf/jopt-simple/jopt-simple/4.6/jopt-simple-4.6.jar"
}
}
},
{
"name": "com.paulscode:codecjorbis:20101023",
"downloads": {
"artifact": {
"size": 103871,
"sha1": "c73b5636faf089d9f00e8732a829577de25237ee",
"path": "com/paulscode/codecjorbis/20101023/codecjorbis-20101023.jar",
"url": "https://libraries.minecraft.net/com/paulscode/codecjorbis/20101023/codecjorbis-20101023.jar"
}
}
},
{
"name": "com.paulscode:codecwav:20101023",
"downloads": {
"artifact": {
"size": 5618,
"sha1": "12f031cfe88fef5c1dd36c563c0a3a69bd7261da",
"path": "com/paulscode/codecwav/20101023/codecwav-20101023.jar",
"url": "https://libraries.minecraft.net/com/paulscode/codecwav/20101023/codecwav-20101023.jar"
}
}
},
{
"name": "com.paulscode:libraryjavasound:20101123",
"downloads": {
"artifact": {
"size": 21679,
"sha1": "5c5e304366f75f9eaa2e8cca546a1fb6109348b3",
"path": "com/paulscode/libraryjavasound/20101123/libraryjavasound-20101123.jar",
"url": "https://libraries.minecraft.net/com/paulscode/libraryjavasound/20101123/libraryjavasound-20101123.jar"
}
}
},
{
"name": "com.paulscode:librarylwjglopenal:20100824",
"downloads": {
"artifact": {
"size": 18981,
"sha1": "73e80d0794c39665aec3f62eee88ca91676674ef",
"path": "com/paulscode/librarylwjglopenal/20100824/librarylwjglopenal-20100824.jar",
"url": "https://libraries.minecraft.net/com/paulscode/librarylwjglopenal/20100824/librarylwjglopenal-20100824.jar"
}
}
},
{
"name": "com.paulscode:soundsystem:20120107",
"downloads": {
"artifact": {
"size": 65020,
"sha1": "419c05fe9be71f792b2d76cfc9b67f1ed0fec7f6",
"path": "com/paulscode/soundsystem/20120107/soundsystem-20120107.jar",
"url": "https://libraries.minecraft.net/com/paulscode/soundsystem/20120107/soundsystem-20120107.jar"
}
}
},
{
"name": "io.netty:netty-all:4.0.23.Final",
"downloads": {
"artifact": {
"size": 1779991,
"sha1": "0294104aaf1781d6a56a07d561e792c5d0c95f45",
"path": "io/netty/netty-all/4.0.23.Final/netty-all-4.0.23.Final.jar",
"url": "https://libraries.minecraft.net/io/netty/netty-all/4.0.23.Final/netty-all-4.0.23.Final.jar"
}
}
},
{
"name": "com.google.guava:guava:17.0",
"downloads": {
"artifact": {
"size": 2243036,
"sha1": "9c6ef172e8de35fd8d4d8783e4821e57cdef7445",
"path": "com/google/guava/guava/17.0/guava-17.0.jar",
"url": "https://libraries.minecraft.net/com/google/guava/guava/17.0/guava-17.0.jar"
}
}
},
{
"name": "org.apache.commons:commons-lang3:3.3.2",
"downloads": {
"artifact": {
"size": 412739,
"sha1": "90a3822c38ec8c996e84c16a3477ef632cbc87a3",
"path": "org/apache/commons/commons-lang3/3.3.2/commons-lang3-3.3.2.jar",
"url": "https://libraries.minecraft.net/org/apache/commons/commons-lang3/3.3.2/commons-lang3-3.3.2.jar"
}
}
},
{
"name": "commons-io:commons-io:2.4",
"downloads": {
"artifact": {
"size": 185140,
"sha1": "b1b6ea3b7e4aa4f492509a4952029cd8e48019ad",
"path": "commons-io/commons-io/2.4/commons-io-2.4.jar",
"url": "https://libraries.minecraft.net/commons-io/commons-io/2.4/commons-io-2.4.jar"
}
}
},
{
"name": "commons-codec:commons-codec:1.9",
"downloads": {
"artifact": {
"size": 263965,
"sha1": "9ce04e34240f674bc72680f8b843b1457383161a",
"path": "commons-codec/commons-codec/1.9/commons-codec-1.9.jar",
"url": "https://libraries.minecraft.net/commons-codec/commons-codec/1.9/commons-codec-1.9.jar"
}
}
},
{
"name": "net.java.jinput:jinput:2.0.5",
"downloads": {
"artifact": {
"size": 208338,
"sha1": "39c7796b469a600f72380316f6b1f11db6c2c7c4",
"path": "net/java/jinput/jinput/2.0.5/jinput-2.0.5.jar",
"url": "https://libraries.minecraft.net/net/java/jinput/jinput/2.0.5/jinput-2.0.5.jar"
}
}
},
{
"name": "net.java.jutils:jutils:1.0.0",
"downloads": {
"artifact": {
"size": 7508,
"sha1": "e12fe1fda814bd348c1579329c86943d2cd3c6a6",
"path": "net/java/jutils/jutils/1.0.0/jutils-1.0.0.jar",
"url": "https://libraries.minecraft.net/net/java/jutils/jutils/1.0.0/jutils-1.0.0.jar"
}
}
},
{
"name": "com.google.code.gson:gson:2.2.4",
"downloads": {
"artifact": {
"size": 190432,
"sha1": "a60a5e993c98c864010053cb901b7eab25306568",
"path": "com/google/code/gson/gson/2.2.4/gson-2.2.4.jar",
"url": "https://libraries.minecraft.net/com/google/code/gson/gson/2.2.4/gson-2.2.4.jar"
}
}
},
{
"name": "com.mojang:authlib:1.5.24",
"downloads": {
"artifact": {
"size": 64353,
"sha1": "0889ff5477b844800cff734babbf42c1bbda4b10",
"path": "com/mojang/authlib/1.5.24/authlib-1.5.24.jar",
"url": "https://libraries.minecraft.net/com/mojang/authlib/1.5.24/authlib-1.5.24.jar"
}
}
},
{
"name": "com.mojang:realms:1.10.0",
"downloads": {
"artifact": {
"size": 1493992,
"sha1": "e73c98944e2170f895357a703c3322bcd68d1699",
"path": "com/mojang/realms/1.10.0/realms-1.10.0.jar",
"url": "https://libraries.minecraft.net/com/mojang/realms/1.10.0/realms-1.10.0.jar"
}
}
},
{
"name": "org.apache.commons:commons-compress:1.8.1",
"downloads": {
"artifact": {
"size": 365552,
"sha1": "a698750c16740fd5b3871425f4cb3bbaa87f529d",
"path": "org/apache/commons/commons-compress/1.8.1/commons-compress-1.8.1.jar",
"url": "https://libraries.minecraft.net/org/apache/commons/commons-compress/1.8.1/commons-compress-1.8.1.jar"
}
}
},
{
"name": "org.apache.httpcomponents:httpclient:4.3.3",
"downloads": {
"artifact": {
"size": 589512,
"sha1": "18f4247ff4572a074444572cee34647c43e7c9c7",
"path": "org/apache/httpcomponents/httpclient/4.3.3/httpclient-4.3.3.jar",
"url": "https://libraries.minecraft.net/org/apache/httpcomponents/httpclient/4.3.3/httpclient-4.3.3.jar"
}
}
},
{
"name": "commons-logging:commons-logging:1.1.3",
"downloads": {
"artifact": {
"size": 62050,
"sha1": "f6f66e966c70a83ffbdb6f17a0919eaf7c8aca7f",
"path": "commons-logging/commons-logging/1.1.3/commons-logging-1.1.3.jar",
"url": "https://libraries.minecraft.net/commons-logging/commons-logging/1.1.3/commons-logging-1.1.3.jar"
}
}
},
{
"name": "org.apache.httpcomponents:httpcore:4.3.2",
"downloads": {
"artifact": {
"size": 282269,
"sha1": "31fbbff1ddbf98f3aa7377c94d33b0447c646b6e",
"path": "org/apache/httpcomponents/httpcore/4.3.2/httpcore-4.3.2.jar",
"url": "https://libraries.minecraft.net/org/apache/httpcomponents/httpcore/4.3.2/httpcore-4.3.2.jar"
}
}
},
{
"name": "it.unimi.dsi:fastutil:7.0.12_mojang",
"downloads": {
"artifact": {
"size": 522306,
"sha1": "ba787e741efdc425fc5d2ea654b57c15fba27efa",
"path": "it/unimi/dsi/fastutil/7.0.12_mojang/fastutil-7.0.12_mojang.jar",
"url": "https://libraries.minecraft.net/it/unimi/dsi/fastutil/7.0.12_mojang/fastutil-7.0.12_mojang.jar"
}
}
},
{
"name": "org.apache.logging.log4j:log4j-api:2.0-beta9",
"downloads": {
"artifact": {
"size": 108161,
"sha1": "1dd66e68cccd907880229f9e2de1314bd13ff785",
"path": "org/apache/logging/log4j/log4j-api/2.0-beta9/log4j-api-2.0-beta9.jar",
"url": "https://libraries.minecraft.net/org/apache/logging/log4j/log4j-api/2.0-beta9/log4j-api-2.0-beta9.jar"
}
}
},
{
"name": "org.apache.logging.log4j:log4j-core:2.0-beta9",
"downloads": {
"artifact": {
"size": 681134,
"sha1": "678861ba1b2e1fccb594bb0ca03114bb05da9695",
"path": "org/apache/logging/log4j/log4j-core/2.0-beta9/log4j-core-2.0-beta9.jar",
"url": "https://libraries.minecraft.net/org/apache/logging/log4j/log4j-core/2.0-beta9/log4j-core-2.0-beta9.jar"
}
}
},
{
"name": "org.lwjgl.lwjgl:lwjgl:2.9.4-nightly-20150209",
"rules": [
{
"action": "allow"
},
{
"action": "disallow",
"os": {
"name": "osx"
}
}
],
"downloads": {
"artifact": {
"size": 1047168,
"sha1": "697517568c68e78ae0b4544145af031c81082dfe",
"path": "org/lwjgl/lwjgl/lwjgl/2.9.4-nightly-20150209/lwjgl-2.9.4-nightly-20150209.jar",
"url": "https://libraries.minecraft.net/org/lwjgl/lwjgl/lwjgl/2.9.4-nightly-20150209/lwjgl-2.9.4-nightly-20150209.jar"
}
}
},
{
"name": "org.lwjgl.lwjgl:lwjgl_util:2.9.4-nightly-20150209",
"rules": [
{
"action": "allow"
},
{
"action": "disallow",
"os": {
"name": "osx"
}
}
],
"downloads": {
"artifact": {
"size": 173887,
"sha1": "d51a7c040a721d13efdfbd34f8b257b2df882ad0",
"path": "org/lwjgl/lwjgl/lwjgl_util/2.9.4-nightly-20150209/lwjgl_util-2.9.4-nightly-20150209.jar",
"url": "https://libraries.minecraft.net/org/lwjgl/lwjgl/lwjgl_util/2.9.4-nightly-20150209/lwjgl_util-2.9.4-nightly-20150209.jar"
}
}
},
{
"extract": {
"exclude": [
"META-INF/"
]
},
"name": "org.lwjgl.lwjgl:lwjgl-platform:2.9.4-nightly-20150209",
"natives": {
"linux": "natives-linux",
"osx": "natives-osx",
"windows": "natives-windows"
},
"rules": [
{
"action": "allow"
},
{
"action": "disallow",
"os": {
"name": "osx"
}
}
],
"downloads": {
"classifiers": {
"natives-linux": {
"size": 578680,
"sha1": "931074f46c795d2f7b30ed6395df5715cfd7675b",
"path": "org/lwjgl/lwjgl/lwjgl-platform/2.9.4-nightly-20150209/lwjgl-platform-2.9.4-nightly-20150209-natives-linux.jar",
"url": "https://libraries.minecraft.net/org/lwjgl/lwjgl/lwjgl-platform/2.9.4-nightly-20150209/lwjgl-platform-2.9.4-nightly-20150209-natives-linux.jar"
},
"natives-osx": {
"size": 426822,
"sha1": "bcab850f8f487c3f4c4dbabde778bb82bd1a40ed",
"path": "org/lwjgl/lwjgl/lwjgl-platform/2.9.4-nightly-20150209/lwjgl-platform-2.9.4-nightly-20150209-natives-osx.jar",
"url": "https://libraries.minecraft.net/org/lwjgl/lwjgl/lwjgl-platform/2.9.4-nightly-20150209/lwjgl-platform-2.9.4-nightly-20150209-natives-osx.jar"
},
"natives-windows": {
"size": 613748,
"sha1": "b84d5102b9dbfabfeb5e43c7e2828d98a7fc80e0",
"path": "org/lwjgl/lwjgl/lwjgl-platform/2.9.4-nightly-20150209/lwjgl-platform-2.9.4-nightly-20150209-natives-windows.jar",
"url": "https://libraries.minecraft.net/org/lwjgl/lwjgl/lwjgl-platform/2.9.4-nightly-20150209/lwjgl-platform-2.9.4-nightly-20150209-natives-windows.jar"
}
},
"artifact": {
"size": 22,
"sha1": "b04f3ee8f5e43fa3b162981b50bb72fe1acabb33",
"path": "org/lwjgl/lwjgl/lwjgl-platform/2.9.4-nightly-20150209/lwjgl-platform-2.9.4-nightly-20150209.jar",
"url": "https://libraries.minecraft.net/org/lwjgl/lwjgl/lwjgl-platform/2.9.4-nightly-20150209/lwjgl-platform-2.9.4-nightly-20150209.jar"
}
}
},
{
"name": "org.lwjgl.lwjgl:lwjgl:2.9.2-nightly-20140822",
"rules": [
{
"action": "allow",
"os": {
"name": "osx"
}
}
],
"downloads": {
"artifact": {
"size": 1045632,
"sha1": "7707204c9ffa5d91662de95f0a224e2f721b22af",
"path": "org/lwjgl/lwjgl/lwjgl/2.9.2-nightly-20140822/lwjgl-2.9.2-nightly-20140822.jar",
"url": "https://libraries.minecraft.net/org/lwjgl/lwjgl/lwjgl/2.9.2-nightly-20140822/lwjgl-2.9.2-nightly-20140822.jar"
}
}
},
{
"name": "org.lwjgl.lwjgl:lwjgl_util:2.9.2-nightly-20140822",
"rules": [
{
"action": "allow",
"os": {
"name": "osx"
}
}
],
"downloads": {
"artifact": {
"size": 173887,
"sha1": "f0e612c840a7639c1f77f68d72a28dae2f0c8490",
"path": "org/lwjgl/lwjgl/lwjgl_util/2.9.2-nightly-20140822/lwjgl_util-2.9.2-nightly-20140822.jar",
"url": "https://libraries.minecraft.net/org/lwjgl/lwjgl/lwjgl_util/2.9.2-nightly-20140822/lwjgl_util-2.9.2-nightly-20140822.jar"
}
}
},
{
"extract": {
"exclude": [
"META-INF/"
]
},
"name": "org.lwjgl.lwjgl:lwjgl-platform:2.9.2-nightly-20140822",
"natives": {
"linux": "natives-linux",
"osx": "natives-osx",
"windows": "natives-windows"
},
"rules": [
{
"action": "allow",
"os": {
"name": "osx"
}
}
],
"downloads": {
"classifiers": {
"natives-linux": {
"size": 578539,
"sha1": "d898a33b5d0a6ef3fed3a4ead506566dce6720a5",
"path": "org/lwjgl/lwjgl/lwjgl-platform/2.9.2-nightly-20140822/lwjgl-platform-2.9.2-nightly-20140822-natives-linux.jar",
"url": "https://libraries.minecraft.net/org/lwjgl/lwjgl/lwjgl-platform/2.9.2-nightly-20140822/lwjgl-platform-2.9.2-nightly-20140822-natives-linux.jar"
},
"natives-osx": {
"size": 468116,
"sha1": "79f5ce2fea02e77fe47a3c745219167a542121d7",
"path": "org/lwjgl/lwjgl/lwjgl-platform/2.9.2-nightly-20140822/lwjgl-platform-2.9.2-nightly-20140822-natives-osx.jar",
"url": "https://libraries.minecraft.net/org/lwjgl/lwjgl/lwjgl-platform/2.9.2-nightly-20140822/lwjgl-platform-2.9.2-nightly-20140822-natives-osx.jar"
},
"natives-windows": {
"size": 613680,
"sha1": "78b2a55ce4dc29c6b3ec4df8ca165eba05f9b341",
"path": "org/lwjgl/lwjgl/lwjgl-platform/2.9.2-nightly-20140822/lwjgl-platform-2.9.2-nightly-20140822-natives-windows.jar",
"url": "https://libraries.minecraft.net/org/lwjgl/lwjgl/lwjgl-platform/2.9.2-nightly-20140822/lwjgl-platform-2.9.2-nightly-20140822-natives-windows.jar"
}
}
}
},
{
"extract": {
"exclude": [
"META-INF/"
]
},
"name": "net.java.jinput:jinput-platform:2.0.5",
"natives": {
"linux": "natives-linux",
"osx": "natives-osx",
"windows": "natives-windows"
},
"downloads": {
"classifiers": {
"natives-linux": {
"size": 10362,
"sha1": "7ff832a6eb9ab6a767f1ade2b548092d0fa64795",
"path": "net/java/jinput/jinput-platform/2.0.5/jinput-platform-2.0.5-natives-linux.jar",
"url": "https://libraries.minecraft.net/net/java/jinput/jinput-platform/2.0.5/jinput-platform-2.0.5-natives-linux.jar"
},
"natives-osx": {
"size": 12186,
"sha1": "53f9c919f34d2ca9de8c51fc4e1e8282029a9232",
"path": "net/java/jinput/jinput-platform/2.0.5/jinput-platform-2.0.5-natives-osx.jar",
"url": "https://libraries.minecraft.net/net/java/jinput/jinput-platform/2.0.5/jinput-platform-2.0.5-natives-osx.jar"
},
"natives-windows": {
"size": 155179,
"sha1": "385ee093e01f587f30ee1c8a2ee7d408fd732e16",
"path": "net/java/jinput/jinput-platform/2.0.5/jinput-platform-2.0.5-natives-windows.jar",
"url": "https://libraries.minecraft.net/net/java/jinput/jinput-platform/2.0.5/jinput-platform-2.0.5-natives-windows.jar"
}
}
}
}
],
"logging": {
"client": {
"file": {
"id": "client-1.7.xml",
"sha1": "49e2e41bc339698bd8199e0da9398c926e68c95d",
"size": 467,
"url": "https://launchermeta.mojang.com/mc/log_configs/client-1.7.xml/49e2e41bc339698bd8199e0da9398c926e68c95d/client-1.7.xml"
},
"argument": "-Dlog4j.configurationFile=${path}",
"type": "log4j2-xml"
}
},
"mainClass": "net.minecraft.client.main.Main",
"minecraftArguments": "--username ${auth_player_name} --version ${version_name} --gameDir ${game_directory} --assetsDir ${assets_root} --assetIndex ${assets_index_name} --uuid ${auth_uuid} --accessToken ${auth_access_token} --userType ${user_type} --versionType ${version_type}",
"minimumLauncherVersion": 18,
"releaseTime": "2016-11-08T13:42:50+00:00",
"time": "2016-11-08T13:44:29+00:00",
"type": "snapshot"
}
+8 -12
View File
@@ -1,29 +1,25 @@
// For those who want the bleeding edge
buildscript {
repositories {
jcenter()
maven {
name = "forge"
url = "http://files.minecraftforge.net/maven"
}
maven { url = "http://files.minecraftforge.net/maven" }
}
dependencies {
classpath 'net.minecraftforge.gradle:ForgeGradle:2.2-SNAPSHOT'
}
}
apply plugin: 'net.minecraftforge.gradle.forge'
//Only edit below this line, the above code adds and enables the nessasary things for Forge to be setup.
/*
// for people who want stable - not yet functional for MC 1.8.8 - we require the forgegradle 2.1 snapshot
plugins {
id "net.minecraftforge.gradle.forge" version "2.0.2"
}
*/
version = "1.0"
group= "com.yourname.modid" // http://maven.apache.org/guides/mini/guide-naming-conventions.html
archivesBaseName = "modid"
sourceCompatibility = targetCompatibility = "1.6" // Need this here so eclipse task generates correctly.
compileJava {
sourceCompatibility = targetCompatibility = "1.6"
}
minecraft {
version = "@VERSION@"
runDir = "run"
@@ -1,6 +1,6 @@
--- ../src-base/minecraft/net/minecraft/block/Block.java
+++ ../src-work/minecraft/net/minecraft/block/Block.java
@@ -44,11 +44,12 @@
@@ -50,11 +50,12 @@
import net.minecraftforge.fml.relauncher.Side;
import net.minecraftforge.fml.relauncher.SideOnly;
@@ -14,9 +14,9 @@
+ @Deprecated //Modders: DO NOT use this! Use GameRegistry
+ public static final ObjectIntIdentityMap<IBlockState> field_176229_d = net.minecraftforge.fml.common.registry.GameData.getBlockStateIDMap();
public static final AxisAlignedBB field_185505_j = new AxisAlignedBB(0.0D, 0.0D, 0.0D, 1.0D, 1.0D, 1.0D);
@Nullable
public static final AxisAlignedBB field_185506_k = null;
private CreativeTabs field_149772_a;
@@ -84,7 +85,8 @@
@@ -91,7 +92,8 @@
public static Block func_149729_e(int p_149729_0_)
{
@@ -26,7 +26,7 @@
}
public static IBlockState func_176220_d(int p_176220_0_)
@@ -292,7 +294,7 @@
@@ -307,7 +309,7 @@
public boolean func_176200_f(IBlockAccess p_176200_1_, BlockPos p_176200_2_)
{
@@ -35,7 +35,7 @@
}
public Block func_149711_c(float p_149711_1_)
@@ -330,9 +332,10 @@
@@ -345,9 +347,10 @@
return this.field_149789_z;
}
@@ -47,7 +47,7 @@
}
@Deprecated
@@ -376,13 +379,13 @@
@@ -360,13 +363,13 @@
@SideOnly(Side.CLIENT)
public int func_185484_c(IBlockState p_185484_1_, IBlockAccess p_185484_2_, BlockPos p_185484_3_)
{
@@ -63,7 +63,7 @@
}
else
{
@@ -446,7 +449,7 @@
@@ -430,7 +433,7 @@
}
}
@@ -71,8 +71,8 @@
+ return !p_176225_2_.func_180495_p(p_176225_3_.func_177972_a(p_176225_4_)).doesSideBlockRendering(p_176225_2_, p_176225_3_.func_177972_a(p_176225_4_), p_176225_4_.func_176734_d());
}
@Deprecated
@@ -506,6 +509,10 @@
public boolean func_176212_b(IBlockAccess p_176212_1_, BlockPos p_176212_2_, EnumFacing p_176212_3_)
@@ -521,6 +524,10 @@
public void func_180663_b(World p_180663_1_, BlockPos p_180663_2_, IBlockState p_180663_3_)
{
@@ -83,7 +83,7 @@
}
public int func_149745_a(Random p_149745_1_)
@@ -522,8 +529,7 @@
@@ -536,8 +543,7 @@
@Deprecated
public float func_180647_a(IBlockState p_180647_1_, EntityPlayer p_180647_2_, World p_180647_3_, BlockPos p_180647_4_)
{
@@ -93,7 +93,7 @@
}
public final void func_176226_b(World p_176226_1_, BlockPos p_176226_2_, IBlockState p_176226_3_, int p_176226_4_)
@@ -533,20 +539,16 @@
@@ -547,20 +553,16 @@
public void func_180653_a(World p_180653_1_, BlockPos p_180653_2_, IBlockState p_180653_3_, float p_180653_4_, int p_180653_5_)
{
@@ -111,7 +111,7 @@
{
- Item item = this.func_180660_a(p_180653_3_, p_180653_1_.field_73012_v, p_180653_5_);
-
- if (item != null)
- if (item != Items.field_190931_a)
- {
- func_180635_a(p_180653_1_, p_180653_2_, new ItemStack(item, 1, this.func_180651_a(p_180653_3_)));
- }
@@ -119,12 +119,12 @@
}
}
}
@@ -554,8 +556,13 @@
@@ -568,8 +570,13 @@
public static void func_180635_a(World p_180635_0_, BlockPos p_180635_1_, ItemStack p_180635_2_)
{
- if (!p_180635_0_.field_72995_K && p_180635_0_.func_82736_K().func_82766_b("doTileDrops"))
+ if (!p_180635_0_.field_72995_K && p_180635_0_.func_82736_K().func_82766_b("doTileDrops") && !p_180635_0_.restoringBlockSnapshots) // do not drop items while restoring blockstates, prevents item dupe
- if (!p_180635_0_.field_72995_K && !p_180635_2_.func_190926_b() && p_180635_0_.func_82736_K().func_82766_b("doTileDrops"))
+ if (!p_180635_0_.field_72995_K && !p_180635_2_.func_190926_b() && p_180635_0_.func_82736_K().func_82766_b("doTileDrops")&& !p_180635_0_.restoringBlockSnapshots) // do not drop items while restoring blockstates, prevents item dupe
{
+ if (captureDrops.get())
+ {
@@ -134,7 +134,7 @@
float f = 0.5F;
double d0 = (double)(p_180635_0_.field_73012_v.nextFloat() * 0.5F) + 0.25D;
double d1 = (double)(p_180635_0_.field_73012_v.nextFloat() * 0.5F) + 0.25D;
@@ -627,7 +634,7 @@
@@ -636,7 +643,7 @@
public boolean func_176196_c(World p_176196_1_, BlockPos p_176196_2_)
{
@@ -142,22 +142,31 @@
+ return p_176196_1_.func_180495_p(p_176196_2_).func_177230_c().func_176200_f(p_176196_1_, p_176196_2_);
}
public boolean func_180639_a(World p_180639_1_, BlockPos p_180639_2_, IBlockState p_180639_3_, EntityPlayer p_180639_4_, EnumHand p_180639_5_, @Nullable ItemStack p_180639_6_, EnumFacing p_180639_7_, float p_180639_8_, float p_180639_9_, float p_180639_10_)
@@ -680,25 +687,35 @@
public boolean func_180639_a(World p_180639_1_, BlockPos p_180639_2_, IBlockState p_180639_3_, EntityPlayer p_180639_4_, EnumHand p_180639_5_, EnumFacing p_180639_6_, float p_180639_7_, float p_180639_8_, float p_180639_9_)
@@ -648,6 +655,8 @@
{
}
+ // Forge: use getStateForPlacement
+ @Deprecated
public IBlockState func_180642_a(World p_180642_1_, BlockPos p_180642_2_, EnumFacing p_180642_3_, float p_180642_4_, float p_180642_5_, float p_180642_6_, int p_180642_7_, EntityLivingBase p_180642_8_)
{
return this.func_176203_a(p_180642_7_);
@@ -689,21 +698,35 @@
p_180657_2_.func_71029_a(StatList.func_188055_a(this));
p_180657_2_.func_71020_j(0.025F);
p_180657_2_.func_71020_j(0.005F);
- if (this.func_149700_E() && EnchantmentHelper.func_77506_a(Enchantments.field_185306_r, p_180657_6_) > 0)
+ if (this.canSilkHarvest(p_180657_1_, p_180657_3_, p_180657_4_, p_180657_2_) && EnchantmentHelper.func_77506_a(Enchantments.field_185306_r, p_180657_6_) > 0)
{
+ java.util.List<ItemStack> items = new java.util.ArrayList<ItemStack>();
ItemStack itemstack = this.func_180643_i(p_180657_4_);
if (itemstack != null)
{
- func_180635_a(p_180657_1_, p_180657_3_, itemstack);
- func_180635_a(p_180657_1_, p_180657_3_, itemstack);
+
+ if (itemstack != null)
+ {
+ items.add(itemstack);
}
+ }
+
+ net.minecraftforge.event.ForgeEventFactory.fireBlockHarvesting(items, p_180657_1_, p_180657_3_, p_180657_4_, 0, 1.0f, true, p_180657_2_);
+ for (ItemStack item : items)
@@ -181,22 +190,26 @@
+ return this.func_176223_P().func_185917_h() && !this.hasTileEntity(silk_check_state.get());
}
@Nullable
@@ -794,9 +811,11 @@
protected ItemStack func_180643_i(IBlockState p_180643_1_)
@@ -789,6 +812,8 @@
p_176216_2_.field_70181_x = 0.0D;
}
@Nullable
+ @Nullable
+ @Deprecated // Forge: Use more sensitive version below: getPickBlock
public ItemStack func_185473_a(World p_185473_1_, BlockPos p_185473_2_, IBlockState p_185473_3_)
{
- return new ItemStack(Item.func_150898_a(this), 1, this.func_180651_a(p_185473_3_));
+ Item item = Item.func_150898_a(this);
+ return item == null ? null : new ItemStack(item, 1, this.func_180651_a(p_185473_3_));
return new ItemStack(Item.func_150898_a(this), 1, this.func_180651_a(p_185473_3_));
@@ -893,6 +918,7 @@
}
}
@SideOnly(Side.CLIENT)
@@ -893,6 +912,1141 @@
return "Block{" + field_149771_c.func_177774_c(this) + "}";
+ @Deprecated // Forge - World/state/pos/entity sensitive version below
public SoundType func_185467_w()
{
return this.field_149762_H;
@@ -908,6 +934,1186 @@
{
}
+ /* ======================================== FORGE START =====================================*/
@@ -612,7 +625,7 @@
+ {
+ IBlockState state = world.func_180495_p(pos);
+ state = state.func_177230_c().func_176221_a(state, world, pos);
+ state = state.func_177226_a(BlockBed.field_176471_b, true);
+ state = state.func_177226_a(BlockBed.field_176471_b, occupied);
+ ((World)world).func_180501_a(pos, state, 4);
+ }
+ }
@@ -891,9 +904,9 @@
+ IBlockState plant = plantable.getPlant(world, pos.func_177972_a(direction));
+ net.minecraftforge.common.EnumPlantType plantType = plantable.getPlantType(world, pos.func_177972_a(direction));
+
+ if (plant.func_177230_c() == net.minecraft.init.Blocks.field_150434_aF && this == net.minecraft.init.Blocks.field_150434_aF)
+ if (plant.func_177230_c() == net.minecraft.init.Blocks.field_150434_aF)
+ {
+ return true;
+ return this == net.minecraft.init.Blocks.field_150434_aF || this == net.minecraft.init.Blocks.field_150354_m;
+ }
+
+ if (plant.func_177230_c() == net.minecraft.init.Blocks.field_150436_aH && this == net.minecraft.init.Blocks.field_150436_aH)
@@ -908,7 +921,7 @@
+
+ switch (plantType)
+ {
+ case Desert: return this == net.minecraft.init.Blocks.field_150354_m || this == net.minecraft.init.Blocks.field_150405_ch || this == net.minecraft.init.Blocks.field_150406_ce || this == net.minecraft.init.Blocks.field_150346_d;
+ case Desert: return this == net.minecraft.init.Blocks.field_150354_m || this == net.minecraft.init.Blocks.field_150405_ch || this == net.minecraft.init.Blocks.field_150406_ce;
+ case Nether: return this == net.minecraft.init.Blocks.field_150425_aM;
+ case Crop: return this == net.minecraft.init.Blocks.field_150458_ak;
+ case Cave: return state.isSideSolid(world, pos, EnumFacing.UP);
@@ -1332,8 +1345,69 @@
+ public void addInformation(ItemStack stack, EntityPlayer player, List<String> tooltip, boolean advanced)
+ {
+ }
+
+ /**
+ * Sensitive version of getSoundType
+ * @param state The state
+ * @param world The world
+ * @param pos The position. Note that the world may not necessarily have {@code state} here!
+ * @param entity The entity that is breaking/stepping on/placing/hitting/falling on this block, or null if no entity is in this context
+ * @return A SoundType to use
+ */
+ public SoundType getSoundType(IBlockState state, World world, BlockPos pos, @Nullable Entity entity)
+ {
+ return func_185467_w();
+ }
+
+ /**
+ * @param state The state
+ * @param world The world
+ * @param pos The position of this state
+ * @param beaconPos The position of the beacon
+ * @return A float RGB [0.0, 1.0] array to be averaged with a beacon's existing beam color, or null to do nothing to the beam
+ */
+ @Nullable
+ public float[] getBeaconColorMultiplier(IBlockState state, World world, BlockPos pos, BlockPos beaconPos)
+ {
+ return null;
+ }
+
+ /**
+ * Gets the {@link IBlockState} to place
+ * @param world The world the block is being placed in
+ * @param pos The position the block is being placed at
+ * @param facing The side the block is being placed on
+ * @param hitX The X coordinate of the hit vector
+ * @param hitY The Y coordinate of the hit vector
+ * @param hitZ The Z coordinate of the hit vector
+ * @param meta The metadata of {@link ItemStack} as processed by {@link Item#getMetadata(int)}
+ * @param placer The entity placing the block
+ * @param stack The stack being used to place this block
+ * @return The state to be placed in the world
+ */
+ public IBlockState getStateForPlacement(World world, BlockPos pos, EnumFacing facing, float hitX, float hitY, float hitZ, int meta, EntityLivingBase placer)
+ {
+ return func_180642_a(world, pos, facing, hitX, hitY, hitZ, meta, placer);
+ }
+
+ /* ========================================= FORGE END ======================================*/
+
public static void func_149671_p()
{
func_176215_a(0, field_176230_a, (new BlockAir()).func_149663_c("air"));
@@ -1201,14 +2407,7 @@
}
else
{
- UnmodifiableIterator lvt_18_2_ = block16.func_176194_O().func_177619_a().iterator();
-
- while (lvt_18_2_.hasNext())
- {
- IBlockState iblockstate = (IBlockState)lvt_18_2_.next();
- int k = field_149771_c.func_148757_b(block16) << 4 | block16.func_176201_c(iblockstate);
- field_176229_d.func_148746_a(iblockstate, k);
- }
+// Handled in GameData.BlockCallbacks - leaving tripwire as it seems to be special cased
}
}
}
@@ -1,21 +1,23 @@
--- ../src-base/minecraft/net/minecraft/block/BlockBanner.java
+++ ../src-work/minecraft/net/minecraft/block/BlockBanner.java
@@ -107,14 +107,7 @@
@@ -89,16 +89,9 @@
public void func_180653_a(World p_180653_1_, BlockPos p_180653_2_, IBlockState p_180653_3_, float p_180653_4_, int p_180653_5_)
{
- ItemStack itemstack = this.func_185549_e(p_180653_1_, p_180653_2_, p_180653_3_);
- ItemStack itemstack = this.func_185549_e(p_180653_1_, p_180653_2_);
-
- if (itemstack != null)
- if (itemstack.func_190926_b())
{
- func_180635_a(p_180653_1_, p_180653_2_, itemstack);
- }
- else
- {
super.func_180653_a(p_180653_1_, p_180653_2_, p_180653_3_, p_180653_4_, p_180653_5_);
}
- else
- {
- func_180635_a(p_180653_1_, p_180653_2_, itemstack);
- }
}
@@ -141,6 +134,28 @@
public boolean func_176196_c(World p_176196_1_, BlockPos p_176196_2_)
@@ -120,6 +113,25 @@
}
}
@@ -27,12 +29,9 @@
+ java.util.List<ItemStack> ret = new java.util.ArrayList<ItemStack>();
+ if (te instanceof TileEntityBanner)
+ {
+ TileEntityBanner banner = (TileEntityBanner)te;
+ ItemStack item = new ItemStack(Items.field_179564_cE, 1, banner.func_175115_b());
+ NBTTagCompound nbt = new NBTTagCompound();
+ TileEntityBanner.func_181020_a(nbt, banner.func_175115_b(), banner.func_181021_d());
+ item.func_77983_a("BlockEntityTag", nbt);
+ ret.add(item);
+ TileEntityBanner tileentitybanner = (TileEntityBanner)te;
+ ItemStack itemstack = tileentitybanner.func_190615_l();
+ ret.add(itemstack);
+ }
+ else
+ {
@@ -1,6 +1,6 @@
--- ../src-base/minecraft/net/minecraft/block/BlockButton.java
+++ ../src-work/minecraft/net/minecraft/block/BlockButton.java
@@ -91,7 +91,7 @@
@@ -90,7 +90,7 @@
protected static boolean func_181088_a(World p_181088_0_, BlockPos p_181088_1_, EnumFacing p_181088_2_)
{
BlockPos blockpos = p_181088_1_.func_177972_a(p_181088_2_);
@@ -1,6 +1,6 @@
--- ../src-base/minecraft/net/minecraft/block/BlockCactus.java
+++ ../src-work/minecraft/net/minecraft/block/BlockCactus.java
@@ -18,7 +18,7 @@
@@ -19,7 +19,7 @@
import net.minecraftforge.fml.relauncher.Side;
import net.minecraftforge.fml.relauncher.SideOnly;
@@ -9,7 +9,25 @@
{
public static final PropertyInteger field_176587_a = PropertyInteger.func_177719_a("age", 0, 15);
protected static final AxisAlignedBB field_185593_b = new AxisAlignedBB(0.0625D, 0.0D, 0.0625D, 0.9375D, 0.9375D, 0.9375D);
@@ -110,8 +110,8 @@
@@ -50,6 +50,8 @@
{
int j = ((Integer)p_180650_3_.func_177229_b(field_176587_a)).intValue();
+ if(net.minecraftforge.common.ForgeHooks.onCropsGrowPre(p_180650_1_, blockpos, p_180650_3_, true))
+ {
if (j == 15)
{
p_180650_1_.func_175656_a(blockpos, this.func_176223_P());
@@ -61,6 +63,8 @@
{
p_180650_1_.func_180501_a(p_180650_2_, p_180650_3_.func_177226_a(field_176587_a, Integer.valueOf(j + 1)), 4);
}
+ net.minecraftforge.common.ForgeHooks.onCropsGrowPost(p_180650_1_, p_180650_2_, p_180650_3_, p_180650_1_.func_180495_p(p_180650_2_));
+ }
}
}
}
@@ -111,8 +115,8 @@
}
}
@@ -20,7 +38,7 @@
}
public void func_180634_a(World p_180634_1_, BlockPos p_180634_2_, IBlockState p_180634_3_, Entity p_180634_4_)
@@ -135,6 +135,18 @@
@@ -136,6 +140,18 @@
return ((Integer)p_176201_1_.func_177229_b(field_176587_a)).intValue();
}
@@ -1,6 +1,6 @@
--- ../src-base/minecraft/net/minecraft/block/BlockChest.java
+++ ../src-work/minecraft/net/minecraft/block/BlockChest.java
@@ -514,7 +514,7 @@
@@ -522,7 +522,7 @@
private boolean func_176456_n(World p_176456_1_, BlockPos p_176456_2_)
{
@@ -0,0 +1,19 @@
--- ../src-base/minecraft/net/minecraft/block/BlockChorusFlower.java
+++ ../src-work/minecraft/net/minecraft/block/BlockChorusFlower.java
@@ -53,7 +53,7 @@
{
int i = ((Integer)p_180650_3_.func_177229_b(field_185607_a)).intValue();
- if (i < 5 && p_180650_4_.nextInt(1) == 0)
+ if (i < 5 && net.minecraftforge.common.ForgeHooks.onCropsGrowPre(p_180650_1_, blockpos, p_180650_3_, p_180650_4_.nextInt(1) == 0))
{
boolean flag = false;
boolean flag1 = false;
@@ -142,6 +142,7 @@
{
this.func_185605_c(p_180650_1_, p_180650_2_);
}
+ net.minecraftforge.common.ForgeHooks.onCropsGrowPost(p_180650_1_, p_180650_2_, p_180650_3_, p_180650_1_.func_180495_p(p_180650_2_));
}
}
}
@@ -1,6 +1,23 @@
--- ../src-base/minecraft/net/minecraft/block/BlockCocoa.java
+++ ../src-work/minecraft/net/minecraft/block/BlockCocoa.java
@@ -131,7 +131,14 @@
@@ -43,13 +43,14 @@
{
this.func_176500_f(p_180650_1_, p_180650_2_, p_180650_3_);
}
- else if (p_180650_1_.field_73012_v.nextInt(5) == 0)
+ else
{
int i = ((Integer)p_180650_3_.func_177229_b(field_176501_a)).intValue();
- if (i < 2)
+ if (i < 2 && net.minecraftforge.common.ForgeHooks.onCropsGrowPre(p_180650_1_, p_180650_2_, p_180650_3_, p_180650_4_.nextInt(5) == 0))
{
p_180650_1_.func_180501_a(p_180650_2_, p_180650_3_.func_177226_a(field_176501_a, Integer.valueOf(i + 1)), 2);
+ net.minecraftforge.common.ForgeHooks.onCropsGrowPost(p_180650_1_, p_180650_2_, p_180650_3_, p_180650_1_.func_180495_p(p_180650_2_));
}
}
}
@@ -131,7 +132,14 @@
public void func_180653_a(World p_180653_1_, BlockPos p_180653_2_, IBlockState p_180653_3_, float p_180653_4_, int p_180653_5_)
{
@@ -16,7 +33,7 @@
int j = 1;
if (i >= 2)
@@ -141,8 +148,9 @@
@@ -141,8 +149,9 @@
for (int k = 0; k < j; ++k)
{
@@ -1,6 +1,18 @@
--- ../src-base/minecraft/net/minecraft/block/BlockCrops.java
+++ ../src-work/minecraft/net/minecraft/block/BlockCrops.java
@@ -117,11 +117,11 @@
@@ -78,9 +78,10 @@
{
float f = func_180672_a(this, p_180650_1_, p_180650_2_);
- if (p_180650_4_.nextInt((int)(25.0F / f) + 1) == 0)
+ if(net.minecraftforge.common.ForgeHooks.onCropsGrowPre(p_180650_1_, p_180650_2_, p_180650_3_, p_180650_4_.nextInt((int)(25.0F / f) + 1) == 0))
{
p_180650_1_.func_180501_a(p_180650_2_, this.func_185528_e(i + 1), 2);
+ net.minecraftforge.common.ForgeHooks.onCropsGrowPost(p_180650_1_, p_180650_2_, p_180650_3_, p_180650_1_.func_180495_p(p_180650_2_));
}
}
}
@@ -116,11 +117,11 @@
float f1 = 0.0F;
IBlockState iblockstate = p_180672_1_.func_180495_p(blockpos.func_177982_a(i, 0, j));
@@ -14,7 +26,7 @@
{
f1 = 3.0F;
}
@@ -162,7 +162,8 @@
@@ -161,7 +162,8 @@
public boolean func_180671_f(World p_180671_1_, BlockPos p_180671_2_, IBlockState p_180671_3_)
{
@@ -24,7 +36,7 @@
}
protected Item func_149866_i()
@@ -175,11 +176,33 @@
@@ -174,11 +176,33 @@
return Items.field_151015_O;
}
@@ -9,16 +9,16 @@
{
protected static final AxisAlignedBB field_185516_a = new AxisAlignedBB(0.09999999403953552D, 0.0D, 0.09999999403953552D, 0.8999999761581421D, 0.800000011920929D, 0.8999999761581421D);
@@ -59,7 +59,7 @@
@@ -58,7 +58,7 @@
public void func_180657_a(World p_180657_1_, EntityPlayer p_180657_2_, BlockPos p_180657_3_, IBlockState p_180657_4_, @Nullable TileEntity p_180657_5_, @Nullable ItemStack p_180657_6_)
public void func_180657_a(World p_180657_1_, EntityPlayer p_180657_2_, BlockPos p_180657_3_, IBlockState p_180657_4_, @Nullable TileEntity p_180657_5_, ItemStack p_180657_6_)
{
- if (!p_180657_1_.field_72995_K && p_180657_6_ != null && p_180657_6_.func_77973_b() == Items.field_151097_aZ)
+ if (false && !p_180657_1_.field_72995_K && p_180657_6_ != null && p_180657_6_.func_77973_b() == Items.field_151097_aZ) // Forge: Noop
- if (!p_180657_1_.field_72995_K && p_180657_6_.func_77973_b() == Items.field_151097_aZ)
+ if (false && !p_180657_1_.field_72995_K && p_180657_6_.func_77973_b() == Items.field_151097_aZ)
{
p_180657_2_.func_71029_a(StatList.func_188055_a(this));
func_180635_a(p_180657_1_, p_180657_3_, new ItemStack(Blocks.field_150330_I, 1, 0));
@@ -69,4 +69,11 @@
@@ -68,4 +68,11 @@
super.func_180657_a(p_180657_1_, p_180657_2_, p_180657_3_, p_180657_4_, p_180657_5_, p_180657_6_);
}
}
@@ -1,15 +1,15 @@
--- ../src-base/minecraft/net/minecraft/block/BlockDoor.java
+++ ../src-work/minecraft/net/minecraft/block/BlockDoor.java
@@ -108,7 +108,7 @@
@@ -107,7 +107,7 @@
{
if (this.field_149764_J == Material.field_151573_f)
{
- return true;
- return false;
+ return false; //Allow items to interact with the door
}
else
{
@@ -176,7 +176,7 @@
@@ -175,7 +175,7 @@
flag1 = true;
}
@@ -18,7 +18,7 @@
{
p_189540_2_.func_175698_g(p_189540_3_);
flag1 = true;
@@ -221,7 +221,7 @@
@@ -219,7 +219,7 @@
public boolean func_176196_c(World p_176196_1_, BlockPos p_176196_2_)
{
@@ -37,15 +37,15 @@
if (p_180671_3_.func_177229_b(field_176492_b) == BlockDoublePlant.EnumBlockHalf.UPPER)
{
return p_180671_1_.func_180495_p(p_180671_2_.func_177977_b()).func_177230_c() == this;
@@ -151,7 +149,6 @@
@@ -150,7 +148,6 @@
public void func_180657_a(World p_180657_1_, EntityPlayer p_180657_2_, BlockPos p_180657_3_, IBlockState p_180657_4_, @Nullable TileEntity p_180657_5_, @Nullable ItemStack p_180657_6_)
public void func_180657_a(World p_180657_1_, EntityPlayer p_180657_2_, BlockPos p_180657_3_, IBlockState p_180657_4_, @Nullable TileEntity p_180657_5_, ItemStack p_180657_6_)
{
- if (p_180657_1_.field_72995_K || p_180657_6_ == null || p_180657_6_.func_77973_b() != Items.field_151097_aZ || p_180657_4_.func_177229_b(field_176492_b) != BlockDoublePlant.EnumBlockHalf.LOWER || !this.func_176489_b(p_180657_1_, p_180657_3_, p_180657_4_, p_180657_2_))
- if (p_180657_1_.field_72995_K || p_180657_6_.func_77973_b() != Items.field_151097_aZ || p_180657_4_.func_177229_b(field_176492_b) != BlockDoublePlant.EnumBlockHalf.LOWER || !this.func_176489_b(p_180657_1_, p_180657_3_, p_180657_4_, p_180657_2_))
{
super.func_180657_a(p_180657_1_, p_180657_2_, p_180657_3_, p_180657_4_, p_180657_5_, p_180657_6_);
}
@@ -211,8 +208,6 @@
@@ -210,8 +207,6 @@
else
{
p_176489_4_.func_71029_a(StatList.func_188055_a(this));
@@ -54,7 +54,7 @@
return true;
}
}
@@ -283,6 +278,33 @@
@@ -281,6 +276,33 @@
return Block.EnumOffsetType.XZ;
}
@@ -1,6 +1,6 @@
--- ../src-base/minecraft/net/minecraft/block/BlockDragonEgg.java
+++ ../src-work/minecraft/net/minecraft/block/BlockDragonEgg.java
@@ -49,7 +49,7 @@
@@ -47,7 +47,7 @@
private void func_180683_d(World p_180683_1_, BlockPos p_180683_2_)
{
@@ -9,7 +9,7 @@
{
int i = 32;
@@ -62,7 +62,7 @@
@@ -60,7 +60,7 @@
p_180683_1_.func_175698_g(p_180683_2_);
BlockPos blockpos;
@@ -1,11 +1,11 @@
--- ../src-base/minecraft/net/minecraft/block/BlockDropper.java
+++ ../src-work/minecraft/net/minecraft/block/BlockDropper.java
@@ -44,7 +44,7 @@
@@ -43,7 +43,7 @@
{
ItemStack itemstack = tileentitydispenser.func_70301_a(i);
- if (itemstack != null)
+ if (itemstack != null && net.minecraftforge.items.VanillaInventoryCodeHooks.dropperInsertHook(p_176439_1_, p_176439_2_, tileentitydispenser, i, itemstack))
- if (!itemstack.func_190926_b())
+ if (!itemstack.func_190926_b() && net.minecraftforge.items.VanillaInventoryCodeHooks.dropperInsertHook(p_176439_1_, p_176439_2_, tileentitydispenser, i, itemstack))
{
EnumFacing enumfacing = (EnumFacing)p_176439_1_.func_180495_p(p_176439_2_).func_177229_b(field_176441_a);
BlockPos blockpos = p_176439_2_.func_177972_a(enumfacing);
@@ -0,0 +1,19 @@
--- ../src-base/minecraft/net/minecraft/block/BlockDynamicLiquid.java
+++ ../src-work/minecraft/net/minecraft/block/BlockDynamicLiquid.java
@@ -67,7 +67,7 @@
}
}
- if (this.field_149815_a >= 2 && this.field_149764_J == Material.field_151586_h)
+ if (this.field_149815_a >= 2 && net.minecraftforge.event.ForgeEventFactory.canCreateFluidSource(p_180650_1_, p_180650_2_, p_180650_3_, this.field_149764_J == Material.field_151586_h))
{
IBlockState iblockstate = p_180650_1_.func_180495_p(p_180650_2_.func_177977_b());
@@ -166,6 +166,7 @@
}
else
{
+ if (p_176375_3_.func_177230_c() != Blocks.field_150431_aC) //Forge: Vanilla has a 'bug' where snowballs don't drop like every other block. So special case because ewww...
p_176375_3_.func_177230_c().func_176226_b(p_176375_1_, p_176375_2_, p_176375_3_, 0);
}
}
@@ -0,0 +1,11 @@
--- ../src-base/minecraft/net/minecraft/block/BlockEnchantmentTable.java
+++ ../src-work/minecraft/net/minecraft/block/BlockEnchantmentTable.java
@@ -63,7 +63,7 @@
{
BlockPos blockpos = p_180655_3_.func_177982_a(i, k, j);
- if (p_180655_2_.func_180495_p(blockpos).func_177230_c() == Blocks.field_150342_X)
+ if (net.minecraftforge.common.ForgeHooks.getEnchantPower(p_180655_2_, blockpos) > 0)
{
if (!p_180655_2_.func_175623_d(p_180655_3_.func_177982_a(i / 2, 0, j / 2)))
{
@@ -9,7 +9,11 @@
{
int i = 32;
@@ -65,7 +65,7 @@
@@ -62,17 +62,18 @@
}
else
{
+ IBlockState state = p_176503_1_.func_180495_p(p_176503_2_);
p_176503_1_.func_175698_g(p_176503_2_);
BlockPos blockpos;
@@ -18,3 +22,11 @@
{
;
}
if (blockpos.func_177956_o() > 0)
{
- p_176503_1_.func_175656_a(blockpos.func_177984_a(), this.func_176223_P());
+ p_176503_1_.func_175656_a(blockpos.func_177984_a(), state); //Forge: Fix loss of state information during world gen.
}
}
}
@@ -1,6 +1,6 @@
--- ../src-base/minecraft/net/minecraft/block/BlockFarmland.java
+++ ../src-work/minecraft/net/minecraft/block/BlockFarmland.java
@@ -83,7 +83,7 @@
@@ -93,7 +93,7 @@
private boolean func_176529_d(World p_176529_1_, BlockPos p_176529_2_)
{
Block block = p_176529_1_.func_180495_p(p_176529_2_.func_177984_a()).func_177230_c();
@@ -123,7 +123,7 @@
for (EnumFacing enumfacing : EnumFacing.values())
{
- i = Math.max(this.func_176534_d(p_176538_1_.func_180495_p(p_176538_2_.func_177972_a(enumfacing)).func_177230_c()), i);
+ i = Math.max(p_176538_1_.func_180495_p(p_176538_2_.func_177972_a(enumfacing)).func_177230_c().getFlammability(p_176538_1_, p_176538_2_.func_177972_a(enumfacing), enumfacing.func_176734_d()), i);
+ i = Math.max(p_176538_1_.func_180495_p(p_176538_2_.func_177972_a(enumfacing)).func_177230_c().getFireSpreadSpeed(p_176538_1_, p_176538_2_.func_177972_a(enumfacing), enumfacing.func_176734_d()), i);
}
return i;
@@ -1,6 +1,6 @@
--- ../src-base/minecraft/net/minecraft/block/BlockFlowerPot.java
+++ ../src-work/minecraft/net/minecraft/block/BlockFlowerPot.java
@@ -151,13 +151,6 @@
@@ -165,13 +165,6 @@
public void func_180663_b(World p_180663_1_, BlockPos p_180663_2_, IBlockState p_180663_3_)
{
@@ -14,7 +14,7 @@
super.func_180663_b(p_180663_1_, p_180663_2_, p_180663_3_);
}
@@ -379,6 +372,31 @@
@@ -392,6 +385,31 @@
return BlockRenderLayer.CUTOUT;
}
@@ -1,6 +1,6 @@
--- ../src-base/minecraft/net/minecraft/block/BlockGrass.java
+++ ../src-work/minecraft/net/minecraft/block/BlockGrass.java
@@ -39,7 +39,7 @@
@@ -38,7 +38,7 @@
{
if (!p_180650_1_.field_72995_K)
{
@@ -9,7 +9,7 @@
{
p_180650_1_.func_175656_a(p_180650_2_, Blocks.field_150346_d.func_176223_P());
}
@@ -59,7 +59,7 @@
@@ -58,7 +58,7 @@
IBlockState iblockstate = p_180650_1_.func_180495_p(blockpos.func_177984_a());
IBlockState iblockstate1 = p_180650_1_.func_180495_p(blockpos);
@@ -18,7 +18,7 @@
{
p_180650_1_.func_175656_a(blockpos, Blocks.field_150349_c.func_176223_P());
}
@@ -98,7 +98,7 @@
@@ -96,18 +96,11 @@
{
if (j >= i / 16)
{
@@ -27,3 +27,15 @@
{
if (p_176474_2_.nextInt(8) == 0)
{
- BlockFlower.EnumFlowerType blockflower$enumflowertype = p_176474_1_.func_180494_b(blockpos1).func_180623_a(p_176474_2_, blockpos1);
- BlockFlower blockflower = blockflower$enumflowertype.func_176964_a().func_180346_a();
- IBlockState iblockstate = blockflower.func_176223_P().func_177226_a(blockflower.func_176494_l(), blockflower$enumflowertype);
-
- if (blockflower.func_180671_f(p_176474_1_, blockpos1, iblockstate))
- {
- p_176474_1_.func_180501_a(blockpos1, iblockstate, 3);
- }
+ p_176474_1_.func_180494_b(blockpos1).plantFlower(p_176474_1_, p_176474_2_, blockpos1);
}
else
{
@@ -1,6 +1,6 @@
--- ../src-base/minecraft/net/minecraft/block/BlockHugeMushroom.java
+++ ../src-work/minecraft/net/minecraft/block/BlockHugeMushroom.java
@@ -223,6 +223,20 @@
@@ -221,6 +221,20 @@
return new BlockStateContainer(this, new IProperty[] {field_176380_a});
}
@@ -1,20 +1,15 @@
--- ../src-base/minecraft/net/minecraft/block/BlockIce.java
+++ ../src-work/minecraft/net/minecraft/block/BlockIce.java
@@ -41,14 +41,19 @@
@@ -41,9 +41,14 @@
p_180657_2_.func_71029_a(StatList.func_188055_a(this));
p_180657_2_.func_71020_j(0.025F);
p_180657_2_.func_71020_j(0.005F);
- if (this.func_149700_E() && EnchantmentHelper.func_77506_a(Enchantments.field_185306_r, p_180657_6_) > 0)
+ if (this.canSilkHarvest(p_180657_1_, p_180657_3_, p_180657_4_, p_180657_2_) && EnchantmentHelper.func_77506_a(Enchantments.field_185306_r, p_180657_6_) > 0)
{
- func_180635_a(p_180657_1_, p_180657_3_, this.func_180643_i(p_180657_4_));
+ java.util.List<ItemStack> items = new java.util.ArrayList<ItemStack>();
ItemStack itemstack = this.func_180643_i(p_180657_4_);
if (itemstack != null)
{
- func_180635_a(p_180657_1_, p_180657_3_, itemstack);
+ items.add(itemstack);
}
+ items.add(this.func_180643_i(p_180657_4_));
+
+ net.minecraftforge.event.ForgeEventFactory.fireBlockHarvesting(items, p_180657_1_, p_180657_3_, p_180657_4_, 0, 1.0f, true, p_180657_2_);
+ for (ItemStack is : items)
@@ -22,7 +17,7 @@
}
else
{
@@ -59,7 +64,9 @@
@@ -54,7 +59,9 @@
}
int i = EnchantmentHelper.func_77506_a(Enchantments.field_185308_t, p_180657_6_);
@@ -1,6 +1,6 @@
--- ../src-base/minecraft/net/minecraft/block/BlockLeaves.java
+++ ../src-work/minecraft/net/minecraft/block/BlockLeaves.java
@@ -18,7 +18,7 @@
@@ -17,7 +17,7 @@
import net.minecraftforge.fml.relauncher.Side;
import net.minecraftforge.fml.relauncher.SideOnly;
@@ -9,7 +9,7 @@
{
public static final PropertyBool field_176237_a = PropertyBool.func_177716_a("decayable");
public static final PropertyBool field_176236_b = PropertyBool.func_177716_a("check_decay");
@@ -54,9 +54,9 @@
@@ -53,9 +53,9 @@
BlockPos blockpos = p_180663_2_.func_177982_a(j1, k1, l1);
IBlockState iblockstate = p_180663_1_.func_180495_p(blockpos);
@@ -21,7 +21,7 @@
}
}
}
@@ -97,9 +97,9 @@
@@ -96,9 +96,9 @@
IBlockState iblockstate = p_180650_1_.func_180495_p(blockpos$mutableblockpos.func_181079_c(k + i2, l + j2, i1 + k2));
Block block = iblockstate.func_177230_c();
@@ -33,7 +33,7 @@
{
this.field_150128_a[(i2 + 16) * 1024 + (j2 + 16) * 32 + k2 + 16] = -2;
}
@@ -207,40 +207,7 @@
@@ -205,40 +205,7 @@
public void func_180653_a(World p_180653_1_, BlockPos p_180653_2_, IBlockState p_180653_3_, float p_180653_4_, int p_180653_5_)
{
@@ -75,7 +75,7 @@
}
protected void func_176234_a(World p_176234_1_, BlockPos p_176234_2_, IBlockState p_176234_3_, int p_176234_4_)
@@ -276,6 +243,49 @@
@@ -274,6 +241,49 @@
public abstract BlockPlanks.EnumType func_176233_b(int p_176233_1_);
@@ -1,6 +1,6 @@
--- ../src-base/minecraft/net/minecraft/block/BlockLever.java
+++ ../src-work/minecraft/net/minecraft/block/BlockLever.java
@@ -297,6 +297,12 @@
@@ -296,6 +296,12 @@
return new BlockStateContainer(this, new IProperty[] {field_176360_a, field_176359_b});
}
@@ -1,6 +1,6 @@
--- ../src-base/minecraft/net/minecraft/block/BlockMobSpawner.java
+++ ../src-work/minecraft/net/minecraft/block/BlockMobSpawner.java
@@ -41,10 +41,14 @@
@@ -40,10 +40,14 @@
public void func_180653_a(World p_180653_1_, BlockPos p_180653_2_, IBlockState p_180653_3_, float p_180653_4_, int p_180653_5_)
{
super.func_180653_a(p_180653_1_, p_180653_2_, p_180653_3_, p_180653_4_, p_180653_5_);
@@ -1,6 +1,6 @@
--- ../src-base/minecraft/net/minecraft/block/BlockMycelium.java
+++ ../src-work/minecraft/net/minecraft/block/BlockMycelium.java
@@ -40,7 +40,7 @@
@@ -39,7 +39,7 @@
{
if (!p_180650_1_.field_72995_K)
{
@@ -9,7 +9,7 @@
{
p_180650_1_.func_175656_a(p_180650_2_, Blocks.field_150346_d.func_176223_P().func_177226_a(BlockDirt.field_176386_a, BlockDirt.DirtType.DIRT));
}
@@ -54,7 +54,7 @@
@@ -53,7 +53,7 @@
IBlockState iblockstate = p_180650_1_.func_180495_p(blockpos);
IBlockState iblockstate1 = p_180650_1_.func_180495_p(blockpos.func_177984_a());
@@ -1,6 +1,6 @@
--- ../src-base/minecraft/net/minecraft/block/BlockNetherWart.java
+++ ../src-work/minecraft/net/minecraft/block/BlockNetherWart.java
@@ -43,7 +43,7 @@
@@ -42,25 +42,28 @@
public boolean func_180671_f(World p_180671_1_, BlockPos p_180671_2_, IBlockState p_180671_3_)
{
@@ -9,7 +9,17 @@
}
public void func_180650_b(World p_180650_1_, BlockPos p_180650_2_, IBlockState p_180650_3_, Random p_180650_4_)
@@ -59,9 +59,11 @@
{
int i = ((Integer)p_180650_3_.func_177229_b(field_176486_a)).intValue();
- if (i < 3 && p_180650_4_.nextInt(10) == 0)
+ if (i < 3 && net.minecraftforge.common.ForgeHooks.onCropsGrowPre(p_180650_1_, p_180650_2_, p_180650_3_, p_180650_4_.nextInt(10) == 0))
{
p_180650_3_ = p_180650_3_.func_177226_a(field_176486_a, Integer.valueOf(i + 1));
p_180650_1_.func_180501_a(p_180650_2_, p_180650_3_, 2);
+ net.minecraftforge.common.ForgeHooks.onCropsGrowPost(p_180650_1_, p_180650_2_, p_180650_3_, p_180650_1_.func_180495_p(p_180650_2_));
}
super.func_180650_b(p_180650_1_, p_180650_2_, p_180650_3_, p_180650_4_);
}
@@ -22,7 +32,7 @@
{
int i = 1;
@@ -108,6 +110,26 @@
@@ -106,6 +109,26 @@
return ((Integer)p_176201_1_.func_177229_b(field_176486_a)).intValue();
}
@@ -2,10 +2,10 @@
+++ ../src-work/minecraft/net/minecraft/block/BlockNewLeaf.java
@@ -99,7 +99,7 @@
public void func_180657_a(World p_180657_1_, EntityPlayer p_180657_2_, BlockPos p_180657_3_, IBlockState p_180657_4_, @Nullable TileEntity p_180657_5_, @Nullable ItemStack p_180657_6_)
public void func_180657_a(World p_180657_1_, EntityPlayer p_180657_2_, BlockPos p_180657_3_, IBlockState p_180657_4_, @Nullable TileEntity p_180657_5_, ItemStack p_180657_6_)
{
- if (!p_180657_1_.field_72995_K && p_180657_6_ != null && p_180657_6_.func_77973_b() == Items.field_151097_aZ)
+ if (false && !p_180657_1_.field_72995_K && p_180657_6_ != null && p_180657_6_.func_77973_b() == Items.field_151097_aZ) //Forge: Noop this
- if (!p_180657_1_.field_72995_K && p_180657_6_.func_77973_b() == Items.field_151097_aZ)
+ if (false && !p_180657_1_.field_72995_K && p_180657_6_.func_77973_b() == Items.field_151097_aZ)
{
p_180657_2_.func_71029_a(StatList.func_188055_a(this));
func_180635_a(p_180657_1_, p_180657_3_, new ItemStack(Item.func_150898_a(this), 1, ((BlockPlanks.EnumType)p_180657_4_.func_177229_b(field_176240_P)).func_176839_a() - 4));
@@ -15,8 +15,8 @@
}
+
+ @Override
+ public List<ItemStack> onSheared(ItemStack item, net.minecraft.world.IBlockAccess world, BlockPos pos, int fortune)
+ public NonNullList<ItemStack> onSheared(ItemStack item, net.minecraft.world.IBlockAccess world, BlockPos pos, int fortune)
+ {
+ return java.util.Arrays.asList(new ItemStack(this, 1, world.func_180495_p(pos).func_177229_b(field_176240_P).func_176839_a() - 4));
+ return NonNullList.func_191197_a(1, new ItemStack(this, 1, world.func_180495_p(pos).func_177229_b(field_176240_P).func_176839_a() - 4));
+ }
}
@@ -1,6 +1,6 @@
--- ../src-base/minecraft/net/minecraft/block/BlockNote.java
+++ ../src-work/minecraft/net/minecraft/block/BlockNote.java
@@ -65,7 +65,9 @@
@@ -63,7 +63,9 @@
if (tileentity instanceof TileEntityNote)
{
TileEntityNote tileentitynote = (TileEntityNote)tileentity;
@@ -10,7 +10,7 @@
tileentitynote.func_175108_a(p_180639_1_, p_180639_2_);
p_180639_4_.func_71029_a(StatList.field_188087_U);
}
@@ -105,6 +107,10 @@
@@ -103,6 +105,10 @@
public boolean func_189539_a(IBlockState p_189539_1_, World p_189539_2_, BlockPos p_189539_3_, int p_189539_4_, int p_189539_5_)
{
@@ -1,7 +1,7 @@
--- ../src-base/minecraft/net/minecraft/block/BlockOldLeaf.java
+++ ../src-work/minecraft/net/minecraft/block/BlockOldLeaf.java
@@ -104,11 +104,16 @@
if (!p_180657_1_.field_72995_K && p_180657_6_ != null && p_180657_6_.func_77973_b() == Items.field_151097_aZ)
if (!p_180657_1_.field_72995_K && p_180657_6_.func_77973_b() == Items.field_151097_aZ)
{
p_180657_2_.func_71029_a(StatList.func_188055_a(this));
- func_180635_a(p_180657_1_, p_180657_3_, new ItemStack(Item.func_150898_a(this), 1, ((BlockPlanks.EnumType)p_180657_4_.func_177229_b(field_176239_P)).func_176839_a()));
@@ -13,8 +13,8 @@
}
+
+ @Override
+ public List<ItemStack> onSheared(ItemStack item, net.minecraft.world.IBlockAccess world, BlockPos pos, int fortune)
+ public NonNullList<ItemStack> onSheared(ItemStack item, net.minecraft.world.IBlockAccess world, BlockPos pos, int fortune)
+ {
+ return java.util.Arrays.asList(new ItemStack(this, 1, world.func_180495_p(pos).func_177229_b(field_176239_P).func_176839_a()));
+ return NonNullList.func_191197_a(1, new ItemStack(this, 1, world.func_180495_p(pos).func_177229_b(field_176239_P).func_176839_a()));
+ }
}
@@ -1,6 +1,6 @@
--- ../src-base/minecraft/net/minecraft/block/BlockOre.java
+++ ../src-work/minecraft/net/minecraft/block/BlockOre.java
@@ -61,34 +61,39 @@
@@ -59,34 +59,39 @@
public void func_180653_a(World p_180653_1_, BlockPos p_180653_2_, IBlockState p_180653_3_, float p_180653_4_, int p_180653_5_)
{
super.func_180653_a(p_180653_1_, p_180653_2_, p_180653_3_, p_180653_4_, p_180653_5_);
@@ -1,6 +1,6 @@
--- ../src-base/minecraft/net/minecraft/block/BlockPane.java
+++ ../src-work/minecraft/net/minecraft/block/BlockPane.java
@@ -106,7 +106,10 @@
@@ -107,7 +107,10 @@
public IBlockState func_176221_a(IBlockState p_176221_1_, IBlockAccess p_176221_2_, BlockPos p_176221_3_)
{
@@ -11,7 +11,7 @@
+ .func_177226_a(field_176242_M, canPaneConnectTo(p_176221_2_, p_176221_3_, EnumFacing.EAST));
}
@Nullable
public Item func_180660_a(IBlockState p_180660_1_, Random p_180660_2_, int p_180660_3_)
@@ -184,4 +187,11 @@
{
return new BlockStateContainer(this, new IProperty[] {field_176241_b, field_176242_M, field_176244_O, field_176243_N});
@@ -1,6 +1,6 @@
--- ../src-base/minecraft/net/minecraft/block/BlockPistonBase.java
+++ ../src-work/minecraft/net/minecraft/block/BlockPistonBase.java
@@ -236,7 +236,7 @@
@@ -240,7 +240,7 @@
}
}
@@ -9,7 +9,7 @@
{
this.func_176319_a(p_189539_2_, p_189539_3_, enumfacing, false);
}
@@ -322,7 +322,7 @@
@@ -306,7 +306,7 @@
return false;
}
@@ -18,7 +18,7 @@
}
else
{
@@ -368,7 +368,9 @@
@@ -352,7 +352,9 @@
{
BlockPos blockpos1 = (BlockPos)list2.get(j);
IBlockState iblockstate = p_176319_1_.func_180495_p(blockpos1);
@@ -1,6 +1,6 @@
--- ../src-base/minecraft/net/minecraft/block/BlockPistonMoving.java
+++ ../src-work/minecraft/net/minecraft/block/BlockPistonMoving.java
@@ -112,7 +112,7 @@
@@ -115,7 +115,7 @@
public void func_180653_a(World p_180653_1_, BlockPos p_180653_2_, IBlockState p_180653_3_, float p_180653_4_, int p_180653_5_)
{
@@ -9,15 +9,15 @@
{
TileEntityPiston tileentitypiston = this.func_185589_c(p_180653_1_, p_180653_2_);
@@ -122,6 +122,7 @@
@@ -125,6 +125,7 @@
iblockstate.func_177230_c().func_176226_b(p_180653_1_, p_180653_2_, iblockstate, 0);
}
}
+ super.func_180653_a(p_180653_1_, p_180653_2_, p_180653_3_, 1, p_180653_5_); // mimic vanilla behavior from above and ignore chance
}
public RayTraceResult func_180636_a(IBlockState p_180636_1_, World p_180636_2_, BlockPos p_180636_3_, Vec3d p_180636_4_, Vec3d p_180636_5_)
@@ -195,4 +196,16 @@
@Nullable
@@ -208,4 +209,16 @@
{
return new BlockStateContainer(this, new IProperty[] {field_176426_a, field_176425_b});
}
@@ -1,6 +1,6 @@
--- ../src-base/minecraft/net/minecraft/block/BlockRailBase.java
+++ ../src-work/minecraft/net/minecraft/block/BlockRailBase.java
@@ -32,7 +32,7 @@
@@ -33,7 +33,7 @@
public static boolean func_176563_d(IBlockState p_176563_0_)
{
Block block = p_176563_0_.func_177230_c();
@@ -9,7 +9,7 @@
}
protected BlockRailBase(boolean p_i45389_1_)
@@ -66,7 +66,7 @@
@@ -67,7 +67,7 @@
public boolean func_176196_c(World p_176196_1_, BlockPos p_176196_2_)
{
@@ -18,7 +18,7 @@
}
public void func_176213_c(World p_176213_1_, BlockPos p_176213_2_, IBlockState p_176213_3_)
@@ -89,24 +89,24 @@
@@ -90,24 +90,24 @@
BlockRailBase.EnumRailDirection blockrailbase$enumraildirection = (BlockRailBase.EnumRailDirection)p_189540_1_.func_177229_b(this.func_176560_l());
boolean flag = false;
@@ -48,7 +48,7 @@
{
flag = true;
}
@@ -161,6 +161,98 @@
@@ -162,6 +162,98 @@
public abstract IProperty<BlockRailBase.EnumRailDirection> func_176560_l();
@@ -147,7 +147,7 @@
public static enum EnumRailDirection implements IStringSerializable
{
NORTH_SOUTH(0, "north_south"),
@@ -231,6 +323,7 @@
@@ -232,6 +324,7 @@
private IBlockState field_180366_e;
private final boolean field_150656_f;
private final List<BlockPos> field_150657_g = Lists.<BlockPos>newArrayList();
@@ -155,7 +155,7 @@
public Rail(World p_i45739_2_, BlockPos p_i45739_3_, IBlockState p_i45739_4_)
{
@@ -238,8 +331,9 @@
@@ -239,8 +332,9 @@
this.field_180367_c = p_i45739_3_;
this.field_180366_e = p_i45739_4_;
this.field_180365_d = (BlockRailBase)p_i45739_4_.func_177230_c();
@@ -167,7 +167,7 @@
this.func_180360_a(blockrailbase$enumraildirection);
}
@@ -431,7 +525,7 @@
@@ -432,7 +526,7 @@
}
}
@@ -176,7 +176,7 @@
{
if (BlockRailBase.func_176562_d(this.field_150660_b, blockpos.func_177984_a()))
{
@@ -444,7 +538,7 @@
@@ -445,7 +539,7 @@
}
}
@@ -185,7 +185,7 @@
{
if (BlockRailBase.func_176562_d(this.field_150660_b, blockpos3.func_177984_a()))
{
@@ -587,7 +681,7 @@
@@ -588,7 +682,7 @@
}
}
@@ -194,7 +194,7 @@
{
if (BlockRailBase.func_176562_d(this.field_150660_b, blockpos.func_177984_a()))
{
@@ -600,7 +694,7 @@
@@ -601,7 +695,7 @@
}
}
@@ -0,0 +1,11 @@
--- ../src-base/minecraft/net/minecraft/block/BlockRailDetector.java
+++ ../src-work/minecraft/net/minecraft/block/BlockRailDetector.java
@@ -156,6 +156,8 @@
{
if (((Boolean)p_180641_1_.func_177229_b(field_176574_M)).booleanValue())
{
+ List<EntityMinecart> carts = this.func_176571_a(p_180641_2_, p_180641_3_, EntityMinecart.class);
+ if (!carts.isEmpty() && carts.get(0).getComparatorLevel() > -1) return carts.get(0).getComparatorLevel();
List<EntityMinecartCommandBlock> list = this.<EntityMinecartCommandBlock>func_176571_a(p_180641_2_, p_180641_3_, EntityMinecartCommandBlock.class, new Predicate[0]);
if (!list.isEmpty())
@@ -1,6 +1,6 @@
--- ../src-base/minecraft/net/minecraft/block/BlockRedstoneComparator.java
+++ ../src-work/minecraft/net/minecraft/block/BlockRedstoneComparator.java
@@ -312,6 +312,21 @@
@@ -311,6 +311,21 @@
return this.func_176223_P().func_177226_a(field_185512_D, p_180642_8_.func_174811_aO().func_176734_d()).func_177226_a(field_176464_a, Boolean.valueOf(false)).func_177226_a(field_176463_b, BlockRedstoneComparator.Mode.COMPARE);
}
@@ -9,7 +9,7 @@
+ {
+ if (pos.func_177956_o() == neighbor.func_177956_o() && world instanceof World)
+ {
+ func_189540_a(world.func_180495_p(pos), (World)world, pos, world.func_180495_p(neighbor).func_177230_c());
+ func_189540_a(world.func_180495_p(pos), (World)world, pos, world.func_180495_p(neighbor).func_177230_c(), neighbor);
+ }
+ }
+
@@ -4,8 +4,8 @@
{
EnumFacing enumfacing = (EnumFacing)p_176400_3_.func_177229_b(field_185512_D);
BlockPos blockpos = p_176400_2_.func_177972_a(enumfacing.func_176734_d());
+ if(net.minecraftforge.event.ForgeEventFactory.onNeighborNotify(p_176400_1_, p_176400_2_, p_176400_1_.func_180495_p(p_176400_2_), java.util.EnumSet.of(enumfacing.func_176734_d())).isCanceled())
+ if(net.minecraftforge.event.ForgeEventFactory.onNeighborNotify(p_176400_1_, p_176400_2_, p_176400_1_.func_180495_p(p_176400_2_), java.util.EnumSet.of(enumfacing.func_176734_d()), false).isCanceled())
+ return;
p_176400_1_.func_180496_d(blockpos, this);
p_176400_1_.func_190524_a(blockpos, this, p_176400_2_);
p_176400_1_.func_175695_a(blockpos, this, enumfacing);
}
@@ -1,6 +1,6 @@
--- ../src-base/minecraft/net/minecraft/block/BlockRedstoneOre.java
+++ ../src-work/minecraft/net/minecraft/block/BlockRedstoneOre.java
@@ -94,12 +94,16 @@
@@ -92,12 +92,16 @@
public void func_180653_a(World p_180653_1_, BlockPos p_180653_2_, IBlockState p_180653_3_, float p_180653_4_, int p_180653_5_)
{
super.func_180653_a(p_180653_1_, p_180653_2_, p_180653_3_, p_180653_4_, p_180653_5_);
@@ -19,7 +19,7 @@
{
if (iblockstate.func_185898_k())
{
@@ -409,21 +409,16 @@
@@ -408,21 +408,16 @@
IBlockState iblockstate = p_176339_1_.func_180495_p(blockpos);
boolean flag = iblockstate.func_185915_l();
boolean flag1 = p_176339_1_.func_180495_p(p_176339_2_.func_177984_a()).func_185915_l();
@@ -44,12 +44,12 @@
Block block = p_176343_0_.func_177230_c();
if (block == Blocks.field_150488_af)
@@ -437,7 +432,7 @@
@@ -436,7 +431,7 @@
}
else
{
- return p_176343_0_.func_185897_m() && p_176343_1_ != null;
+ return p_176343_0_.func_177230_c().canConnectRedstone(p_176343_0_, world, pos, p_176343_1_);
- return Blocks.field_190976_dk == p_176343_0_.func_177230_c() ? p_176343_1_ == p_176343_0_.func_177229_b(BlockObserver.field_176387_N) : p_176343_0_.func_185897_m() && p_176343_1_ != null;
+ return Blocks.field_190976_dk == p_176343_0_.func_177230_c() ? p_176343_1_ == p_176343_0_.func_177229_b(BlockObserver.field_176387_N) : p_176343_0_.func_177230_c().canConnectRedstone(p_176343_0_, world, pos, p_176343_1_);
}
}
@@ -9,7 +9,25 @@
{
public static final PropertyInteger field_176355_a = PropertyInteger.func_177719_a("age", 0, 15);
protected static final AxisAlignedBB field_185701_b = new AxisAlignedBB(0.125D, 0.0D, 0.125D, 0.875D, 1.0D, 0.875D);
@@ -70,7 +70,9 @@
@@ -54,6 +54,8 @@
{
int j = ((Integer)p_180650_3_.func_177229_b(field_176355_a)).intValue();
+ if(net.minecraftforge.common.ForgeHooks.onCropsGrowPre(p_180650_1_, p_180650_2_, p_180650_3_, true))
+ {
if (j == 15)
{
p_180650_1_.func_175656_a(p_180650_2_.func_177984_a(), this.func_176223_P());
@@ -63,6 +65,8 @@
{
p_180650_1_.func_180501_a(p_180650_2_, p_180650_3_.func_177226_a(field_176355_a, Integer.valueOf(j + 1)), 4);
}
+ net.minecraftforge.common.ForgeHooks.onCropsGrowPost(p_180650_1_, p_180650_2_, p_180650_3_, p_180650_1_.func_180495_p(p_180650_2_));
+ }
}
}
}
@@ -70,7 +74,9 @@
public boolean func_176196_c(World p_176196_1_, BlockPos p_176196_2_)
{
@@ -20,7 +38,7 @@
if (block == this)
{
@@ -165,6 +167,17 @@
@@ -164,6 +170,17 @@
return ((Integer)p_176201_1_.func_177229_b(field_176355_a)).intValue();
}
@@ -1,6 +1,6 @@
--- ../src-base/minecraft/net/minecraft/block/BlockSkull.java
+++ ../src-work/minecraft/net/minecraft/block/BlockSkull.java
@@ -118,10 +118,6 @@
@@ -126,10 +126,6 @@
return new ItemStack(Items.field_151144_bL, 1, i);
}
@@ -11,7 +11,7 @@
public void func_176208_a(World p_176208_1_, BlockPos p_176208_2_, IBlockState p_176208_3_, EntityPlayer p_176208_4_)
{
if (p_176208_4_.field_71075_bZ.field_75098_d)
@@ -129,13 +125,18 @@
@@ -137,13 +133,18 @@
p_176208_3_ = p_176208_3_.func_177226_a(field_176417_b, Boolean.valueOf(true));
p_176208_1_.func_180501_a(p_176208_2_, p_176208_3_, 4);
}
@@ -31,7 +31,7 @@
{
if (!((Boolean)p_180663_3_.func_177229_b(field_176417_b)).booleanValue())
{
@@ -144,7 +145,7 @@
@@ -152,7 +153,7 @@
if (tileentity instanceof TileEntitySkull)
{
TileEntitySkull tileentityskull = (TileEntitySkull)tileentity;
@@ -40,7 +40,7 @@
if (tileentityskull.func_145904_a() == 3 && tileentityskull.func_152108_a() != null)
{
@@ -154,12 +155,11 @@
@@ -162,12 +163,11 @@
itemstack.func_77978_p().func_74782_a("SkullOwner", nbttagcompound);
}
@@ -54,4 +54,4 @@
+ return ret;
}
@Nullable
public Item func_180660_a(IBlockState p_180660_1_, Random p_180660_2_, int p_180660_3_)
@@ -1,12 +1,15 @@
--- ../src-base/minecraft/net/minecraft/block/BlockSlab.java
+++ ../src-work/minecraft/net/minecraft/block/BlockSlab.java
@@ -50,6 +50,16 @@
@@ -56,6 +56,19 @@
return this.func_176552_j();
}
+ @Override
+ public boolean doesSideBlockRendering(IBlockState state, IBlockAccess world, BlockPos pos, EnumFacing face)
+ {
+ if (net.minecraftforge.common.ForgeModContainer.disableStairSlabCulling)
+ return super.doesSideBlockRendering(state, world, pos, face);
+
+ if ( state.func_185914_p() )
+ return true;
+
@@ -17,7 +20,7 @@
public IBlockState func_180642_a(World p_180642_1_, BlockPos p_180642_2_, EnumFacing p_180642_3_, float p_180642_4_, float p_180642_5_, float p_180642_6_, int p_180642_7_, EntityLivingBase p_180642_8_)
{
IBlockState iblockstate = super.func_180642_a(p_180642_1_, p_180642_2_, p_180642_3_, p_180642_4_, p_180642_5_, p_180642_6_, p_180642_7_, p_180642_8_).func_177226_a(field_176554_a, BlockSlab.EnumBlockHalf.BOTTOM);
@@ -77,13 +87,14 @@
@@ -83,13 +96,14 @@
{
return false;
}
@@ -4,11 +4,11 @@
{
IBlockState iblockstate = p_176196_1_.func_180495_p(p_176196_2_.func_177977_b());
Block block = iblockstate.func_177230_c();
- return block != Blocks.field_150432_aD && block != Blocks.field_150403_cj ? (iblockstate.func_185904_a() == Material.field_151584_j ? true : (block == this && ((Integer)iblockstate.func_177229_b(field_176315_a)).intValue() >= 7 ? true : iblockstate.func_185914_p() && iblockstate.func_185904_a().func_76230_c())) : false;
+ return block != Blocks.field_150432_aD && block != Blocks.field_150403_cj ? (iblockstate.func_177230_c().isLeaves(iblockstate, p_176196_1_, p_176196_2_.func_177977_b()) ? true : (block == this && ((Integer)iblockstate.func_177229_b(field_176315_a)).intValue() >= 7 ? true : iblockstate.func_185914_p() && iblockstate.func_185904_a().func_76230_c())) : false;
- return block != Blocks.field_150432_aD && block != Blocks.field_150403_cj ? (iblockstate.func_185904_a() == Material.field_151584_j ? true : (block == this && ((Integer)iblockstate.func_177229_b(field_176315_a)).intValue() == 8 ? true : iblockstate.func_185914_p() && iblockstate.func_185904_a().func_76230_c())) : false;
+ return block != Blocks.field_150432_aD && block != Blocks.field_150403_cj ? (iblockstate.func_177230_c().isLeaves(iblockstate, p_176196_1_, p_176196_2_.func_177977_b()) ? true : (block == this && ((Integer)iblockstate.func_177229_b(field_176315_a)).intValue() == 8 ? true : iblockstate.func_185914_p() && iblockstate.func_185904_a().func_76230_c())) : false;
}
public void func_189540_a(IBlockState p_189540_1_, World p_189540_2_, BlockPos p_189540_3_, Block p_189540_4_)
public void func_189540_a(IBlockState p_189540_1_, World p_189540_2_, BlockPos p_189540_3_, Block p_189540_4_, BlockPos p_189540_5_)
@@ -87,7 +87,6 @@
{
if (!this.func_176196_c(p_176314_1_, p_176314_2_))
@@ -19,7 +19,7 @@
}
@@ -99,9 +98,8 @@
public void func_180657_a(World p_180657_1_, EntityPlayer p_180657_2_, BlockPos p_180657_3_, IBlockState p_180657_4_, @Nullable TileEntity p_180657_5_, @Nullable ItemStack p_180657_6_)
public void func_180657_a(World p_180657_1_, EntityPlayer p_180657_2_, BlockPos p_180657_3_, IBlockState p_180657_4_, @Nullable TileEntity p_180657_5_, ItemStack p_180657_6_)
{
- func_180635_a(p_180657_1_, p_180657_3_, new ItemStack(Items.field_151126_ay, ((Integer)p_180657_4_.func_177229_b(field_176315_a)).intValue() + 1, 0));
+ super.func_180657_a(p_180657_1_, p_180657_2_, p_180657_3_, p_180657_4_, p_180657_5_, p_180657_6_);
@@ -27,8 +27,8 @@
- p_180657_2_.func_71029_a(StatList.func_188055_a(this));
}
@Nullable
@@ -112,14 +110,13 @@
public Item func_180660_a(IBlockState p_180660_1_, Random p_180660_2_, int p_180660_3_)
@@ -111,14 +109,13 @@
public int func_149745_a(Random p_149745_1_)
{
@@ -44,7 +44,7 @@
p_180650_1_.func_175698_g(p_180650_2_);
}
}
@@ -153,6 +150,8 @@
@@ -152,6 +149,8 @@
return ((Integer)p_176201_1_.func_177229_b(field_176315_a)).intValue() - 1;
}
@@ -1,18 +1,30 @@
--- ../src-base/minecraft/net/minecraft/block/BlockStairs.java
+++ ../src-work/minecraft/net/minecraft/block/BlockStairs.java
@@ -445,6 +445,17 @@
@@ -444,6 +444,29 @@
return new BlockStateContainer(this, new IProperty[] {field_176309_a, field_176308_b, field_176310_M});
}
+ @Override
+ public boolean doesSideBlockRendering(IBlockState state, IBlockAccess world, BlockPos pos, EnumFacing face)
+ {
+ if (net.minecraftforge.common.ForgeModContainer.disableStairSlabCulling)
+ return super.doesSideBlockRendering(state, world, pos, face);
+
+ if ( state.func_185914_p() )
+ return true;
+
+ state = this.func_176221_a(state, world, pos);
+
+ EnumHalf half = state.func_177229_b(field_176308_b);
+ EnumFacing side = state.func_177229_b(field_176309_a);
+ return side == face || (half == EnumHalf.TOP && face == EnumFacing.UP) || (half == EnumHalf.BOTTOM && face == EnumFacing.DOWN);
+ EnumShape shape = state.func_177229_b(field_176310_M);
+ if (face == EnumFacing.UP) return half == EnumHalf.TOP;
+ if (face == EnumFacing.DOWN) return half == EnumHalf.BOTTOM;
+ if (shape == EnumShape.OUTER_LEFT || shape == EnumShape.OUTER_RIGHT) return false;
+ if (face == side) return true;
+ if (shape == EnumShape.INNER_LEFT && face.func_176746_e() == side) return true;
+ if (shape == EnumShape.INNER_RIGHT && face.func_176735_f() == side) return true;
+ return false;
+ }
+
public static enum EnumHalf implements IStringSerializable
@@ -1,6 +1,15 @@
--- ../src-base/minecraft/net/minecraft/block/BlockStem.java
+++ ../src-work/minecraft/net/minecraft/block/BlockStem.java
@@ -90,9 +90,10 @@
@@ -70,7 +70,7 @@
{
float f = BlockCrops.func_180672_a(this, p_180650_1_, p_180650_2_);
- if (p_180650_4_.nextInt((int)(25.0F / f) + 1) == 0)
+ if(net.minecraftforge.common.ForgeHooks.onCropsGrowPre(p_180650_1_, p_180650_2_, p_180650_3_, p_180650_4_.nextInt((int)(25.0F / f) + 1) == 0))
{
int i = ((Integer)p_180650_3_.func_177229_b(field_176484_a)).intValue();
@@ -90,13 +90,15 @@
}
p_180650_2_ = p_180650_2_.func_177972_a(EnumFacing.Plane.HORIZONTAL.func_179518_a(p_180650_4_));
@@ -13,7 +22,12 @@
{
p_180650_1_.func_175656_a(p_180650_2_, this.field_149877_a.func_176223_P());
}
@@ -110,24 +111,29 @@
}
+ net.minecraftforge.common.ForgeHooks.onCropsGrowPost(p_180650_1_, p_180650_2_, p_180650_3_, p_180650_1_.func_180495_p(p_180650_2_));
}
}
}
@@ -110,24 +112,29 @@
public void func_180653_a(World p_180653_1_, BlockPos p_180653_2_, IBlockState p_180653_3_, float p_180653_4_, int p_180653_5_)
{
super.func_180653_a(p_180653_1_, p_180653_2_, p_180653_3_, p_180653_4_, p_180653_5_);
@@ -18,44 +18,43 @@
}
public boolean func_176200_f(IBlockAccess p_176200_1_, BlockPos p_176200_2_)
@@ -53,7 +53,7 @@
@Nullable
@@ -52,7 +52,7 @@
public Item func_180660_a(IBlockState p_180660_1_, Random p_180660_2_, int p_180660_3_)
{
- return p_180660_2_.nextInt(8) == 0 ? Items.field_151014_N : null;
- return p_180660_2_.nextInt(8) == 0 ? Items.field_151014_N : Items.field_190931_a;
+ return null;
}
public int func_149679_a(int p_149679_1_, Random p_149679_2_)
@@ -63,7 +63,7 @@
@@ -62,7 +62,7 @@
public void func_180657_a(World p_180657_1_, EntityPlayer p_180657_2_, BlockPos p_180657_3_, IBlockState p_180657_4_, @Nullable TileEntity p_180657_5_, @Nullable ItemStack p_180657_6_)
public void func_180657_a(World p_180657_1_, EntityPlayer p_180657_2_, BlockPos p_180657_3_, IBlockState p_180657_4_, @Nullable TileEntity p_180657_5_, ItemStack p_180657_6_)
{
- if (!p_180657_1_.field_72995_K && p_180657_6_ != null && p_180657_6_.func_77973_b() == Items.field_151097_aZ)
+ if (false && !p_180657_1_.field_72995_K && p_180657_6_ != null && p_180657_6_.func_77973_b() == Items.field_151097_aZ) // Forge: Noop Taken care of by IShearable
- if (!p_180657_1_.field_72995_K && p_180657_6_.func_77973_b() == Items.field_151097_aZ)
+ if (false && !p_180657_1_.field_72995_K && p_180657_6_.func_77973_b() == Items.field_151097_aZ) // Forge: Noop Taken care of by IShearable
{
p_180657_2_.func_71029_a(StatList.func_188055_a(this));
func_180635_a(p_180657_1_, p_180657_3_, new ItemStack(Blocks.field_150329_H, 1, ((BlockTallGrass.EnumType)p_180657_4_.func_177229_b(field_176497_a)).func_177044_a()));
@@ -183,4 +183,22 @@
@@ -181,4 +181,21 @@
}
}
}
+
+ @Override public boolean isShearable(ItemStack item, IBlockAccess world, BlockPos pos){ return true; }
+ @Override
+ public List<ItemStack> onSheared(ItemStack item, IBlockAccess world, BlockPos pos, int fortune)
+ public NonNullList<ItemStack> onSheared(ItemStack item, IBlockAccess world, BlockPos pos, int fortune)
+ {
+ List<ItemStack> ret = new java.util.ArrayList<ItemStack>();
+ ret.add(new ItemStack(Blocks.field_150329_H, 1, ((BlockTallGrass.EnumType)world.func_180495_p(pos).func_177229_b(field_176497_a)).func_177044_a()));
+ return ret;
+ return NonNullList.func_191197_a(1, new ItemStack(Blocks.field_150329_H, 1, ((BlockTallGrass.EnumType)world.func_180495_p(pos).func_177229_b(field_176497_a)).func_177044_a()));
+ }
+ @Override
+ public List<ItemStack> getDrops(IBlockAccess world, BlockPos pos, IBlockState state, int fortune)
+ public NonNullList<ItemStack> getDrops(IBlockAccess world, BlockPos pos, IBlockState state, int fortune)
+ {
+ List<ItemStack> ret = new java.util.ArrayList<ItemStack>();
+ if (RANDOM.nextInt(8) != 0) return ret;
+ if (RANDOM.nextInt(8) != 0) return NonNullList.func_191196_a();
+ ItemStack seed = net.minecraftforge.common.ForgeHooks.getGrassSeed(RANDOM, fortune);
+ if (seed != null) ret.add(seed);
+ return ret;
+ if (!seed.func_190926_b())
+ return NonNullList.func_191197_a(1, seed);
+ else
+ return NonNullList.func_191196_a();
+ }
}
@@ -1,6 +1,6 @@
--- ../src-base/minecraft/net/minecraft/block/BlockTrapDoor.java
+++ ../src-work/minecraft/net/minecraft/block/BlockTrapDoor.java
@@ -240,6 +240,18 @@
@@ -244,6 +244,18 @@
return new BlockStateContainer(this, new IProperty[] {field_176284_a, field_176283_b, field_176285_M});
}
@@ -9,16 +9,16 @@
{
public static final PropertyBool field_176277_a = PropertyBool.func_177716_a("up");
public static final PropertyBool field_176273_b = PropertyBool.func_177716_a("north");
@@ -345,7 +345,7 @@
@@ -344,7 +344,7 @@
public void func_180657_a(World p_180657_1_, EntityPlayer p_180657_2_, BlockPos p_180657_3_, IBlockState p_180657_4_, @Nullable TileEntity p_180657_5_, @Nullable ItemStack p_180657_6_)
public void func_180657_a(World p_180657_1_, EntityPlayer p_180657_2_, BlockPos p_180657_3_, IBlockState p_180657_4_, @Nullable TileEntity p_180657_5_, ItemStack p_180657_6_)
{
- if (!p_180657_1_.field_72995_K && p_180657_6_ != null && p_180657_6_.func_77973_b() == Items.field_151097_aZ)
+ if (false && !p_180657_1_.field_72995_K && p_180657_6_ != null && p_180657_6_.func_77973_b() == Items.field_151097_aZ) // Forge: Noop, Covered by IShearable
- if (!p_180657_1_.field_72995_K && p_180657_6_.func_77973_b() == Items.field_151097_aZ)
+ if (false && !p_180657_1_.field_72995_K && p_180657_6_.func_77973_b() == Items.field_151097_aZ) // Forge: Noop, Covered by IShearable
{
p_180657_2_.func_71029_a(StatList.func_188055_a(this));
func_180635_a(p_180657_1_, p_180657_3_, new ItemStack(Blocks.field_150395_bd, 1, 0));
@@ -460,4 +460,14 @@
@@ -459,4 +459,14 @@
return i;
}
@@ -0,0 +1,18 @@
--- ../src-base/minecraft/net/minecraft/block/SoundType.java
+++ ../src-work/minecraft/net/minecraft/block/SoundType.java
@@ -48,7 +48,6 @@
return this.field_185861_n;
}
- @SideOnly(Side.CLIENT)
public SoundEvent func_185845_c()
{
return this.field_185862_o;
@@ -64,7 +63,6 @@
return this.field_185864_q;
}
- @SideOnly(Side.CLIENT)
public SoundEvent func_185846_f()
{
return this.field_185865_r;
@@ -1,6 +1,6 @@
--- ../src-base/minecraft/net/minecraft/block/state/BlockStateContainer.java
+++ ../src-work/minecraft/net/minecraft/block/state/BlockStateContainer.java
@@ -57,12 +57,22 @@
@@ -59,12 +59,22 @@
public BlockStateContainer(Block p_i45663_1_, IProperty<?>... p_i45663_2_)
{
@@ -26,7 +26,7 @@
map.put(iproperty.func_177701_a(), iproperty);
}
@@ -73,7 +83,7 @@
@@ -75,7 +85,7 @@
for (List < Comparable<? >> list : Cartesian.func_179321_a(this.func_177620_e()))
{
Map < IProperty<?>, Comparable<? >> map1 = MapPopulator. < IProperty<?>, Comparable<? >> func_179400_b(this.field_177624_d.values(), list);
@@ -35,7 +35,7 @@
map2.put(map1, blockstatecontainer$stateimplementation);
list1.add(blockstatecontainer$stateimplementation);
}
@@ -165,6 +175,13 @@
@@ -170,6 +180,13 @@
this.field_177237_b = p_i45660_2_;
}
@@ -49,9 +49,9 @@
public Collection < IProperty<? >> func_177227_a()
{
return Collections. < IProperty<? >> unmodifiableCollection(this.field_177237_b.keySet());
@@ -445,5 +462,86 @@
@@ -468,5 +485,86 @@
{
this.field_177239_a.func_189540_a(this, p_189546_1_, p_189546_2_, p_189546_3_);
return this.field_177239_a.func_176214_u(this);
}
+
+ //Forge Start
@@ -14,14 +14,17 @@
@SideOnly(Side.CLIENT)
boolean func_185895_e();
@@ -92,5 +96,10 @@
@@ -95,8 +99,13 @@
RayTraceResult func_185910_a(World p_185910_1_, BlockPos p_185910_2_, Vec3d p_185910_3_, Vec3d p_185910_4_);
+ @Deprecated // Forge: Use isSideSolid(IBlockAccess, BlockPos, EnumFacing.UP) instead
boolean func_185896_q();
+
+ //Forge added functions
+ boolean doesSideBlockRendering(IBlockAccess world, BlockPos pos, EnumFacing side);
+ boolean isSideSolid(IBlockAccess world, BlockPos pos, EnumFacing side);
}
+
Vec3d func_191059_e(IBlockAccess p_191059_1_, BlockPos p_191059_2_);
boolean func_191058_s();
@@ -1,6 +1,6 @@
--- ../src-base/minecraft/net/minecraft/client/Minecraft.java
+++ ../src-work/minecraft/net/minecraft/client/Minecraft.java
@@ -322,7 +322,6 @@
@@ -321,7 +321,6 @@
this.field_152355_az = (new YggdrasilAuthenticationService(this.field_110453_aa, UUID.randomUUID().toString())).createMinecraftSessionService();
this.field_71449_j = p_i45547_1_.field_178745_a.field_178752_a;
field_147123_G.info("Setting user: {}", new Object[] {this.field_71449_j.func_111285_a()});
@@ -8,7 +8,7 @@
this.field_71459_aj = p_i45547_1_.field_178741_d.field_178756_a;
this.field_71443_c = p_i45547_1_.field_178743_b.field_178764_a > 0 ? p_i45547_1_.field_178743_b.field_178764_a : 1;
this.field_71440_d = p_i45547_1_.field_178743_b.field_178762_b > 0 ? p_i45547_1_.field_178743_b.field_178762_b : 1;
@@ -437,10 +436,10 @@
@@ -436,10 +435,10 @@
this.field_110451_am = new SimpleReloadableResourceManager(this.field_110452_an);
this.field_135017_as = new LanguageManager(this.field_110452_an, this.field_71474_y.field_74363_ab);
this.field_110451_am.func_110542_a(this.field_135017_as);
@@ -21,7 +21,7 @@
this.field_152350_aA = new SkinManager(this.field_71446_o, new File(this.field_110446_Y, "skins"), this.field_152355_az);
this.field_71469_aa = new AnvilSaveConverter(new File(this.field_71412_D, "saves"), this.field_184131_U);
this.field_147127_av = new SoundHandler(this.field_110451_am, this.field_71474_y);
@@ -465,7 +464,7 @@
@@ -464,7 +463,7 @@
{
try
{
@@ -30,7 +30,7 @@
}
catch (Exception exception)
{
@@ -474,6 +473,8 @@
@@ -473,6 +472,8 @@
}
});
this.field_71417_B = new MouseHelper();
@@ -39,7 +39,7 @@
this.func_71361_d("Pre startup");
GlStateManager.func_179098_w();
GlStateManager.func_179103_j(7425);
@@ -487,19 +488,24 @@
@@ -486,19 +487,24 @@
GlStateManager.func_179096_D();
GlStateManager.func_179128_n(5888);
this.func_71361_d("Startup");
@@ -65,7 +65,7 @@
this.field_71460_t = new EntityRenderer(this, this.field_110451_am);
this.field_110451_am.func_110542_a(this.field_71460_t);
this.field_175618_aM = new BlockRendererDispatcher(this.field_175617_aL.func_174954_c(), this.field_184127_aH);
@@ -509,23 +515,27 @@
@@ -508,23 +514,27 @@
this.field_71458_u = new GuiAchievement(this);
GlStateManager.func_179083_b(0, 0, this.field_71443_c, this.field_71440_d);
this.field_71452_i = new ParticleManager(this.field_71441_e, this.field_71446_o);
@@ -96,7 +96,7 @@
if (this.field_71474_y.field_74353_u && !this.field_71431_Q)
{
this.func_71352_k();
@@ -697,21 +707,23 @@
@@ -696,21 +706,23 @@
File file2 = new File(file1, "crash-" + (new SimpleDateFormat("yyyy-MM-dd_HH.mm.ss")).format(new Date()) + "-client.txt");
Bootstrap.func_179870_a(p_71377_1_.func_71502_e());
@@ -123,7 +123,7 @@
}
public boolean func_152349_b()
@@ -904,11 +916,6 @@
@@ -903,11 +915,6 @@
public void func_147108_a(@Nullable GuiScreen p_147108_1_)
{
@@ -135,7 +135,7 @@
if (p_147108_1_ == null && this.field_71441_e == null)
{
p_147108_1_ = new GuiMainMenu();
@@ -918,6 +925,17 @@
@@ -917,6 +924,17 @@
p_147108_1_ = new GuiGameOver((ITextComponent)null);
}
@@ -153,7 +153,7 @@
if (p_147108_1_ instanceof GuiMainMenu || p_147108_1_ instanceof GuiMultiplayer)
{
this.field_71474_y.field_74330_P = false;
@@ -1053,9 +1071,11 @@
@@ -1052,9 +1070,11 @@
if (!this.field_71454_w)
{
@@ -165,7 +165,7 @@
}
this.field_71424_I.func_76319_b();
@@ -1398,9 +1418,9 @@
@@ -1397,9 +1417,9 @@
{
BlockPos blockpos = this.field_71476_x.func_178782_a();
@@ -177,7 +177,7 @@
this.field_71439_g.func_184609_a(EnumHand.MAIN_HAND);
}
}
@@ -1434,7 +1454,7 @@
@@ -1433,7 +1453,7 @@
case BLOCK:
BlockPos blockpos = this.field_71476_x.func_178782_a();
@@ -186,7 +186,7 @@
{
this.field_71442_b.func_180511_b(blockpos, this.field_71476_x.field_178784_b);
break;
@@ -1448,6 +1468,7 @@
@@ -1447,6 +1467,7 @@
}
this.field_71439_g.func_184821_cY();
@@ -194,24 +194,15 @@
}
this.field_71439_g.func_184609_a(EnumHand.MAIN_HAND);
@@ -1477,7 +1498,6 @@
switch (this.field_71476_x.field_72313_a)
{
case ENTITY:
-
if (this.field_71442_b.func_187102_a(this.field_71439_g, this.field_71476_x.field_72308_g, this.field_71476_x, this.field_71439_g.func_184586_b(enumhand), enumhand) == EnumActionResult.SUCCESS)
{
return;
@@ -1520,7 +1540,7 @@
@@ -1512,6 +1533,7 @@
}
}
ItemStack itemstack1 = this.field_71439_g.func_184586_b(enumhand);
-
+ if (itemstack1 == null && (this.field_71476_x == null || this.field_71476_x.field_72313_a == RayTraceResult.Type.MISS)) net.minecraftforge.common.ForgeHooks.onEmptyClick(this.field_71439_g, enumhand);
if (itemstack1 != null && this.field_71442_b.func_187101_a(this.field_71439_g, this.field_71441_e, itemstack1, enumhand) == EnumActionResult.SUCCESS)
+ if (itemstack.func_190926_b() && (this.field_71476_x == null || this.field_71476_x.field_72313_a == RayTraceResult.Type.MISS)) net.minecraftforge.common.ForgeHooks.onEmptyClick(this.field_71439_g, enumhand);
if (!itemstack.func_190926_b() && this.field_71442_b.func_187101_a(this.field_71439_g, this.field_71441_e, enumhand) == EnumActionResult.SUCCESS)
{
this.field_71460_t.field_78516_c.func_187460_a(enumhand);
@@ -1627,6 +1647,8 @@
@@ -1618,6 +1640,8 @@
--this.field_71467_ac;
}
@@ -220,7 +211,7 @@
this.field_71424_I.func_76320_a("gui");
if (!this.field_71445_n)
@@ -1738,6 +1760,7 @@
@@ -1729,6 +1753,7 @@
this.field_71457_ai = 0;
this.field_71441_e.func_72897_h(this.field_71439_g);
}
@@ -228,7 +219,7 @@
}
this.field_71424_I.func_76318_c("gameRenderer");
@@ -1825,6 +1848,7 @@
@@ -1816,6 +1841,7 @@
this.field_71453_ak.func_74428_b();
}
@@ -236,7 +227,7 @@
this.field_71424_I.func_76319_b();
this.field_71423_H = func_71386_F();
}
@@ -1931,6 +1955,7 @@
@@ -1922,6 +1948,7 @@
}
}
}
@@ -244,7 +235,7 @@
}
this.func_184117_aA();
@@ -2177,6 +2202,8 @@
@@ -2168,6 +2195,8 @@
{
while (Mouse.next())
{
@@ -253,7 +244,7 @@
int i = Mouse.getEventButton();
KeyBinding.func_74510_a(i - 100, Mouse.getEventButtonState());
@@ -2242,6 +2269,7 @@
@@ -2233,6 +2262,7 @@
public void func_71371_a(String p_71371_1_, String p_71371_2_, @Nullable WorldSettings p_71371_3_)
{
@@ -261,7 +252,7 @@
this.func_71403_a((WorldClient)null);
System.gc();
ISaveHandler isavehandler = this.field_71469_aa.func_75804_a(p_71371_1_, false);
@@ -2284,6 +2312,12 @@
@@ -2275,6 +2305,12 @@
while (!this.field_71437_Z.func_71200_ad())
{
@@ -274,13 +265,13 @@
String s = this.field_71437_Z.func_71195_b_();
if (s != null)
@@ -2309,8 +2343,14 @@
@@ -2300,8 +2336,14 @@
SocketAddress socketaddress = this.field_71437_Z.func_147137_ag().func_151270_a();
NetworkManager networkmanager = NetworkManager.func_150722_a(socketaddress);
networkmanager.func_150719_a(new NetHandlerLoginClient(networkmanager, this, (GuiScreen)null));
- networkmanager.func_179290_a(new C00Handshake(210, socketaddress.toString(), 0, EnumConnectionState.LOGIN));
- networkmanager.func_179290_a(new C00Handshake(314, socketaddress.toString(), 0, EnumConnectionState.LOGIN));
- networkmanager.func_179290_a(new CPacketLoginStart(this.func_110432_I().func_148256_e()));
+ networkmanager.func_179290_a(new C00Handshake(210, socketaddress.toString(), 0, EnumConnectionState.LOGIN, true));
+ networkmanager.func_179290_a(new C00Handshake(314, socketaddress.toString(), 0, EnumConnectionState.LOGIN, true));
+ com.mojang.authlib.GameProfile gameProfile = this.func_110432_I().func_148256_e();
+ if (!this.func_110432_I().hasCachedProperties())
+ {
@@ -291,7 +282,7 @@
this.field_71453_ak = networkmanager;
}
@@ -2321,6 +2361,8 @@
@@ -2312,6 +2354,8 @@
public void func_71353_a(@Nullable WorldClient p_71353_1_, String p_71353_2_)
{
@@ -300,7 +291,7 @@
if (p_71353_1_ == null)
{
NetHandlerPlayClient nethandlerplayclient = this.func_147114_u();
@@ -2333,6 +2375,18 @@
@@ -2324,6 +2368,18 @@
if (this.field_71437_Z != null && this.field_71437_Z.func_175578_N())
{
this.field_71437_Z.func_71263_m();
@@ -319,7 +310,7 @@
}
this.field_71437_Z = null;
@@ -2356,6 +2410,7 @@
@@ -2347,6 +2403,7 @@
this.field_71456_v.func_181029_i();
this.func_71351_a((ServerData)null);
this.field_71455_al = false;
@@ -327,7 +318,7 @@
}
this.field_147127_av.func_147690_c();
@@ -2473,159 +2528,8 @@
@@ -2464,159 +2521,8 @@
{
if (this.field_71476_x != null && this.field_71476_x.field_72313_a != RayTraceResult.Type.MISS)
{
@@ -348,7 +339,7 @@
-
- itemstack = block.func_185473_a(this.field_71441_e, blockpos, iblockstate);
-
- if (itemstack == null)
- if (itemstack.func_190926_b())
- {
- return;
- }
@@ -378,13 +369,13 @@
- EntityItemFrame entityitemframe = (EntityItemFrame)this.field_71476_x.field_72308_g;
- ItemStack itemstack1 = entityitemframe.func_82335_i();
-
- if (itemstack1 == null)
- if (itemstack1.func_190926_b())
- {
- itemstack = new ItemStack(Items.field_151160_bD);
- }
- else
- {
- itemstack = ItemStack.func_77944_b(itemstack1);
- itemstack = itemstack1.func_77946_l();
- }
- }
- else if (this.field_71476_x.field_72308_g instanceof EntityMinecart)
@@ -429,32 +420,32 @@
- }
- else
- {
- String s = EntityList.func_75621_b(this.field_71476_x.field_72308_g);
- ResourceLocation resourcelocation = EntityList.func_191301_a(this.field_71476_x.field_72308_g);
-
- if (!EntityList.field_75627_a.containsKey(s))
- if (resourcelocation == null || !EntityList.field_75627_a.containsKey(resourcelocation))
- {
- return;
- }
-
- itemstack = new ItemStack(Items.field_151063_bx);
- ItemMonsterPlacer.func_185078_a(itemstack, s);
- ItemMonsterPlacer.func_185078_a(itemstack, resourcelocation);
- }
- }
-
- if (itemstack.func_77973_b() == null)
- if (itemstack.func_190926_b())
- {
- String s1 = "";
- String s = "";
-
- if (this.field_71476_x.field_72313_a == RayTraceResult.Type.BLOCK)
- {
- s1 = ((ResourceLocation)Block.field_149771_c.func_177774_c(this.field_71441_e.func_180495_p(this.field_71476_x.func_178782_a()).func_177230_c())).toString();
- s = ((ResourceLocation)Block.field_149771_c.func_177774_c(this.field_71441_e.func_180495_p(this.field_71476_x.func_178782_a()).func_177230_c())).toString();
- }
- else if (this.field_71476_x.field_72313_a == RayTraceResult.Type.ENTITY)
- {
- s1 = EntityList.func_75621_b(this.field_71476_x.field_72308_g);
- s = EntityList.func_191301_a(this.field_71476_x.field_72308_g).toString();
- }
-
- field_147123_G.warn("Picking on: [{}] {} gave null item", new Object[] {this.field_71476_x.field_72313_a, s1});
- field_147123_G.warn("Picking on: [{}] {} gave null item", new Object[] {this.field_71476_x.field_72313_a, s});
- }
- else
- {
@@ -489,7 +480,7 @@
}
}
@@ -2927,18 +2831,8 @@
@@ -2919,18 +2825,8 @@
public static int func_71369_N()
{
@@ -510,7 +501,7 @@
}
public boolean func_70002_Q()
@@ -3077,15 +2971,16 @@
@@ -3069,15 +2965,16 @@
{
if (Keyboard.getEventKeyState())
{
@@ -529,7 +520,7 @@
}
}
}
@@ -3205,6 +3100,12 @@
@@ -3197,6 +3094,12 @@
return this.field_184127_aH;
}
@@ -16,7 +16,15 @@
}
private synchronized void func_148608_i()
@@ -338,6 +340,9 @@
@@ -205,6 +207,7 @@
this.field_148620_e.stop(s);
}
+ this.field_189000_p.clear(); //Forge: MC-35856 Fixed paused sounds repeating when switching worlds
this.field_148629_h.clear();
this.field_148626_m.clear();
this.field_148625_l.clear();
@@ -338,6 +341,9 @@
{
if (this.field_148617_f)
{
@@ -26,7 +34,7 @@
SoundEventAccessor soundeventaccessor = p_148611_1_.func_184366_a(this.field_148622_c);
ResourceLocation resourcelocation = p_148611_1_.func_147650_b();
@@ -400,10 +405,12 @@
@@ -400,10 +406,12 @@
if (sound.func_188723_h())
{
this.field_148620_e.newStreamingSource(false, s, func_148612_a(resourcelocation1), resourcelocation1.toString(), flag, p_148611_1_.func_147649_g(), p_148611_1_.func_147654_h(), p_148611_1_.func_147651_i(), p_148611_1_.func_147656_j().func_148586_a(), f);
@@ -38,4 +46,4 @@
+ net.minecraftforge.common.MinecraftForge.EVENT_BUS.post(new net.minecraftforge.client.event.sound.PlaySoundSourceEvent(this, p_148611_1_, s));
}
field_148621_b.debug(field_148623_a, "Playing sound {} for event {} as channel {}", new Object[] {sound.func_188719_a(), resourcelocation1, s});
field_148621_b.debug(field_148623_a, "Playing sound {} for event {} as channel {}", new Object[] {sound.func_188719_a(), resourcelocation, s});
@@ -1,7 +1,7 @@
--- ../src-base/minecraft/net/minecraft/client/entity/EntityPlayerSP.java
+++ ../src-work/minecraft/net/minecraft/client/entity/EntityPlayerSP.java
@@ -415,6 +415,15 @@
this.field_71159_c.field_71456_v.func_146158_b().func_146227_a(p_146105_1_);
@@ -428,6 +428,15 @@
}
}
+ private boolean isHeadspaceFree(BlockPos pos, int height)
@@ -16,7 +16,7 @@
protected boolean func_145771_j(double p_145771_1_, double p_145771_3_, double p_145771_5_)
{
if (this.field_70145_X)
@@ -427,30 +436,34 @@
@@ -440,30 +449,34 @@
double d0 = p_145771_1_ - (double)blockpos.func_177958_n();
double d1 = p_145771_5_ - (double)blockpos.func_177952_p();
@@ -56,7 +56,7 @@
{
d2 = 1.0D - d1;
i = 5;
@@ -485,7 +498,7 @@
@@ -498,7 +511,7 @@
private boolean func_175162_d(BlockPos p_175162_1_)
{
@@ -65,7 +65,7 @@
}
public void func_70031_b(boolean p_70031_1_)
@@ -530,7 +543,13 @@
@@ -543,7 +556,13 @@
public void func_184185_a(SoundEvent p_184185_1_, float p_184185_2_, float p_184185_3_)
{
@@ -9,15 +9,7 @@
for (int i = 0; i < 32; ++i)
{
@@ -97,6 +97,7 @@
public void func_110549_a(IResourceManager p_110549_1_)
{
this.func_111272_d();
+ this.func_98306_d();
}
private void func_111272_d()
@@ -106,7 +107,7 @@
@@ -107,7 +107,7 @@
try
{
@@ -26,7 +18,7 @@
bufferedimage = TextureUtil.func_177053_a(iresource.func_110527_b());
}
catch (IOException ioexception)
@@ -171,7 +172,7 @@
@@ -172,7 +172,7 @@
try
{
@@ -35,7 +27,7 @@
iresource.func_110527_b().read(this.field_78287_e);
}
catch (IOException ioexception)
@@ -202,7 +203,7 @@
@@ -203,7 +203,7 @@
int i = p_78266_1_ % 16 * 8;
int j = p_78266_1_ / 16 * 8;
int k = p_78266_2_ ? 1 : 0;
@@ -44,7 +36,7 @@
int l = this.field_78286_d[p_78266_1_];
float f = (float)l - 0.01F;
GlStateManager.func_187447_r(5);
@@ -230,7 +231,7 @@
@@ -231,7 +231,7 @@
private void func_78257_a(int p_78257_1_)
{
@@ -53,7 +45,7 @@
}
protected float func_78277_a(char p_78277_1_, boolean p_78277_2_)
@@ -279,7 +280,7 @@
@@ -280,7 +280,7 @@
public int func_175065_a(String p_175065_1_, float p_175065_2_, float p_175065_3_, int p_175065_4_, boolean p_175065_5_)
{
@@ -62,7 +54,7 @@
this.func_78265_b();
int i;
@@ -349,7 +350,7 @@
@@ -350,7 +350,7 @@
int j1 = this.field_78285_g[i1];
this.field_78304_r = j1;
@@ -71,7 +63,7 @@
}
else if (i1 == 16)
{
@@ -378,7 +379,7 @@
@@ -379,7 +379,7 @@
this.field_78299_w = false;
this.field_78300_v = false;
this.field_78301_u = false;
@@ -80,7 +72,7 @@
}
++i;
@@ -406,7 +407,7 @@
@@ -407,7 +407,7 @@
c0 = c1;
}
@@ -89,7 +81,7 @@
boolean flag = (c0 == 0 || j == -1 || this.field_78293_l) && p_78255_2_;
if (flag)
@@ -444,7 +445,16 @@
@@ -445,7 +445,16 @@
++f;
}
@@ -106,7 +98,7 @@
if (this.field_78299_w)
{
Tessellator tessellator = Tessellator.func_178181_a();
@@ -517,7 +527,7 @@
@@ -518,7 +527,7 @@
this.field_78292_o = (float)(p_180455_4_ >> 8 & 255) / 255.0F;
this.field_78306_p = (float)(p_180455_4_ & 255) / 255.0F;
this.field_78305_q = (float)(p_180455_4_ >> 24 & 255) / 255.0F;
@@ -115,7 +107,7 @@
this.field_78295_j = p_180455_2_;
this.field_78296_k = p_180455_3_;
this.func_78255_a(p_180455_1_, p_180455_5_);
@@ -848,6 +858,26 @@
@@ -849,6 +858,26 @@
return this.field_78294_m;
}
@@ -1,6 +1,6 @@
--- ../src-base/minecraft/net/minecraft/client/gui/GuiIngame.java
+++ ../src-work/minecraft/net/minecraft/client/gui/GuiIngame.java
@@ -360,7 +360,8 @@
@@ -359,7 +359,8 @@
BlockPos blockpos = raytraceresult.func_178782_a();
@@ -10,7 +10,7 @@
{
return;
}
@@ -418,7 +419,10 @@
@@ -417,7 +418,10 @@
{
Potion potion = potioneffect.func_188419_a();
@@ -22,7 +22,7 @@
{
int k = p_184048_1_.func_78326_a();
int l = 1;
@@ -455,7 +459,10 @@
@@ -460,7 +464,10 @@
}
GlStateManager.func_179131_c(1.0F, 1.0F, 1.0F, f);
@@ -1,6 +1,6 @@
--- ../src-base/minecraft/net/minecraft/client/gui/GuiListWorldSelectionEntry.java
+++ ../src-work/minecraft/net/minecraft/client/gui/GuiListWorldSelectionEntry.java
@@ -242,7 +242,7 @@
@@ -246,7 +246,7 @@
if (this.field_186784_e.func_71359_d().func_90033_f(this.field_186786_g.func_75786_a()))
{
@@ -1,6 +1,6 @@
--- ../src-base/minecraft/net/minecraft/client/gui/GuiMainMenu.java
+++ ../src-work/minecraft/net/minecraft/client/gui/GuiMainMenu.java
@@ -67,6 +67,8 @@
@@ -65,6 +65,8 @@
private GuiButton field_175372_K;
private boolean field_183502_L;
private GuiScreen field_183503_M;
@@ -9,7 +9,7 @@
public GuiMainMenu()
{
@@ -209,13 +211,15 @@
@@ -216,13 +218,15 @@
this.field_183503_M.func_183500_a(this.field_146294_l, this.field_146295_m);
this.field_183503_M.func_73866_w_();
}
@@ -26,7 +26,7 @@
}
private void func_73972_b(int p_73972_1_, int p_73972_2_)
@@ -263,6 +267,11 @@
@@ -270,6 +274,11 @@
this.field_146297_k.func_71400_g();
}
@@ -38,7 +38,7 @@
if (p_146284_1_.field_146127_k == 11)
{
this.field_146297_k.func_71371_a("Demo_World", "Demo_World", DemoWorldServer.field_73071_a);
@@ -490,6 +499,8 @@
@@ -501,6 +510,8 @@
this.func_73729_b(j + 155, 30, 0, 45, 155, 44);
}
@@ -47,7 +47,7 @@
GlStateManager.func_179094_E();
GlStateManager.func_179109_b((float)(this.field_146294_l / 2 + 90), 70.0F, 0.0F);
GlStateManager.func_179114_b(-20.0F, 0.0F, 0.0F, 1.0F);
@@ -509,7 +520,15 @@
@@ -520,7 +531,15 @@
s = s + ("release".equalsIgnoreCase(this.field_146297_k.func_184123_d()) ? "" : "/" + this.field_146297_k.func_184123_d());
}
@@ -64,7 +64,7 @@
String s1 = "Copyright Mojang AB. Do not distribute!";
this.func_73731_b(this.field_146289_q, "Copyright Mojang AB. Do not distribute!", this.field_146294_l - this.field_146289_q.func_78256_a("Copyright Mojang AB. Do not distribute!") - 2, this.field_146295_m - 10, -1);
@@ -526,6 +545,7 @@
@@ -537,6 +556,7 @@
{
this.field_183503_M.func_73863_a(p_73863_1_, p_73863_2_, p_73863_3_);
}
@@ -72,7 +72,7 @@
}
protected void func_73864_a(int p_73864_1_, int p_73864_2_, int p_73864_3_) throws IOException
@@ -546,6 +566,8 @@
@@ -557,6 +577,8 @@
{
this.field_183503_M.func_73864_a(p_73864_1_, p_73864_2_, p_73864_3_);
}
@@ -1,6 +1,6 @@
--- ../src-base/minecraft/net/minecraft/client/gui/GuiOverlayDebug.java
+++ ../src-work/minecraft/net/minecraft/client/gui/GuiOverlayDebug.java
@@ -188,6 +188,9 @@
@@ -189,6 +189,9 @@
long l = j - k;
List<String> list = Lists.newArrayList(new String[] {String.format("Java: %s %dbit", new Object[]{System.getProperty("java.version"), Integer.valueOf(this.field_175242_a.func_147111_S() ? 64 : 32)}), String.format("Mem: % 2d%% %03d/%03dMB", new Object[]{Long.valueOf(l * 100L / i), Long.valueOf(func_175240_a(l)), Long.valueOf(func_175240_a(i))}), String.format("Allocated: % 2d%% %03dMB", new Object[]{Long.valueOf(j * 100L / i), Long.valueOf(func_175240_a(j))}), "", String.format("CPU: %s", new Object[]{OpenGlHelper.func_183029_j()}), "", String.format("Display: %dx%d (%s)", new Object[]{Integer.valueOf(Display.getWidth()), Integer.valueOf(Display.getHeight()), GlStateManager.func_187416_u(7936)}), GlStateManager.func_187416_u(7937), GlStateManager.func_187416_u(7938)});
@@ -1,21 +1,23 @@
--- ../src-base/minecraft/net/minecraft/client/gui/GuiScreen.java
+++ ../src-work/minecraft/net/minecraft/client/gui/GuiScreen.java
@@ -147,7 +147,8 @@
@@ -147,7 +147,10 @@
}
}
- this.func_146283_a(list, p_146285_2_, p_146285_3_);
+ FontRenderer font = p_146285_1_.func_77973_b().getFontRenderer(p_146285_1_);
+ net.minecraftforge.fml.client.config.GuiUtils.preItemToolTip(p_146285_1_);
+ this.drawHoveringText(list, p_146285_2_, p_146285_3_, (font == null ? field_146289_q : font));
+ net.minecraftforge.fml.client.config.GuiUtils.postItemToolTip();
}
protected void func_146279_a(String p_146279_1_, int p_146279_2_, int p_146279_3_)
@@ -157,7 +158,13 @@
@@ -157,7 +160,13 @@
protected void func_146283_a(List<String> p_146283_1_, int p_146283_2_, int p_146283_3_)
{
- if (!p_146283_1_.isEmpty())
+ drawHoveringText(p_146283_1_, p_146283_2_, p_146283_3_, field_146289_q);
+ drawHoveringText(p_146283_1_, p_146283_2_, p_146283_3_, field_146289_q);
+ }
+
+ protected void drawHoveringText(List<String> p_146283_1_, int p_146283_2_, int p_146283_3_, FontRenderer font)
@@ -25,7 +27,7 @@
{
GlStateManager.func_179101_C();
RenderHelper.func_74518_a();
@@ -427,6 +434,7 @@
@@ -418,6 +427,7 @@
{
this.field_146297_k.field_71456_v.func_146158_b().func_146239_a(p_175281_1_);
}
@@ -33,7 +35,7 @@
this.field_146297_k.field_71439_g.func_71165_d(p_175281_1_);
}
@@ -441,9 +449,15 @@
@@ -432,9 +442,15 @@
if (guibutton.func_146116_c(this.field_146297_k, p_73864_1_, p_73864_2_))
{
@@ -49,7 +51,7 @@
}
}
}
@@ -473,8 +487,12 @@
@@ -464,8 +480,12 @@
this.field_146289_q = p_146280_1_.field_71466_p;
this.field_146294_l = p_146280_2_;
this.field_146295_m = p_146280_3_;
@@ -62,7 +64,7 @@
}
public void func_183500_a(int p_183500_1_, int p_183500_2_)
@@ -493,7 +511,9 @@
@@ -484,7 +504,9 @@
{
while (Mouse.next())
{
@@ -72,7 +74,7 @@
}
}
@@ -501,7 +521,9 @@
@@ -492,7 +514,9 @@
{
while (Keyboard.next())
{
@@ -82,7 +84,7 @@
}
}
}
@@ -563,6 +585,7 @@
@@ -554,6 +578,7 @@
public void func_146276_q_()
{
this.func_146270_b(0);
@@ -1,6 +1,6 @@
--- ../src-base/minecraft/net/minecraft/client/gui/GuiScreenDemo.java
+++ ../src-work/minecraft/net/minecraft/client/gui/GuiScreenDemo.java
@@ -73,10 +73,10 @@
@@ -68,10 +68,10 @@
this.field_146289_q.func_78276_b(I18n.func_135052_a("demo.help.title", new Object[0]), i, j, 2039583);
j = j + 12;
GameSettings gamesettings = this.field_146297_k.field_71474_y;
@@ -0,0 +1,15 @@
--- ../src-base/minecraft/net/minecraft/client/gui/GuiVideoSettings.java
+++ ../src-work/minecraft/net/minecraft/client/gui/GuiVideoSettings.java
@@ -117,4 +117,12 @@
this.func_73732_a(this.field_146289_q, this.field_146500_a, this.field_146294_l / 2, 5, 16777215);
super.func_73863_a(p_73863_1_, p_73863_2_, p_73863_3_);
}
+
+ // FORGE: fix for MC-64581 very laggy mipmap slider
+ @Override
+ public void func_146281_b()
+ {
+ super.func_146281_b();
+ this.field_146297_k.field_71474_y.onGuiClosed();
+ }
}
@@ -1,7 +1,7 @@
--- ../src-base/minecraft/net/minecraft/client/gui/ServerListEntryNormal.java
+++ ../src-work/minecraft/net/minecraft/client/gui/ServerListEntryNormal.java
@@ -82,7 +82,7 @@
boolean flag1 = this.field_148301_e.field_82821_f < 210;
boolean flag1 = this.field_148301_e.field_82821_f < 314;
boolean flag2 = flag || flag1;
this.field_148300_d.field_71466_p.func_78276_b(this.field_148301_e.field_78847_a, p_180790_2_ + 32 + 3, p_180790_3_ + 1, 16777215);
- List<String> list = this.field_148300_d.field_71466_p.func_78271_c(this.field_148301_e.field_78843_d, p_180790_4_ - 32 - 2);
@@ -1,21 +1,20 @@
--- ../src-base/minecraft/net/minecraft/client/gui/inventory/GuiContainer.java
+++ ../src-work/minecraft/net/minecraft/client/gui/inventory/GuiContainer.java
@@ -176,8 +176,11 @@
@@ -180,8 +180,10 @@
GlStateManager.func_179109_b(0.0F, 0.0F, 32.0F);
this.field_73735_i = 200.0F;
this.field_146296_j.field_77023_b = 200.0F;
+ net.minecraft.client.gui.FontRenderer font = null;
+ if (p_146982_1_ != null) font = p_146982_1_.func_77973_b().getFontRenderer(p_146982_1_);
+ net.minecraft.client.gui.FontRenderer font = p_146982_1_.func_77973_b().getFontRenderer(p_146982_1_);
+ if (font == null) font = field_146289_q;
this.field_146296_j.func_180450_b(p_146982_1_, p_146982_2_, p_146982_3_);
- this.field_146296_j.func_180453_a(this.field_146289_q, p_146982_1_, p_146982_2_, p_146982_3_ - (this.field_147012_x == null ? 0 : 8), p_146982_4_);
+ this.field_146296_j.func_180453_a(font, p_146982_1_, p_146982_2_, p_146982_3_ - (this.field_147012_x == null ? 0 : 8), p_146982_4_);
- this.field_146296_j.func_180453_a(this.field_146289_q, p_146982_1_, p_146982_2_, p_146982_3_ - (this.field_147012_x.func_190926_b() ? 0 : 8), p_146982_4_);
+ this.field_146296_j.func_180453_a(font, p_146982_1_, p_146982_2_, p_146982_3_ - (this.field_147012_x.func_190926_b() ? 0 : 8), p_146982_4_);
this.field_73735_i = 0.0F;
this.field_146296_j.field_77023_b = 0.0F;
}
@@ -240,13 +243,12 @@
@@ -239,13 +241,12 @@
if (itemstack == null && p_146977_1_.func_111238_b())
if (itemstack.func_190926_b() && p_146977_1_.func_111238_b())
{
- String s1 = p_146977_1_.func_178171_c();
+ TextureAtlasSprite textureatlassprite = p_146977_1_.getBackgroundSprite();
@@ -30,7 +29,7 @@
this.func_175175_a(i, j, textureatlassprite, 16, 16);
GlStateManager.func_179145_e();
flag1 = true;
@@ -316,7 +318,7 @@
@@ -319,7 +320,7 @@
protected void func_73864_a(int p_73864_1_, int p_73864_2_, int p_73864_3_) throws IOException
{
super.func_73864_a(p_73864_1_, p_73864_2_, p_73864_3_);
@@ -39,7 +38,7 @@
Slot slot = this.func_146975_c(p_73864_1_, p_73864_2_);
long i = Minecraft.func_71386_F();
this.field_146993_M = this.field_146998_K == slot && i - this.field_146997_J < 250L && this.field_146992_L == p_73864_3_;
@@ -327,6 +329,7 @@
@@ -330,6 +331,7 @@
int j = this.field_147003_i;
int k = this.field_147009_r;
boolean flag1 = p_73864_1_ < j || p_73864_2_ < k || p_73864_1_ >= j + this.field_146999_f || p_73864_2_ >= k + this.field_147000_g;
@@ -47,16 +46,16 @@
int l = -1;
if (slot != null)
@@ -364,7 +367,7 @@
@@ -367,7 +369,7 @@
{
if (this.field_146297_k.field_71439_g.field_71071_by.func_70445_o() == null)
if (this.field_146297_k.field_71439_g.field_71071_by.func_70445_o().func_190926_b())
{
- if (p_73864_3_ == this.field_146297_k.field_71474_y.field_74322_I.func_151463_i() + 100)
+ if (this.field_146297_k.field_71474_y.field_74322_I.isActiveAndMatches(p_73864_3_ - 100))
{
this.func_184098_a(slot, l, p_73864_3_, ClickType.CLONE);
}
@@ -402,7 +405,7 @@
@@ -405,7 +407,7 @@
{
this.field_146987_F = 1;
}
@@ -65,7 +64,7 @@
{
this.field_146987_F = 2;
}
@@ -464,10 +467,12 @@
@@ -467,10 +469,12 @@
protected void func_146286_b(int p_146286_1_, int p_146286_2_, int p_146286_3_)
{
@@ -78,7 +77,7 @@
int k = -1;
if (slot != null)
@@ -488,7 +493,7 @@
@@ -491,7 +495,7 @@
{
for (Slot slot2 : this.field_147002_h.field_75151_b)
{
@@ -87,16 +86,16 @@
{
this.func_184098_a(slot2, slot2.field_75222_d, p_146286_3_, ClickType.QUICK_MOVE);
}
@@ -575,7 +580,7 @@
@@ -578,7 +582,7 @@
}
else if (this.field_146297_k.field_71439_g.field_71071_by.func_70445_o() != null)
else if (!this.field_146297_k.field_71439_g.field_71071_by.func_70445_o().func_190926_b())
{
- if (p_146286_3_ == this.field_146297_k.field_71474_y.field_74322_I.func_151463_i() + 100)
+ if (this.field_146297_k.field_71474_y.field_74322_I.isActiveAndMatches(p_146286_3_ - 100))
{
this.func_184098_a(slot, k, p_146286_3_, ClickType.CLONE);
}
@@ -627,7 +632,7 @@
@@ -630,7 +634,7 @@
protected void func_73869_a(char p_73869_1_, int p_73869_2_) throws IOException
{
@@ -105,7 +104,7 @@
{
this.field_146297_k.field_71439_g.func_71053_j();
}
@@ -636,11 +641,11 @@
@@ -639,11 +643,11 @@
if (this.field_147006_u != null && this.field_147006_u.func_75216_d())
{
@@ -119,7 +118,7 @@
{
this.func_184098_a(this.field_147006_u, this.field_147006_u.field_75222_d, func_146271_m() ? 1 : 0, ClickType.THROW);
}
@@ -653,7 +658,7 @@
@@ -656,7 +660,7 @@
{
for (int i = 0; i < 9; ++i)
{
@@ -128,7 +127,7 @@
{
this.func_184098_a(this.field_147006_u, this.field_147006_u.field_75222_d, i, ClickType.SWAP);
return true;
@@ -686,4 +691,16 @@
@@ -689,4 +693,16 @@
this.field_146297_k.field_71439_g.func_71053_j();
}
}
@@ -1,6 +1,6 @@
--- ../src-base/minecraft/net/minecraft/client/gui/inventory/GuiContainerCreative.java
+++ ../src-work/minecraft/net/minecraft/client/gui/inventory/GuiContainerCreative.java
@@ -50,6 +50,8 @@
@@ -52,6 +52,8 @@
private Slot field_147064_C;
private boolean field_147057_D;
private CreativeCrafting field_147059_E;
@@ -9,7 +9,7 @@
public GuiContainerCreative(EntityPlayer p_i1088_1_)
{
@@ -259,6 +261,13 @@
@@ -265,6 +267,13 @@
this.func_147050_b(CreativeTabs.field_78032_a[i]);
this.field_147059_E = new CreativeCrafting(this.field_146297_k);
this.field_146297_k.field_71439_g.field_71069_bz.func_75132_a(this.field_147059_E);
@@ -23,7 +23,7 @@
}
else
{
@@ -280,7 +289,7 @@
@@ -286,7 +295,7 @@
protected void func_73869_a(char p_73869_1_, int p_73869_2_) throws IOException
{
@@ -32,7 +32,7 @@
{
if (GameSettings.func_100015_a(this.field_146297_k.field_71474_y.field_74310_D))
{
@@ -318,6 +327,14 @@
@@ -324,6 +333,14 @@
GuiContainerCreative.ContainerCreative guicontainercreative$containercreative = (GuiContainerCreative.ContainerCreative)this.field_147002_h;
guicontainercreative$containercreative.field_148330_a.clear();
@@ -47,7 +47,7 @@
for (Item item : Item.field_150901_e)
{
if (item != null && item.func_77640_w() != null)
@@ -325,7 +342,13 @@
@@ -331,7 +348,13 @@
item.func_150895_a(item, (CreativeTabs)null, guicontainercreative$containercreative.field_148330_a);
}
}
@@ -61,15 +61,15 @@
for (Enchantment enchantment : Enchantment.field_185264_b)
{
if (enchantment != null && enchantment.field_77351_y != null)
@@ -333,7 +356,6 @@
@@ -339,7 +362,6 @@
Items.field_151134_bR.func_92113_a(enchantment, guicontainercreative$containercreative.field_148330_a);
}
}
-
Iterator<ItemStack> iterator = guicontainercreative$containercreative.field_148330_a.iterator();
String s1 = this.field_147062_A.func_146179_b().toLowerCase();
String s1 = this.field_147062_A.func_146179_b().toLowerCase(Locale.ROOT);
@@ -365,7 +387,7 @@
@@ -371,7 +393,7 @@
{
CreativeTabs creativetabs = CreativeTabs.field_78032_a[field_147058_w];
@@ -78,7 +78,7 @@
{
GlStateManager.func_179084_k();
this.field_146289_q.func_78276_b(I18n.func_135052_a(creativetabs.func_78024_c(), new Object[0]), 8, 6, 4210752);
@@ -400,7 +422,7 @@
@@ -406,7 +428,7 @@
for (CreativeTabs creativetabs : CreativeTabs.field_78032_a)
{
@@ -87,7 +87,7 @@
{
this.func_147050_b(creativetabs);
return;
@@ -413,11 +435,13 @@
@@ -419,11 +441,13 @@
private boolean func_147055_p()
{
@@ -101,7 +101,7 @@
int i = field_147058_w;
field_147058_w = p_147050_1_.func_78021_a();
GuiContainerCreative.ContainerCreative guicontainercreative$containercreative = (GuiContainerCreative.ContainerCreative)this.field_147002_h;
@@ -488,12 +512,14 @@
@@ -494,12 +518,14 @@
if (this.field_147062_A != null)
{
@@ -117,7 +117,7 @@
this.func_147053_i();
}
else
@@ -563,20 +589,43 @@
@@ -569,20 +595,43 @@
}
super.func_73863_a(p_73863_1_, p_73863_2_, p_73863_3_);
@@ -162,7 +162,17 @@
GlStateManager.func_179131_c(1.0F, 1.0F, 1.0F, 1.0F);
GlStateManager.func_179140_f();
}
@@ -638,16 +687,35 @@
@@ -630,7 +679,9 @@
}
}
+ net.minecraftforge.fml.client.config.GuiUtils.preItemToolTip(p_146285_1_);
this.func_146283_a(list, p_146285_2_, p_146285_3_);
+ net.minecraftforge.fml.client.config.GuiUtils.postItemToolTip();
}
else
{
@@ -644,16 +695,35 @@
RenderHelper.func_74520_c();
CreativeTabs creativetabs = CreativeTabs.field_78032_a[field_147058_w];
@@ -199,7 +209,7 @@
this.field_146297_k.func_110434_K().func_110577_a(new ResourceLocation("textures/gui/container/creative_inventory/tab_" + creativetabs.func_78015_f()));
this.func_73729_b(this.field_147003_i, this.field_147009_r, 0, 0, this.field_146999_f, this.field_147000_g);
this.field_147062_A.func_146194_f();
@@ -662,6 +730,14 @@
@@ -668,6 +738,14 @@
this.func_73729_b(i, j + (int)((float)(k - j - 17) * this.field_147067_x), 232 + (this.func_147055_p() ? 0 : 12), 0, 12, 15);
}
@@ -214,7 +224,7 @@
this.func_147051_a(creativetabs);
if (creativetabs == CreativeTabs.field_78036_m)
@@ -672,6 +748,14 @@
@@ -678,6 +756,14 @@
protected boolean func_147049_a(CreativeTabs p_147049_1_, int p_147049_2_, int p_147049_3_)
{
@@ -229,7 +239,7 @@
int i = p_147049_1_.func_78020_k();
int j = 28 * i;
int k = 0;
@@ -768,6 +852,8 @@
@@ -774,6 +860,8 @@
}
GlStateManager.func_179140_f();
@@ -238,7 +248,7 @@
this.func_73729_b(l, i1, j, k, 28, 32);
this.field_73735_i = 100.0F;
this.field_146296_j.field_77023_b = 100.0F;
@@ -794,6 +880,15 @@
@@ -800,6 +888,15 @@
{
this.field_146297_k.func_147108_a(new GuiStats(this, this.field_146297_k.field_71439_g.func_146107_m()));
}
@@ -1,6 +1,6 @@
--- ../src-base/minecraft/net/minecraft/client/multiplayer/ChunkProviderClient.java
+++ ../src-work/minecraft/net/minecraft/client/multiplayer/ChunkProviderClient.java
@@ -59,6 +59,7 @@
@@ -60,6 +60,7 @@
{
Chunk chunk = new Chunk(this.field_73235_d, p_73158_1_, p_73158_2_);
this.field_73236_b.put(ChunkPos.func_77272_a(p_73158_1_, p_73158_2_), chunk);
@@ -4,8 +4,8 @@
inetaddress = InetAddress.getByName(p_146367_1_);
GuiConnecting.this.field_146371_g = NetworkManager.func_181124_a(inetaddress, p_146367_2_, GuiConnecting.this.field_146297_k.field_71474_y.func_181148_f());
GuiConnecting.this.field_146371_g.func_150719_a(new NetHandlerLoginClient(GuiConnecting.this.field_146371_g, GuiConnecting.this.field_146297_k, GuiConnecting.this.field_146374_i));
- GuiConnecting.this.field_146371_g.func_179290_a(new C00Handshake(210, p_146367_1_, p_146367_2_, EnumConnectionState.LOGIN));
+ GuiConnecting.this.field_146371_g.func_179290_a(new C00Handshake(210, p_146367_1_, p_146367_2_, EnumConnectionState.LOGIN, true));
- GuiConnecting.this.field_146371_g.func_179290_a(new C00Handshake(314, p_146367_1_, p_146367_2_, EnumConnectionState.LOGIN));
+ GuiConnecting.this.field_146371_g.func_179290_a(new C00Handshake(314, p_146367_1_, p_146367_2_, EnumConnectionState.LOGIN, true));
GuiConnecting.this.field_146371_g.func_179290_a(new CPacketLoginStart(GuiConnecting.this.field_146297_k.func_110432_I().func_148256_e()));
}
catch (UnknownHostException unknownhostexception)
@@ -1,19 +1,19 @@
--- ../src-base/minecraft/net/minecraft/client/multiplayer/PlayerControllerMP.java
+++ ../src-work/minecraft/net/minecraft/client/multiplayer/PlayerControllerMP.java
@@ -123,6 +123,12 @@
@@ -122,6 +122,12 @@
}
}
+ ItemStack stack = field_78776_a.field_71439_g.func_184614_ca();
+ if (stack != null && stack.func_77973_b() != null && stack.func_77973_b().onBlockStartBreak(stack, p_187103_1_, field_78776_a.field_71439_g))
+ if (!stack.func_190926_b() && stack.func_77973_b().onBlockStartBreak(stack, p_187103_1_, field_78776_a.field_71439_g))
+ {
+ return false;
+ }
+
if (this.field_78779_k.func_77145_d() && this.field_78776_a.field_71439_g.func_184614_ca() != null && this.field_78776_a.field_71439_g.func_184614_ca().func_77973_b() instanceof ItemSword)
if (this.field_78779_k.func_77145_d() && !this.field_78776_a.field_71439_g.func_184614_ca().func_190926_b() && this.field_78776_a.field_71439_g.func_184614_ca().func_77973_b() instanceof ItemSword)
{
return false;
@@ -144,14 +150,7 @@
@@ -143,19 +149,13 @@
else
{
world.func_175718_b(2001, p_187103_1_, Block.func_176210_f(iblockstate));
@@ -28,15 +28,18 @@
this.field_178895_c = new BlockPos(this.field_178895_c.func_177958_n(), -1, this.field_178895_c.func_177952_p());
if (!this.field_78779_k.func_77145_d())
@@ -162,13 +161,20 @@
{
itemstack1.func_179548_a(world, iblockstate, p_187103_1_, this.field_78776_a.field_71439_g);
{
ItemStack itemstack1 = this.field_78776_a.field_71439_g.func_184614_ca();
+ ItemStack copyBeforeUse = itemstack1.func_77946_l();
- if (itemstack1.field_77994_a == 0)
+ if (itemstack1.field_77994_a <= 0)
if (!itemstack1.func_190926_b())
{
@@ -163,11 +163,18 @@
if (itemstack1.func_190926_b())
{
+ net.minecraftforge.event.ForgeEventFactory.onPlayerDestroyItem(this.field_78776_a.field_71439_g, itemstack1, EnumHand.MAIN_HAND);
this.field_78776_a.field_71439_g.func_184611_a(EnumHand.MAIN_HAND, (ItemStack)null);
+ net.minecraftforge.event.ForgeEventFactory.onPlayerDestroyItem(this.field_78776_a.field_71439_g, copyBeforeUse, EnumHand.MAIN_HAND);
this.field_78776_a.field_71439_g.func_184611_a(EnumHand.MAIN_HAND, ItemStack.field_190927_a);
}
}
}
@@ -50,7 +53,7 @@
return flag;
}
}
@@ -208,6 +214,7 @@
@@ -207,6 +214,7 @@
if (this.field_78779_k.func_77145_d())
{
this.field_78774_b.func_147297_a(new CPacketPlayerDigging(CPacketPlayerDigging.Action.START_DESTROY_BLOCK, p_180511_1_, p_180511_2_));
@@ -58,7 +61,7 @@
func_178891_a(this.field_78776_a, this, p_180511_1_, p_180511_2_);
this.field_78781_i = 5;
}
@@ -219,14 +226,17 @@
@@ -218,14 +226,17 @@
}
this.field_78774_b.func_147297_a(new CPacketPlayerDigging(CPacketPlayerDigging.Action.START_DESTROY_BLOCK, p_180511_1_, p_180511_2_));
@@ -77,96 +80,113 @@
if (flag && iblockstate.func_185903_a(this.field_78776_a.field_71439_g, this.field_78776_a.field_71439_g.field_70170_p, p_180511_1_) >= 1.0F)
{
this.func_187103_a(p_180511_1_);
@@ -373,13 +383,32 @@
@@ -289,7 +300,7 @@
if (this.field_78780_h % 4.0F == 0.0F)
{
- SoundType soundtype = block.func_185467_w();
+ SoundType soundtype = block.getSoundType(iblockstate, field_78776_a.field_71441_e, p_180512_1_, field_78776_a.field_71439_g);
this.field_78776_a.func_147118_V().func_147682_a(new PositionedSoundRecord(soundtype.func_185846_f(), SoundCategory.NEUTRAL, (soundtype.func_185843_a() + 1.0F) / 8.0F, soundtype.func_185847_b() * 0.5F, p_180512_1_));
}
@@ -341,7 +352,7 @@
if (!this.field_85183_f.func_190926_b() && !itemstack.func_190926_b())
{
- flag = itemstack.func_77973_b() == this.field_85183_f.func_77973_b() && ItemStack.func_77970_a(itemstack, this.field_85183_f) && (itemstack.func_77984_f() || itemstack.func_77960_j() == this.field_85183_f.func_77960_j());
+ flag = !net.minecraftforge.client.ForgeHooksClient.shouldCauseBlockBreakReset(this.field_85183_f, itemstack);
}
return p_178893_1_.equals(this.field_178895_c) && flag;
@@ -373,13 +384,31 @@
}
else
{
+ net.minecraftforge.event.entity.player.PlayerInteractEvent.RightClickBlock event = net.minecraftforge.common.ForgeHooks
+ .onRightClickBlock(p_187099_1_, p_187099_7_, p_187099_3_, p_187099_4_, p_187099_5_, net.minecraftforge.common.ForgeHooks.rayTraceEyeHitVec(p_187099_1_, func_78757_d() + 1));
+ .onRightClickBlock(p_187099_1_, p_187099_6_, p_187099_3_, p_187099_4_, net.minecraftforge.common.ForgeHooks.rayTraceEyeHitVec(p_187099_1_, func_78757_d() + 1));
+ if (event.isCanceled())
+ {
+ // Give the server a chance to fire event as well. That way server event is not dependant on client event.
+ this.field_78774_b.func_147297_a(new CPacketPlayerTryUseItemOnBlock(p_187099_4_, p_187099_5_, p_187099_7_, f, f1, f2));
+ this.field_78774_b.func_147297_a(new CPacketPlayerTryUseItemOnBlock(p_187099_3_, p_187099_4_, p_187099_6_, f, f1, f2));
+ return EnumActionResult.PASS;
+ }
+ EnumActionResult result = EnumActionResult.PASS;
+
if (this.field_78779_k != GameType.SPECTATOR)
{
+ net.minecraft.item.Item item = p_187099_3_ == null ? null : p_187099_3_.func_77973_b();
+ EnumActionResult ret = item == null ? EnumActionResult.PASS : item.onItemUseFirst(p_187099_3_, p_187099_1_, p_187099_2_, p_187099_4_, p_187099_5_, f, f1, f2, p_187099_7_);
+ EnumActionResult ret = itemstack.onItemUseFirst(p_187099_1_, p_187099_2_, p_187099_3_, p_187099_6_, p_187099_4_, f, f1, f2);
+ if (ret != EnumActionResult.PASS) return ret;
+
IBlockState iblockstate = p_187099_2_.func_180495_p(p_187099_4_);
IBlockState iblockstate = p_187099_2_.func_180495_p(p_187099_3_);
+ boolean bypass = true;
+ for (ItemStack s : new ItemStack[]{p_187099_1_.func_184614_ca(), p_187099_1_.func_184592_cb()}) //TODO: Expand to more hands? player.inv.getHands()?
+ bypass = bypass && (s == null || s.func_77973_b().doesSneakBypassUse(s, p_187099_2_, p_187099_4_, p_187099_1_));
+ bypass = bypass && (s == null || s.func_77973_b().doesSneakBypassUse(s, p_187099_2_, p_187099_3_, p_187099_1_));
- if ((!p_187099_1_.func_70093_af() || p_187099_1_.func_184614_ca() == null && p_187099_1_.func_184592_cb() == null) && iblockstate.func_177230_c().func_180639_a(p_187099_2_, p_187099_4_, iblockstate, p_187099_1_, p_187099_7_, p_187099_3_, p_187099_5_, f, f1, f2))
+ if (!p_187099_1_.func_70093_af() || bypass || event.getUseBlock() == net.minecraftforge.fml.common.eventhandler.Event.Result.ALLOW)
- if ((!p_187099_1_.func_70093_af() || p_187099_1_.func_184614_ca().func_190926_b() && p_187099_1_.func_184592_cb().func_190926_b()) && iblockstate.func_177230_c().func_180639_a(p_187099_2_, p_187099_3_, iblockstate, p_187099_1_, p_187099_6_, p_187099_4_, f, f1, f2))
+ if ((!p_187099_1_.func_70093_af() || bypass || event.getUseBlock() == net.minecraftforge.fml.common.eventhandler.Event.Result.ALLOW))
{
- flag = true;
+ if(event.getUseBlock() != net.minecraftforge.fml.common.eventhandler.Event.Result.DENY)
+ flag = iblockstate.func_177230_c().func_180639_a(p_187099_2_, p_187099_4_, iblockstate, p_187099_1_, p_187099_7_, p_187099_3_, p_187099_5_, f, f1, f2);
+ if(flag) result = EnumActionResult.SUCCESS;
+ if (event.getUseBlock() != net.minecraftforge.fml.common.eventhandler.Event.Result.DENY)
+ flag = p_187099_1_.func_184614_ca().func_190926_b() && p_187099_1_.func_184592_cb().func_190926_b() && iblockstate.func_177230_c().func_180639_a(p_187099_2_, p_187099_3_, iblockstate, p_187099_1_, p_187099_6_, p_187099_4_, f, f1, f2);
+ if (flag) result = EnumActionResult.SUCCESS;
}
if (!flag && p_187099_3_ != null && p_187099_3_.func_77973_b() instanceof ItemBlock)
if (!flag && itemstack.func_77973_b() instanceof ItemBlock)
@@ -395,7 +424,7 @@
this.field_78774_b.func_147297_a(new CPacketPlayerTryUseItemOnBlock(p_187099_4_, p_187099_5_, p_187099_7_, f, f1, f2));
this.field_78774_b.func_147297_a(new CPacketPlayerTryUseItemOnBlock(p_187099_3_, p_187099_4_, p_187099_6_, f, f1, f2));
- if (!flag && this.field_78779_k != GameType.SPECTATOR)
+ if (!flag && this.field_78779_k != GameType.SPECTATOR || event.getUseItem() == net.minecraftforge.fml.common.eventhandler.Event.Result.ALLOW)
{
if (p_187099_3_ == null)
if (itemstack.func_190926_b())
{
@@ -421,14 +450,19 @@
@@ -421,14 +450,20 @@
{
int i = p_187099_3_.func_77960_j();
int j = p_187099_3_.field_77994_a;
int i = itemstack.func_77960_j();
int j = itemstack.func_190916_E();
+ if (event.getUseItem() != net.minecraftforge.fml.common.eventhandler.Event.Result.DENY) {
EnumActionResult enumactionresult = p_187099_3_.func_179546_a(p_187099_1_, p_187099_2_, p_187099_4_, p_187099_7_, p_187099_5_, f, f1, f2);
p_187099_3_.func_77964_b(i);
p_187099_3_.field_77994_a = j;
EnumActionResult enumactionresult = itemstack.func_179546_a(p_187099_1_, p_187099_2_, p_187099_3_, p_187099_6_, p_187099_4_, f, f1, f2);
itemstack.func_77964_b(i);
itemstack.func_190920_e(j);
return enumactionresult;
+ } else return result;
}
else
{
- return p_187099_3_.func_179546_a(p_187099_1_, p_187099_2_, p_187099_4_, p_187099_7_, p_187099_5_, f, f1, f2);
- return itemstack.func_179546_a(p_187099_1_, p_187099_2_, p_187099_3_, p_187099_6_, p_187099_4_, f, f1, f2);
+ ItemStack copyForUse = itemstack.func_77946_l();
+ if (event.getUseItem() != net.minecraftforge.fml.common.eventhandler.Event.Result.DENY)
+ result = p_187099_3_.func_179546_a(p_187099_1_, p_187099_2_, p_187099_4_, p_187099_7_, p_187099_5_, f, f1, f2);
+ if (p_187099_3_.field_77994_a <= 0) net.minecraftforge.event.ForgeEventFactory.onPlayerDestroyItem(p_187099_1_, p_187099_3_, p_187099_7_);
+ result = itemstack.func_179546_a(p_187099_1_, p_187099_2_, p_187099_3_, p_187099_6_, p_187099_4_, f, f1, f2);
+ if (itemstack.func_190926_b()) net.minecraftforge.event.ForgeEventFactory.onPlayerDestroyItem(p_187099_1_, copyForUse, p_187099_6_);
+ return result;
}
}
}
@@ -456,6 +490,7 @@
@@ -457,6 +492,7 @@
}
else
{
+ if (net.minecraftforge.common.ForgeHooks.onItemRightClick(p_187101_1_, p_187101_4_, p_187101_3_)) return net.minecraft.util.EnumActionResult.PASS;
int i = p_187101_3_.field_77994_a;
ActionResult<ItemStack> actionresult = p_187101_3_.func_77957_a(p_187101_2_, p_187101_1_, p_187101_4_);
ItemStack itemstack = (ItemStack)actionresult.func_188398_b();
@@ -464,9 +499,10 @@
+ if (net.minecraftforge.common.ForgeHooks.onItemRightClick(p_187101_1_, p_187101_3_)) return net.minecraft.util.EnumActionResult.PASS;
int i = itemstack.func_190916_E();
ActionResult<ItemStack> actionresult = itemstack.func_77957_a(p_187101_2_, p_187101_1_, p_187101_3_);
ItemStack itemstack1 = (ItemStack)actionresult.func_188398_b();
@@ -464,6 +500,10 @@
if (itemstack1 != itemstack || itemstack1.func_190916_E() != i)
{
p_187101_1_.func_184611_a(p_187101_4_, itemstack);
- if (itemstack.field_77994_a == 0)
+ if (itemstack.field_77994_a <= 0)
{
p_187101_1_.func_184611_a(p_187101_4_, (ItemStack)null);
+ net.minecraftforge.event.ForgeEventFactory.onPlayerDestroyItem(p_187101_1_, itemstack, p_187101_4_);
}
p_187101_1_.func_184611_a(p_187101_3_, itemstack1);
+ if (itemstack1.func_190926_b())
+ {
+ net.minecraftforge.event.ForgeEventFactory.onPlayerDestroyItem(p_187101_1_, itemstack, p_187101_3_);
+ }
}
@@ -504,6 +540,7 @@
return actionresult.func_188397_a();
@@ -500,6 +540,7 @@
this.func_78750_j();
Vec3d vec3d = new Vec3d(p_187102_3_.field_72307_f.field_72450_a - p_187102_2_.field_70165_t, p_187102_3_.field_72307_f.field_72448_b - p_187102_2_.field_70163_u, p_187102_3_.field_72307_f.field_72449_c - p_187102_2_.field_70161_v);
this.field_78774_b.func_147297_a(new CPacketUseEntity(p_187102_2_, p_187102_5_, vec3d));
+ if(net.minecraftforge.common.ForgeHooks.onInteractEntityAt(p_187102_1_, p_187102_2_, p_187102_3_, p_187102_1_.func_184586_b(p_187102_5_), p_187102_5_)) return EnumActionResult.PASS;
return this.field_78779_k == GameType.SPECTATOR ? EnumActionResult.PASS : p_187102_2_.func_184199_a(p_187102_1_, vec3d, p_187102_4_, p_187102_5_);
Vec3d vec3d = new Vec3d(p_184120_3_.field_72307_f.field_72450_a - p_184120_2_.field_70165_t, p_184120_3_.field_72307_f.field_72448_b - p_184120_2_.field_70163_u, p_184120_3_.field_72307_f.field_72449_c - p_184120_2_.field_70161_v);
this.field_78774_b.func_147297_a(new CPacketUseEntity(p_184120_2_, p_184120_4_, vec3d));
+ if(net.minecraftforge.common.ForgeHooks.onInteractEntityAt(p_184120_1_, p_184120_2_, p_184120_3_, p_184120_4_)) return EnumActionResult.PASS;
return this.field_78779_k == GameType.SPECTATOR ? EnumActionResult.PASS : p_184120_2_.func_184199_a(p_184120_1_, vec3d, p_184120_4_);
}
@@ -1,6 +1,6 @@
--- ../src-base/minecraft/net/minecraft/client/multiplayer/WorldClient.java
+++ ../src-work/minecraft/net/minecraft/client/multiplayer/WorldClient.java
@@ -60,17 +60,18 @@
@@ -60,17 +60,19 @@
public WorldClient(NetHandlerPlayClient p_i45063_1_, WorldSettings p_i45063_2_, int p_i45063_3_, EnumDifficulty p_i45063_4_, Profiler p_i45063_5_)
{
@@ -17,6 +17,7 @@
this.field_72988_C = new SaveDataMemoryStorage();
this.func_72966_v();
this.func_72947_a();
+ this.initCapabilities();
+ net.minecraftforge.common.MinecraftForge.EVENT_BUS.post(new net.minecraftforge.event.world.WorldEvent.Load(this));
}
@@ -1,6 +1,6 @@
--- ../src-base/minecraft/net/minecraft/client/network/NetHandlerLoginClient.java
+++ ../src-work/minecraft/net/minecraft/client/network/NetHandlerLoginClient.java
@@ -106,7 +106,10 @@
@@ -108,7 +108,10 @@
{
this.field_175091_e = p_147390_1_.func_179730_a();
this.field_147393_d.func_150723_a(EnumConnectionState.PLAY);
@@ -1,6 +1,6 @@
--- ../src-base/minecraft/net/minecraft/client/network/NetHandlerPlayClient.java
+++ ../src-work/minecraft/net/minecraft/client/network/NetHandlerPlayClient.java
@@ -271,7 +271,7 @@
@@ -280,7 +280,7 @@
{
PacketThreadUtil.func_180031_a(p_147282_1_, this, this.field_147299_f);
this.field_147299_f.field_71442_b = new PlayerControllerMP(this.field_147299_f, this);
@@ -9,7 +9,7 @@
this.field_147299_f.field_71474_y.field_74318_M = p_147282_1_.func_149192_g();
this.field_147299_f.func_71403_a(this.field_147300_g);
this.field_147299_f.field_71439_g.field_71093_bK = p_147282_1_.func_149194_f();
@@ -725,7 +725,7 @@
@@ -742,7 +742,7 @@
if (tileentity != null)
{
@@ -18,7 +18,7 @@
}
}
}
@@ -803,14 +803,16 @@
@@ -819,14 +819,16 @@
public void func_147251_a(SPacketChat p_147251_1_)
{
PacketThreadUtil.func_180031_a(p_147251_1_, this, this.field_147299_f);
@@ -37,19 +37,7 @@
}
}
@@ -866,6 +868,11 @@
float f = (float)(p_147281_1_.func_149028_l() * 360) / 256.0F;
float f1 = (float)(p_147281_1_.func_149030_m() * 360) / 256.0F;
EntityLivingBase entitylivingbase = (EntityLivingBase)EntityList.func_75616_a(p_147281_1_.func_149025_e(), this.field_147299_f.field_71441_e);
+ if (entitylivingbase == null)
+ {
+ net.minecraftforge.fml.common.FMLLog.info("Server attempted to spawn an unknown entity using ID: {0} at ({1}, {2}, {3}) Skipping!", p_147281_1_.func_149025_e(), d0, d1, d2);
+ return;
+ }
EntityTracker.func_187254_a(entitylivingbase, d0, d1, d2);
entitylivingbase.field_70761_aq = (float)(p_147281_1_.func_149032_n() * 360) / 256.0F;
entitylivingbase.field_70759_as = (float)(p_147281_1_.func_149032_n() * 360) / 256.0F;
@@ -938,7 +945,7 @@
@@ -958,7 +960,7 @@
if (entity1 == this.field_147299_f.field_71439_g && !flag)
{
@@ -58,7 +46,7 @@
}
}
}
@@ -1169,6 +1176,10 @@
@@ -1205,6 +1207,10 @@
{
tileentity.func_145839_a(p_147273_1_.func_148857_g());
}
@@ -69,7 +57,7 @@
if (flag && this.field_147299_f.field_71462_r instanceof GuiCommandBlock)
{
@@ -1266,15 +1277,15 @@
@@ -1302,15 +1308,15 @@
}
else if (f == 101.0F)
{
@@ -88,7 +76,7 @@
}
}
else if (i == 6)
@@ -1368,7 +1379,7 @@
@@ -1424,7 +1430,7 @@
if (entity instanceof EntityLivingBase)
{
@@ -12,8 +12,8 @@
try
{
- networkmanager.func_179290_a(new C00Handshake(210, serveraddress.func_78861_a(), serveraddress.func_78864_b(), EnumConnectionState.STATUS));
+ networkmanager.func_179290_a(new C00Handshake(210, serveraddress.func_78861_a(), serveraddress.func_78864_b(), EnumConnectionState.STATUS, true));
- networkmanager.func_179290_a(new C00Handshake(314, serveraddress.func_78861_a(), serveraddress.func_78864_b(), EnumConnectionState.STATUS));
+ networkmanager.func_179290_a(new C00Handshake(314, serveraddress.func_78861_a(), serveraddress.func_78864_b(), EnumConnectionState.STATUS, true));
networkmanager.func_179290_a(new CPacketServerQuery());
}
catch (Throwable throwable)
@@ -1,6 +1,6 @@
--- ../src-base/minecraft/net/minecraft/client/particle/ParticleManager.java
+++ ../src-work/minecraft/net/minecraft/client/particle/ParticleManager.java
@@ -146,6 +146,7 @@
@@ -153,6 +153,7 @@
public void func_78873_a(Particle p_78873_1_)
{
@@ -8,7 +8,7 @@
this.field_187241_h.add(p_78873_1_);
}
@@ -380,7 +381,7 @@
@@ -387,7 +388,7 @@
public void func_180533_a(BlockPos p_180533_1_, IBlockState p_180533_2_)
{
@@ -17,7 +17,7 @@
{
p_180533_2_ = p_180533_2_.func_185899_b(this.field_78878_a, p_180533_1_);
int i = 4;
@@ -464,4 +465,13 @@
@@ -471,4 +472,13 @@
return "" + i;
}
@@ -1,6 +1,6 @@
--- ../src-base/minecraft/net/minecraft/client/renderer/BlockModelRenderer.java
+++ ../src-work/minecraft/net/minecraft/client/renderer/BlockModelRenderer.java
@@ -141,7 +141,14 @@
@@ -128,7 +128,14 @@
p_187492_8_.func_187491_a(p_187492_1_, p_187492_2_, p_187492_3_, bakedquad.func_178210_d(), p_187492_6_, p_187492_7_);
p_187492_4_.func_178981_a(bakedquad.func_178209_a());
p_187492_4_.func_178962_a(p_187492_8_.field_178207_c[0], p_187492_8_.field_178207_c[1], p_187492_8_.field_178207_c[2], p_187492_8_.field_178207_c[3]);
@@ -16,10 +16,10 @@
if (bakedquad.func_178212_b())
{
int k = this.field_187499_a.func_186724_a(p_187492_2_, p_187492_1_, p_187492_3_, bakedquad.func_178211_c());
@@ -291,11 +298,26 @@
float f = (float)(j1 >> 16 & 255) / 255.0F;
float f1 = (float)(j1 >> 8 & 255) / 255.0F;
float f2 = (float)(j1 & 255) / 255.0F;
@@ -262,11 +269,26 @@
float f = (float)(k >> 16 & 255) / 255.0F;
float f1 = (float)(k >> 8 & 255) / 255.0F;
float f2 = (float)(k & 255) / 255.0F;
+ if(bakedquad.shouldApplyDiffuseLighting())
+ {
+ float diffuse = net.minecraftforge.client.model.pipeline.LightUtil.diffuseLight(bakedquad.func_178210_d());
@@ -1,6 +1,6 @@
--- ../src-base/minecraft/net/minecraft/client/renderer/BlockModelShapes.java
+++ ../src-work/minecraft/net/minecraft/client/renderer/BlockModelShapes.java
@@ -307,5 +307,6 @@
@@ -392,5 +392,6 @@
return new ModelResourceLocation(s + "_double_slab", s1);
}
});
@@ -1,6 +1,6 @@
--- ../src-base/minecraft/net/minecraft/client/renderer/BlockRendererDispatcher.java
+++ ../src-work/minecraft/net/minecraft/client/renderer/BlockRendererDispatcher.java
@@ -29,7 +29,7 @@
@@ -28,7 +28,7 @@
public BlockRendererDispatcher(BlockModelShapes p_i46577_1_, BlockColors p_i46577_2_)
{
this.field_175028_a = p_i46577_1_;
@@ -9,7 +9,7 @@
this.field_175025_e = new BlockFluidRenderer(p_i46577_2_);
}
@@ -44,7 +44,7 @@
@@ -43,7 +43,7 @@
{
p_175020_1_ = p_175020_1_.func_185899_b(p_175020_4_, p_175020_2_);
IBakedModel ibakedmodel = this.field_175028_a.func_178125_b(p_175020_1_);
@@ -18,7 +18,7 @@
this.field_175027_c.func_178267_a(p_175020_4_, ibakedmodel1, p_175020_1_, p_175020_2_, Tessellator.func_178181_a().func_178180_c(), true);
}
}
@@ -76,7 +76,9 @@
@@ -75,7 +75,9 @@
switch (enumblockrendertype)
{
case MODEL:
@@ -1,6 +1,6 @@
--- ../src-base/minecraft/net/minecraft/client/renderer/EntityRenderer.java
+++ ../src-work/minecraft/net/minecraft/client/renderer/EntityRenderer.java
@@ -207,6 +207,7 @@
@@ -212,6 +212,7 @@
{
this.func_175069_a(new ResourceLocation("shaders/post/invert.json"));
}
@@ -8,7 +8,7 @@
}
}
@@ -398,7 +399,7 @@
@@ -413,7 +414,7 @@
if (d3 < d2 || d2 == 0.0D)
{
@@ -17,7 +17,7 @@
{
if (d2 == 0.0D)
{
@@ -491,7 +492,7 @@
@@ -506,7 +507,7 @@
f = f * 60.0F / 70.0F;
}
@@ -26,7 +26,7 @@
}
}
@@ -555,14 +556,8 @@
@@ -570,14 +571,8 @@
{
BlockPos blockpos = new BlockPos(entity);
IBlockState iblockstate = this.field_78531_r.field_71441_e.func_180495_p(blockpos);
@@ -42,7 +42,7 @@
GlStateManager.func_179114_b(entity.field_70126_B + (entity.field_70177_z - entity.field_70126_B) * p_78467_1_ + 180.0F, 0.0F, -1.0F, 0.0F);
GlStateManager.func_179114_b(entity.field_70127_C + (entity.field_70125_A - entity.field_70127_C) * p_78467_1_, -1.0F, 0.0F, 0.0F);
}
@@ -629,17 +624,20 @@
@@ -644,17 +639,20 @@
if (!this.field_78531_r.field_71474_y.field_74325_U)
{
@@ -70,7 +70,7 @@
}
GlStateManager.func_179109_b(0.0F, -f, 0.0F);
@@ -757,6 +755,7 @@
@@ -772,6 +770,7 @@
boolean flag = this.field_78531_r.func_175606_aa() instanceof EntityLivingBase && ((EntityLivingBase)this.field_78531_r.func_175606_aa()).func_70608_bn();
@@ -78,7 +78,7 @@
if (this.field_78531_r.field_71474_y.field_74320_O == 0 && !flag && !this.field_78531_r.field_71474_y.field_74319_N && !this.field_78531_r.field_71442_b.func_78747_a())
{
this.func_180436_i();
@@ -1092,7 +1091,7 @@
@@ -1109,7 +1108,7 @@
try
{
@@ -87,7 +87,7 @@
}
catch (Throwable throwable)
{
@@ -1187,7 +1186,7 @@
@@ -1204,7 +1203,7 @@
if (this.field_78531_r.field_71442_b.func_178889_l() == GameType.SPECTATOR)
{
@@ -96,7 +96,7 @@
}
else
{
@@ -1312,7 +1311,9 @@
@@ -1329,7 +1328,9 @@
GlStateManager.func_179094_E();
RenderHelper.func_74519_b();
this.field_78531_r.field_71424_I.func_76318_c("entities");
@@ -106,7 +106,7 @@
RenderHelper.func_74518_a();
this.func_175072_h();
}
@@ -1325,6 +1326,7 @@
@@ -1342,6 +1343,7 @@
EntityPlayer entityplayer = (EntityPlayer)entity;
GlStateManager.func_179118_c();
this.field_78531_r.field_71424_I.func_76318_c("outline");
@@ -114,7 +114,7 @@
renderglobal.func_72731_b(entityplayer, this.field_78531_r.field_71476_x, 0, p_175068_2_);
GlStateManager.func_179141_d();
}
@@ -1371,6 +1373,17 @@
@@ -1388,6 +1390,17 @@
GlStateManager.func_179103_j(7425);
this.field_78531_r.field_71424_I.func_76318_c("translucent");
renderglobal.func_174977_a(BlockRenderLayer.TRANSLUCENT, (double)p_175068_2_, p_175068_1_, entity);
@@ -132,7 +132,7 @@
GlStateManager.func_179103_j(7424);
GlStateManager.func_179132_a(true);
GlStateManager.func_179089_o();
@@ -1383,6 +1396,9 @@
@@ -1400,6 +1413,9 @@
this.func_180437_a(renderglobal, p_175068_2_, p_175068_1_);
}
@@ -142,7 +142,7 @@
this.field_78531_r.field_71424_I.func_76318_c("hand");
if (this.field_175074_C)
@@ -1498,6 +1514,13 @@
@@ -1515,6 +1531,13 @@
protected void func_78474_d(float p_78474_1_)
{
@@ -156,7 +156,7 @@
float f = this.field_78531_r.field_71441_e.func_72867_j(p_78474_1_);
if (f > 0.0F)
@@ -1828,6 +1851,13 @@
@@ -1845,6 +1868,13 @@
this.field_175081_S = f7;
}
@@ -170,7 +170,7 @@
GlStateManager.func_179082_a(this.field_175080_Q, this.field_175082_R, this.field_175081_S, 0.0F);
}
@@ -1838,7 +1868,9 @@
@@ -1855,7 +1885,9 @@
GlStateManager.func_187432_a(0.0F, -1.0F, 0.0F);
GlStateManager.func_179131_c(1.0F, 1.0F, 1.0F, 1.0F);
IBlockState iblockstate = ActiveRenderInfo.func_186703_a(this.field_78531_r.field_71441_e, entity, p_78468_2_);
@@ -181,7 +181,7 @@
if (entity instanceof EntityLivingBase && ((EntityLivingBase)entity).func_70644_a(MobEffects.field_76440_q))
{
float f1 = 5.0F;
@@ -1923,6 +1955,7 @@
@@ -1940,6 +1972,7 @@
GlStateManager.func_179102_b(f * 0.05F);
GlStateManager.func_179153_c(Math.min(f, 192.0F) * 0.5F);
}
@@ -1,6 +1,6 @@
--- ../src-base/minecraft/net/minecraft/client/renderer/ItemRenderer.java
+++ ../src-work/minecraft/net/minecraft/client/renderer/ItemRenderer.java
@@ -317,7 +317,7 @@
@@ -311,7 +311,7 @@
{
ItemStack itemstack = abstractclientplayer.func_184607_cu();
@@ -9,16 +9,32 @@
{
EnumHand enumhand1 = abstractclientplayer.func_184600_cs();
flag = enumhand1 == EnumHand.MAIN_HAND;
@@ -361,7 +361,7 @@
@@ -328,6 +328,7 @@
{
float f3 = enumhand == EnumHand.MAIN_HAND ? f : 0.0F;
float f5 = 1.0F - (this.field_187470_g + (this.field_187469_f - this.field_187470_g) * p_78440_1_);
+ if(!net.minecraftforge.client.ForgeHooksClient.renderSpecificFirstPersonHand(EnumHand.MAIN_HAND, p_78440_1_, f1, f3, f5, this.field_187467_d))
this.func_187457_a(abstractclientplayer, p_78440_1_, f1, EnumHand.MAIN_HAND, f3, this.field_187467_d, f5);
}
@@ -335,6 +336,7 @@
{
float f4 = enumhand == EnumHand.OFF_HAND ? f : 0.0F;
float f6 = 1.0F - (this.field_187472_i + (this.field_187471_h - this.field_187472_i) * p_78440_1_);
+ if(!net.minecraftforge.client.ForgeHooksClient.renderSpecificFirstPersonHand(EnumHand.OFF_HAND, p_78440_1_, f1, f4, f6, this.field_187468_e))
this.func_187457_a(abstractclientplayer, p_78440_1_, f1, EnumHand.OFF_HAND, f4, this.field_187468_e, f6);
}
@@ -355,7 +357,7 @@
this.func_187456_a(p_187457_7_, p_187457_5_, enumhandside);
}
}
- else if (p_187457_6_.func_77973_b() == Items.field_151098_aY)
+ else if (p_187457_6_.func_77973_b() instanceof net.minecraft.item.ItemMap)
{
if (flag && this.field_187468_e == null)
if (flag && this.field_187468_e.func_190926_b())
{
@@ -445,6 +445,7 @@
@@ -439,6 +441,7 @@
if (this.field_78455_a.field_71439_g.func_70094_T())
{
IBlockState iblockstate = this.field_78455_a.field_71441_e.func_180495_p(new BlockPos(this.field_78455_a.field_71439_g));
@@ -26,8 +42,8 @@
EntityPlayer entityplayer = this.field_78455_a.field_71439_g;
for (int i = 0; i < 8; ++i)
@@ -458,11 +459,13 @@
if (iblockstate1.func_177230_c().func_176214_u())
@@ -452,11 +455,13 @@
if (iblockstate1.func_191058_s())
{
iblockstate = iblockstate1;
+ overlayPos = blockpos;
@@ -40,7 +56,7 @@
this.func_178108_a(p_78447_1_, this.field_78455_a.func_175602_ab().func_175023_a().func_178122_a(iblockstate));
}
}
@@ -471,11 +474,13 @@
@@ -465,11 +470,13 @@
{
if (this.field_78455_a.field_71439_g.func_70055_a(Material.field_151586_h))
{
@@ -54,7 +70,7 @@
this.func_78442_d(p_78447_1_);
}
}
@@ -597,8 +602,8 @@
@@ -591,8 +598,8 @@
else
{
float f = entityplayersp.func_184825_o(1.0F);
@@ -1,6 +1,6 @@
--- ../src-base/minecraft/net/minecraft/client/renderer/OpenGlHelper.java
+++ ../src-work/minecraft/net/minecraft/client/renderer/OpenGlHelper.java
@@ -92,6 +92,10 @@
@@ -93,6 +93,10 @@
public static int field_176089_P;
public static int field_148826_e;
@@ -11,7 +11,7 @@
public static void func_77474_a()
{
ContextCapabilities contextcapabilities = GLContext.getCapabilities();
@@ -852,6 +856,12 @@
@@ -853,6 +857,12 @@
{
GL13.glMultiTexCoord2f(p_77475_0_, p_77475_1_, p_77475_2_);
}
@@ -1,6 +1,6 @@
--- ../src-base/minecraft/net/minecraft/client/renderer/RenderGlobal.java
+++ ../src-work/minecraft/net/minecraft/client/renderer/RenderGlobal.java
@@ -548,8 +548,10 @@
@@ -551,8 +551,10 @@
public void func_180446_a(Entity p_180446_1_, ICamera p_180446_2_, float p_180446_3_)
{
@@ -11,7 +11,7 @@
--this.field_72740_G;
}
else
@@ -560,9 +562,12 @@
@@ -563,9 +565,12 @@
this.field_72769_h.field_72984_F.func_76320_a("prepare");
TileEntityRendererDispatcher.field_147556_a.func_190056_a(this.field_72769_h, this.field_72777_q.func_110434_K(), this.field_72777_q.field_71466_p, this.field_72777_q.func_175606_aa(), this.field_72777_q.field_71476_x, p_180446_3_);
this.field_175010_j.func_180597_a(this.field_72769_h, this.field_72777_q.field_71466_p, this.field_72777_q.func_175606_aa(), this.field_72777_q.field_147125_j, this.field_72777_q.field_71474_y, p_180446_3_);
@@ -24,7 +24,7 @@
Entity entity = this.field_72777_q.func_175606_aa();
double d3 = entity.field_70142_S + (entity.field_70165_t - entity.field_70142_S) * (double)p_180446_3_;
double d4 = entity.field_70137_T + (entity.field_70163_u - entity.field_70137_T) * (double)p_180446_3_;
@@ -574,11 +579,15 @@
@@ -577,11 +582,15 @@
this.field_72777_q.field_71460_t.func_180436_i();
this.field_72769_h.field_72984_F.func_76318_c("global");
List<Entity> list = this.field_72769_h.func_72910_y();
@@ -40,7 +40,7 @@
++this.field_72749_I;
if (entity1.func_145770_h(d0, d1, d2))
@@ -601,6 +610,7 @@
@@ -604,6 +613,7 @@
{
for (Entity entity2 : classinheritancemultimap)
{
@@ -48,7 +48,7 @@
boolean flag = this.field_175010_j.func_178635_a(entity2, p_180446_2_, d0, d1, d2) || entity2.func_184215_y(this.field_72777_q.field_71439_g);
if (flag)
@@ -637,6 +647,7 @@
@@ -640,6 +650,7 @@
}
}
@@ -56,7 +56,7 @@
if (this.func_174985_d() && (!list1.isEmpty() || this.field_184386_ad))
{
this.field_72769_h.field_72984_F.func_76318_c("entityOutlines");
@@ -676,6 +687,7 @@
@@ -679,6 +690,7 @@
this.field_72769_h.field_72984_F.func_76318_c("blockentities");
RenderHelper.func_74519_b();
@@ -64,7 +64,7 @@
for (RenderGlobal.ContainerLocalRenderInformation renderglobal$containerlocalrenderinformation1 : this.field_72755_R)
{
List<TileEntity> list3 = renderglobal$containerlocalrenderinformation1.field_178036_a.func_178571_g().func_178485_b();
@@ -684,6 +696,7 @@
@@ -687,6 +699,7 @@
{
for (TileEntity tileentity2 : list3)
{
@@ -72,7 +72,7 @@
TileEntityRendererDispatcher.field_147556_a.func_180546_a(tileentity2, p_180446_3_, -1);
}
}
@@ -693,9 +706,11 @@
@@ -696,9 +709,11 @@
{
for (TileEntity tileentity : this.field_181024_n)
{
@@ -84,16 +84,7 @@
this.func_180443_s();
@@ -722,7 +737,7 @@
Block block = this.field_72769_h.func_180495_p(blockpos).func_177230_c();
- if (tileentity1 != null && (block instanceof BlockChest || block instanceof BlockEnderChest || block instanceof BlockSign || block instanceof BlockSkull))
+ if (tileentity1 != null && tileentity1.shouldRenderInPass(pass) && tileentity1.canRenderBreaking() && p_180446_2_.func_78546_a(tileentity1.getRenderBoundingBox()))
{
TileEntityRendererDispatcher.field_147556_a.func_180546_a(tileentity1, p_180446_3_, destroyblockprogress.func_73106_e());
}
@@ -1213,6 +1228,13 @@
@@ -1220,6 +1235,13 @@
public void func_174976_a(float p_174976_1_, int p_174976_2_)
{
@@ -107,7 +98,7 @@
if (this.field_72777_q.field_71441_e.field_73011_w.func_186058_p().func_186068_a() == 1)
{
this.func_180448_r();
@@ -1430,6 +1452,12 @@
@@ -1437,6 +1459,12 @@
public void func_180447_b(float p_180447_1_, int p_180447_2_)
{
@@ -120,7 +111,7 @@
if (this.field_72777_q.field_71441_e.field_73011_w.func_76569_d())
{
if (this.field_72777_q.field_71474_y.func_181147_e() == 2)
@@ -1857,8 +1885,11 @@
@@ -1864,8 +1892,11 @@
double d4 = (double)blockpos.func_177956_o() - d1;
double d5 = (double)blockpos.func_177952_p() - d2;
Block block = this.field_72769_h.func_180495_p(blockpos).func_177230_c();
@@ -133,3 +124,12 @@
{
if (d3 * d3 + d4 * d4 + d5 * d5 > 1024.0D)
{
@@ -2333,7 +2364,7 @@
if (block.func_176223_P().func_185904_a() != Material.field_151579_a)
{
- SoundType soundtype = block.func_185467_w();
+ SoundType soundtype = block.getSoundType(Block.func_176220_d(p_180439_4_), field_72769_h, p_180439_3_, null);
this.field_72769_h.func_184156_a(p_180439_3_, soundtype.func_185845_c(), SoundCategory.BLOCKS, (soundtype.func_185843_a() + 1.0F) / 2.0F, soundtype.func_185847_b() * 0.8F, false);
}
@@ -1,6 +1,6 @@
--- ../src-base/minecraft/net/minecraft/client/renderer/RenderItem.java
+++ ../src-work/minecraft/net/minecraft/client/renderer/RenderItem.java
@@ -72,7 +72,7 @@
@@ -71,7 +71,7 @@
public RenderItem(TextureManager p_i46552_1_, ModelManager p_i46552_2_, ItemColors p_i46552_3_)
{
this.field_175057_n = p_i46552_1_;
@@ -9,7 +9,7 @@
this.func_175041_b();
this.field_184395_f = p_i46552_3_;
}
@@ -224,7 +224,7 @@
@@ -223,7 +223,7 @@
k = k | -16777216;
}
@@ -18,7 +18,7 @@
}
}
@@ -246,17 +246,7 @@
@@ -245,17 +245,7 @@
public IBakedModel func_184393_a(ItemStack p_184393_1_, @Nullable World p_184393_2_, @Nullable EntityLivingBase p_184393_3_)
{
IBakedModel ibakedmodel = this.field_175059_m.func_178089_a(p_184393_1_);
@@ -37,7 +37,7 @@
}
public void func_184392_a(ItemStack p_184392_1_, EntityLivingBase p_184392_2_, ItemCameraTransforms.TransformType p_184392_3_, boolean p_184392_4_)
@@ -280,14 +270,9 @@
@@ -279,14 +269,9 @@
GlStateManager.func_179147_l();
GlStateManager.func_187428_a(GlStateManager.SourceFactor.SRC_ALPHA, GlStateManager.DestFactor.ONE_MINUS_SRC_ALPHA, GlStateManager.SourceFactor.ONE, GlStateManager.DestFactor.ZERO);
GlStateManager.func_179094_E();
@@ -54,7 +54,7 @@
this.func_180454_a(p_184394_1_, p_184394_2_);
GlStateManager.func_187407_a(GlStateManager.CullFace.BACK);
GlStateManager.func_179121_F();
@@ -320,7 +305,7 @@
@@ -319,7 +304,7 @@
GlStateManager.func_187401_a(GlStateManager.SourceFactor.SRC_ALPHA, GlStateManager.DestFactor.ONE_MINUS_SRC_ALPHA);
GlStateManager.func_179131_c(1.0F, 1.0F, 1.0F, 1.0F);
this.func_180452_a(p_184390_2_, p_184390_3_, p_184390_4_.func_177556_c());
@@ -63,7 +63,7 @@
this.func_180454_a(p_184390_1_, p_184390_4_);
GlStateManager.func_179118_c();
GlStateManager.func_179101_C();
@@ -425,12 +410,16 @@
@@ -418,9 +403,12 @@
p_180453_1_.func_175063_a(s, (float)(p_180453_3_ + 19 - 2 - p_180453_1_.func_78256_a(s)), (float)(p_180453_4_ + 6 + 3), 16777215);
GlStateManager.func_179145_e();
GlStateManager.func_179126_j();
@@ -75,15 +75,25 @@
- if (p_180453_2_.func_77951_h())
+ if (p_180453_2_.func_77973_b().showDurabilityBar(p_180453_2_))
{
- int j = (int)Math.round(13.0D - (double)p_180453_2_.func_77952_i() * 13.0D / (double)p_180453_2_.func_77958_k());
- int i = (int)Math.round(255.0D - (double)p_180453_2_.func_77952_i() * 255.0D / (double)p_180453_2_.func_77958_k());
+ double health = p_180453_2_.func_77973_b().getDurabilityForDisplay(p_180453_2_);
+ int j = (int)Math.round(13.0D - health * 13.0D);
+ int i = (int)Math.round(255.0D - health * 255.0D);
GlStateManager.func_179140_f();
GlStateManager.func_179097_i();
GlStateManager.func_179090_x();
@@ -1059,6 +1048,7 @@
@@ -429,11 +417,10 @@
GlStateManager.func_179084_k();
Tessellator tessellator = Tessellator.func_178181_a();
VertexBuffer vertexbuffer = tessellator.func_178180_c();
- float f = (float)p_180453_2_.func_77952_i();
- float f1 = (float)p_180453_2_.func_77958_k();
- float f2 = Math.max(0.0F, (f1 - f) / f1);
- int i = Math.round(13.0F - f * 13.0F / f1);
- int j = MathHelper.func_181758_c(f2 / 3.0F, 1.0F, 1.0F);
+ double health = p_180453_2_.func_77973_b().getDurabilityForDisplay(p_180453_2_);
+ int rgbfordisplay = p_180453_2_.func_77973_b().getRGBDurabilityForDisplay(p_180453_2_);
+ int i = Math.round(13.0F - (float)health * 13.0F);
+ int j = rgbfordisplay;
this.func_181565_a(vertexbuffer, p_180453_3_ + 2, p_180453_4_ + 13, 13, 2, 0, 0, 0, 255);
this.func_181565_a(vertexbuffer, p_180453_3_ + 2, p_180453_4_ + 13, i, 1, j >> 16 & 255, j >> 8 & 255, j & 255, 255);
GlStateManager.func_179147_l();
@@ -1073,6 +1060,7 @@
this.func_175029_a(Blocks.field_185779_df, TileEntityStructure.Mode.LOAD.func_185110_a(), "structure_block");
this.func_175029_a(Blocks.field_185779_df, TileEntityStructure.Mode.CORNER.func_185110_a(), "structure_block");
this.func_175029_a(Blocks.field_185779_df, TileEntityStructure.Mode.DATA.func_185110_a(), "structure_block");
@@ -22,16 +22,23 @@
ModelBlockDefinition modelblockdefinition = this.func_177586_a(resourcelocation);
Map<IBlockState, ModelResourceLocation> map = blockstatemapper.func_188181_b(block);
@@ -110,7 +125,7 @@
{
Collection<ModelResourceLocation> collection = Sets.newHashSet(map.values());
modelblockdefinition.func_188001_c().func_188138_a(block.func_176194_O());
- this.field_188642_k.put(modelblockdefinition, Lists.newArrayList(Iterables.filter(collection, new Predicate<ModelResourceLocation>()
+ registerMultipartVariant(modelblockdefinition, Lists.newArrayList(Iterables.filter(collection, new Predicate<ModelResourceLocation>()
@@ -115,7 +130,6 @@
if (collection1 == null)
{
public boolean apply(@Nullable ModelResourceLocation p_apply_1_)
{
@@ -127,22 +142,18 @@
collection1 = Lists.<ModelResourceLocation>newArrayList();
- this.field_188642_k.put(modelblockdefinition, collection1);
}
collection1.addAll(Lists.newArrayList(Iterables.filter(collection, new Predicate<ModelResourceLocation>()
@@ -125,6 +139,7 @@
return resourcelocation.equals(p_apply_1_);
}
})));
+ registerMultipartVariant(modelblockdefinition, collection1);
}
for (Entry<IBlockState, ModelResourceLocation> entry : map.entrySet())
@@ -135,22 +150,18 @@
{
try
{
@@ -56,7 +63,7 @@
}
}
}
@@ -371,6 +382,7 @@
@@ -394,6 +405,7 @@
protected void func_177592_e()
{
@@ -64,7 +71,7 @@
this.field_177613_u.put(Item.func_150898_a(Blocks.field_150348_b), Lists.newArrayList(new String[] {"stone", "granite", "granite_smooth", "diorite", "diorite_smooth", "andesite", "andesite_smooth"}));
this.field_177613_u.put(Item.func_150898_a(Blocks.field_150346_d), Lists.newArrayList(new String[] {"dirt", "coarse_dirt", "podzol"}));
this.field_177613_u.put(Item.func_150898_a(Blocks.field_150344_f), Lists.newArrayList(new String[] {"oak_planks", "spruce_planks", "birch_planks", "jungle_planks", "acacia_planks", "dark_oak_planks"}));
@@ -414,6 +426,10 @@
@@ -438,6 +450,10 @@
this.field_177613_u.put(Item.func_150898_a(Blocks.field_180407_aO), Lists.newArrayList(new String[] {"oak_fence"}));
this.field_177613_u.put(Items.field_179570_aq, Lists.newArrayList(new String[] {"oak_door"}));
this.field_177613_u.put(Items.field_151124_az, Lists.newArrayList(new String[] {"oak_boat"}));
@@ -75,7 +82,7 @@
}
protected List<String> func_177596_a(Item p_177596_1_)
@@ -430,7 +446,7 @@
@@ -454,7 +470,7 @@
protected ResourceLocation func_177583_a(String p_177583_1_)
{
@@ -84,7 +91,7 @@
return new ResourceLocation(resourcelocation.func_110624_b(), "item/" + resourcelocation.func_110623_a());
}
@@ -538,7 +554,7 @@
@@ -562,7 +578,7 @@
for (Entry<String, ResourceLocation> entry : this.field_177615_s.entrySet())
{
ResourceLocation resourcelocation = (ResourceLocation)entry.getValue();
@@ -93,7 +100,7 @@
ModelBlock modelblock = (ModelBlock)this.field_177611_h.get(resourcelocation);
if (modelblock != null && modelblock.func_178303_d())
@@ -626,6 +642,11 @@
@@ -650,6 +666,11 @@
@Nullable
private IBakedModel func_177578_a(ModelBlock p_177578_1_, ModelRotation p_177578_2_, boolean p_177578_3_)
{
@@ -105,7 +112,7 @@
TextureAtlasSprite textureatlassprite = (TextureAtlasSprite)this.field_177599_g.get(new ResourceLocation(p_177578_1_.func_178308_c("particle")));
SimpleBakedModel.Builder simplebakedmodel$builder = (new SimpleBakedModel.Builder(p_177578_1_, p_177578_1_.func_187967_g())).func_177646_a(textureatlassprite);
@@ -642,13 +663,13 @@
@@ -666,13 +687,13 @@
BlockPartFace blockpartface = (BlockPartFace)blockpart.field_178240_c.get(enumfacing);
TextureAtlasSprite textureatlassprite1 = (TextureAtlasSprite)this.field_177599_g.get(new ResourceLocation(p_177578_1_.func_178308_c(blockpartface.field_178242_d)));
@@ -122,7 +129,7 @@
}
}
}
@@ -659,9 +680,14 @@
@@ -683,9 +704,14 @@
private BakedQuad func_177589_a(BlockPart p_177589_1_, BlockPartFace p_177589_2_, TextureAtlasSprite p_177589_3_, EnumFacing p_177589_4_, ModelRotation p_177589_5_, boolean p_177589_6_)
{
@@ -138,7 +145,7 @@
private void func_177597_h()
{
this.func_177574_i();
@@ -882,4 +908,23 @@
@@ -906,4 +932,23 @@
field_177606_o.field_178317_b = "generation marker";
field_177616_r.field_178317_b = "block entity marker";
}
@@ -1,8 +1,8 @@
--- ../src-base/minecraft/net/minecraft/client/renderer/block/model/ModelResourceLocation.java
+++ ../src-work/minecraft/net/minecraft/client/renderer/block/model/ModelResourceLocation.java
@@ -1,11 +1,8 @@
package net.minecraft.client.renderer.block.model;
@@ -2,11 +2,8 @@
import java.util.Locale;
import net.minecraft.util.ResourceLocation;
-import net.minecraftforge.fml.relauncher.Side;
-import net.minecraftforge.fml.relauncher.SideOnly;
@@ -1,6 +1,6 @@
--- ../src-base/minecraft/net/minecraft/client/renderer/color/BlockColors.java
+++ ../src-work/minecraft/net/minecraft/client/renderer/color/BlockColors.java
@@ -27,7 +27,8 @@
@@ -26,7 +26,8 @@
@SideOnly(Side.CLIENT)
public class BlockColors
{
@@ -10,7 +10,7 @@
public static BlockColors func_186723_a()
{
@@ -147,7 +148,7 @@
@@ -144,7 +145,7 @@
public int func_189991_a(IBlockState p_189991_1_)
{
@@ -19,7 +19,7 @@
if (iblockcolor != null)
{
@@ -162,7 +163,7 @@
@@ -159,7 +160,7 @@
public int func_186724_a(IBlockState p_186724_1_, @Nullable IBlockAccess p_186724_2_, @Nullable BlockPos p_186724_3_, int p_186724_4_)
{
@@ -28,7 +28,7 @@
return iblockcolor == null ? -1 : iblockcolor.func_186720_a(p_186724_1_, p_186724_2_, p_186724_3_, p_186724_4_);
}
@@ -170,7 +171,9 @@
@@ -167,7 +168,9 @@
{
for (Block block : p_186722_2_)
{
@@ -9,7 +9,7 @@
float f2 = p_177077_9_.func_177552_f().func_181688_b(ItemCameraTransforms.TransformType.GROUND).field_178363_d.y;
GlStateManager.func_179109_b((float)p_177077_2_, (float)p_177077_4_ + f1 + 0.25F * f2, (float)p_177077_6_);
@@ -114,16 +114,13 @@
@@ -104,16 +104,13 @@
GlStateManager.func_179094_E();
IBakedModel ibakedmodel = this.field_177080_a.func_184393_a(itemstack, p_76986_1_.field_70170_p, (EntityLivingBase)null);
int j = this.func_177077_a(p_76986_1_, p_76986_2_, p_76986_4_, p_76986_6_, p_76986_9_, ibakedmodel);
@@ -29,7 +29,7 @@
GlStateManager.func_179109_b(f3, f4, f5);
}
@@ -144,10 +141,10 @@
@@ -134,10 +131,10 @@
float f7 = (this.field_177079_e.nextFloat() * 2.0F - 1.0F) * 0.15F;
float f9 = (this.field_177079_e.nextFloat() * 2.0F - 1.0F) * 0.15F;
float f6 = (this.field_177079_e.nextFloat() * 2.0F - 1.0F) * 0.15F;
@@ -42,7 +42,7 @@
this.field_177080_a.func_180454_a(itemstack, ibakedmodel);
GlStateManager.func_179121_F();
}
@@ -162,10 +159,10 @@
@@ -152,10 +149,10 @@
GlStateManager.func_179109_b(f8, f10, 0.0F);
}
@@ -55,7 +55,7 @@
}
}
@@ -192,4 +189,25 @@
@@ -182,4 +179,25 @@
{
return TextureMap.field_110575_b;
}
@@ -10,7 +10,7 @@
public RenderLivingBase(RenderManager p_i46156_1_, ModelBase p_i46156_2_, float p_i46156_3_)
{
super(p_i46156_1_);
@@ -77,10 +80,12 @@
@@ -72,10 +75,12 @@
public void func_76986_a(T p_76986_1_, double p_76986_2_, double p_76986_4_, double p_76986_6_, float p_76986_8_, float p_76986_9_)
{
@@ -24,7 +24,7 @@
this.field_77045_g.field_78091_s = p_76986_1_.func_70631_g_();
try
@@ -89,7 +94,7 @@
@@ -84,7 +89,7 @@
float f1 = this.func_77034_a(p_76986_1_.field_70758_at, p_76986_1_.field_70759_as, p_76986_9_);
float f2 = f1 - f;
@@ -33,7 +33,7 @@
{
EntityLivingBase entitylivingbase = (EntityLivingBase)p_76986_1_.func_184187_bx();
f = this.func_77034_a(entitylivingbase.field_70760_ar, entitylivingbase.field_70761_aq, p_76986_9_);
@@ -197,6 +202,7 @@
@@ -192,6 +197,7 @@
GlStateManager.func_179089_o();
GlStateManager.func_179121_F();
super.func_76986_a(p_76986_1_, p_76986_2_, p_76986_4_, p_76986_6_, p_76986_8_, p_76986_9_);
@@ -41,7 +41,7 @@
}
public float func_188322_c(T p_188322_1_, float p_188322_2_)
@@ -452,10 +458,11 @@
@@ -447,10 +453,11 @@
public void func_177067_a(T p_177067_1_, double p_177067_2_, double p_177067_4_, double p_177067_6_)
{
@@ -54,7 +54,7 @@
if (d0 < (double)(f * f))
{
@@ -464,6 +471,7 @@
@@ -459,6 +466,7 @@
this.func_188296_a(p_177067_1_, p_177067_2_, p_177067_4_, p_177067_6_, s, d0);
}
}
@@ -1,6 +1,6 @@
--- ../src-base/minecraft/net/minecraft/client/renderer/entity/RenderManager.java
+++ ../src-work/minecraft/net/minecraft/client/renderer/entity/RenderManager.java
@@ -209,8 +209,13 @@
@@ -226,8 +226,13 @@
this.field_178637_m = new RenderPlayer(this);
this.field_178636_l.put("default", this.field_178637_m);
this.field_178636_l.put("slim", new RenderPlayer(this, true));
@@ -14,7 +14,7 @@
public void func_178628_a(double p_178628_1_, double p_178628_3_, double p_178628_5_)
{
this.field_78725_b = p_178628_1_;
@@ -259,9 +264,9 @@
@@ -276,9 +281,9 @@
IBlockState iblockstate = p_180597_1_.func_180495_p(new BlockPos(p_180597_3_));
Block block = iblockstate.func_177230_c();
@@ -16,3 +16,15 @@
}
private void func_177137_d(AbstractClientPlayer p_177137_1_)
@@ -127,6 +129,11 @@
{
modelbiped$armpose1 = ModelBiped.ArmPose.BLOCK;
}
+ // FORGE: fix MC-88356 allow offhand to use bow and arrow animation
+ else if (enumaction1 == EnumAction.BOW)
+ {
+ modelbiped$armpose1 = ModelBiped.ArmPose.BOW_AND_ARROW;
+ }
}
}
@@ -1,6 +1,6 @@
--- ../src-base/minecraft/net/minecraft/client/renderer/entity/RenderVillager.java
+++ ../src-work/minecraft/net/minecraft/client/renderer/entity/RenderVillager.java
@@ -31,21 +31,7 @@
@@ -31,22 +31,7 @@
protected ResourceLocation func_110775_a(EntityVillager p_110775_1_)
{
@@ -16,6 +16,7 @@
- return field_110905_l;
- case 4:
- return field_110906_m;
- case 5:
- default:
- return field_110903_f;
- }
Loaded 100 of 436 files, more files were not shown because too many files have changed in this diff. Show more