Commit graph

4034 commits

Author SHA1 Message Date
cpw
54af750717 Verify that the fluid registry doesn't contain "junk" fluids thru reflection. 2015-04-18 21:37:45 -04:00
Lex Manos
1effc27790 Fixed NBTSizeTracker missing a lot of data being read. Also made new NBT object allocation claim 32-bits in the size tracker.
(cherry picked from commit de066a86da)

Conflicts:
	patches/minecraft/net/minecraft/nbt/CompressedStreamTools.java.patch
	patches/minecraft/net/minecraft/nbt/NBTTagList.java.patch
2015-04-18 21:22:44 -04:00
KingLemming
61984561cd Merge pull request #1805 from KingLemming/1.7.10
OreDict functionality updates.
2015-04-16 17:20:43 -04:00
King Lemming
cd3bbfb02c Adds some new Ore querying functionality.
Also attempts to size initial Hashmaps in a logical manner.

Signed-off-by: King Lemming <kinglemming@gmail.com>
2015-04-16 17:18:37 -04:00
LexManos
475d7fc02d Revert KL's change, requesting a ore WILL register it.
Registering like this and returning a new empty list allows for modders to register their recipes and such without requiring to be executed after someone actually adds an item. If handled properly this allows for more flexible load orders, and more responsive code.
2015-04-13 21:28:16 -07:00
KingLemming
b30b551197 Merge pull request #1796 from KingLemming/1.7.10
Adjusts OreDictionary to prevent invalid registrations.
2015-04-13 22:41:25 -04:00
King Lemming
3cd7f6bd87 Adjusts OreDictionary to prevent invalid registrations.
Getting Ore Names for a non-existent ore will no longer automatically add that Name to the list nor generate an ID.

Tweaks a warning message in the FluidContainerRegistry. No functionality change.

Signed-off-by: King Lemming <kinglemming@gmail.com>
2015-04-13 22:40:38 -04:00
cpw
277495c8e4 MinecraftForge/FML@dfce4cd8d0 Allow registering custom language adapters.
MinecraftForge/FML@9fecd72cf0 Some tidyup of the PR
MinecraftForge/FML@10ac2a4fd9 Fix itemCtorArgs javadoc in registerBlock
MinecraftForge/FML@86f70d37a4 Patch TracingPrintStream to handle Kotlin IO.
2015-04-11 18:20:11 -04:00
Arkan Emberwalker
5f7c3bd72d Patch TracingPrintStream to handle Kotlin IO.
Kotlins internal IO suite wraps the old System.out style, so descend
deeper in the stack when kotlin.io is detected.
2015-04-11 18:15:35 -04:00
tterrag1098
592c9c8e42 Fix itemCtorArgs javadoc in registerBlock 2015-04-11 18:09:31 -04:00
cpw
4af2ba3949 Some tidyup of the PR 2015-04-11 18:05:00 -04:00
Arkan Emberwalker
0055973f43 Allow registering custom language adapters.
Allows external mods/library jars to provide language adapters for
languages not supported in native Forge.
2015-04-11 18:05:00 -04:00
cpw
5c88164211 And handle the null case in the constructor itself. Closes #1794 (again) 2015-04-11 17:38:15 -04:00
cpw
230d757a89 Fix NPE - Closes #1794 2015-04-11 17:27:14 -04:00
cpw
9671179453 Fluids are now tracked internally by mod. This allows for the server and the world to specify a "default"
in the case of a possible alternative fluid implementation. If you always called registerFluid, things
should work pretty seamlessly, but if you didn't (gating with an isFluidRegistered check for example)
you should change to register anyway. This way, even if you're not default in the overall instance, you may
become default if you're the only mod present on a server, for example, or in a world save.

This should radically decrease the mixups caused by mod load ordering problems, and other issues around fluid
tracking.
2015-04-11 17:18:53 -04:00
cpw
eb12936a52 MinecraftForge/FML@0da1263ff9 Enhance error output for bad textures a bit more and try and capture more types of error.. 2015-04-11 12:30:20 -04:00
cpw
fa5ab52acd Enhance error output for bad textures a bit more and try and capture more types of error.. 2015-04-11 12:12:37 -04:00
cpw
345d905438 MinecraftForge/FML@be5ec06e31 Cleaning up the missing resource stack spam, and condensing the information into a usefully understandable format. 2015-04-11 01:03:50 -04:00
cpw
c7622c06d7 Cleaning up the missing resource stack spam, and condensing the information into a usefully understandable
format.
2015-04-11 00:52:58 -04:00
cpw
6049d371f3 MinecraftForge/FML@ce791cb1f2 Rework EventSubscriptionTransformer to bake @Cancelable and @HasResult values, should increase EventBus performance even more by removing logic from Event constructors.
MinecraftForge/FML@852710962a Clean up some dead code
2015-04-10 22:46:53 -04:00
cpw
994f722843 Clean up some dead code 2015-04-10 22:34:06 -04:00
Lex Manos
4be96044d0 Rework EventSubscriptionTransformer to bake @Cancelable and @HasResult values, should increase EventBus performance even more by removing logic from Event constructors. 2015-04-10 22:28:39 -04:00
KingLemming
6d3494a853 Merge pull request #1791 from KingLemming/1.7.10-fluid
FCR Warning + Denial
2015-04-10 20:11:17 -04:00
King Lemming
37d63b3fe9 Adds a warning to the FluidContainerRegistry when a mod does something stupid! Also denies the registration.
Signed-off-by: King Lemming <kinglemming@gmail.com>
2015-04-10 20:09:58 -04:00
KingLemming
291c57b624 Merge pull request #1789 from KingLemming/1.7.10-fluid
1.7.10 fluid
2015-04-10 16:41:29 -04:00
King Lemming
186f92479d Fixes FluidContainerRegistry properly - no more corner case where client/server mods disagree.
Also clarifies the 2x Fluid registration error message somewhat.

Signed-off-by: King Lemming <kinglemming@gmail.com>
2015-04-10 16:38:45 -04:00
KingLemming
7e9dfb1a11 Merge pull request #4 from MinecraftForge/1.7.10
1.7.10
2015-04-10 16:24:33 -04:00
KingLemming
806b4a3bdf Merge pull request #1784 from KingLemming/1.7.10-fluid
Change to FluidContainerRegistry
2015-04-09 17:45:09 -04:00
King Lemming
433b7ca589 Fixes #1782
Signed-off-by: King Lemming <kinglemming@gmail.com>
2015-04-09 17:28:20 -04:00
KingLemming
78db5732ca Merge pull request #2 from MinecraftForge/1.7.10
1.7.10
2015-04-09 16:56:04 -04:00
LexManos
24802143eb Merge pull request #1775 from Prototik/patch-1
[1.7.10] Fix FluidRegsitry.registerFluid
2015-04-08 09:25:01 -07:00
Sergey Shatunov
a42cf1ae37 Fix FluidRegsitry.registerFluid
FluidRegistry:
```java
    static BiMap<String, Fluid> fluids = HashBiMap.create();
    static BiMap<Fluid, Integer> fluidIDs = HashBiMap.create();
...
    public static boolean registerFluid(Fluid fluid)
    {
        if (fluidIDs.containsKey(fluid.getName()))
            ^^^^^^^
```
There is definitely should be fluids instead fluidIDs. This mistake broke many mods.
2015-04-08 17:26:40 +06:00
Lex Manos
02ebc9ca21 Restore binary compatibility issues in FluidRegistry caused by recent changes. 2015-04-07 20:06:55 -07:00
Lex Manos
1fd39578b0 MinecraftForge/FML@31cf2a9cab Remove J7 only constructor in EnhancedRuntimeException, J6 compiling compatibility restored. 2015-04-07 20:06:01 -07:00
Lex Manos
f6c50cc3af Remove J7 only constructor in EnhancedRuntimeException, J6 compiling compatibility restored. 2015-04-07 19:32:25 -07:00
cpw
4f0e2fb9c4 You shouldn't be creating FluidStacks from unregistered Fluids. Warn clearly on failed registrations, and make a useful log message for failed fluidstack
creations. Should help a lot with tracking down broken mods that are doing this wrongly.
2015-04-05 22:48:09 -04:00
King Lemming
f7395f517b Allow for duplicate Fluid Blocks. It's annoying to be sure but just as with the OreDictionary, we'll have to handle it.
Signed-off-by: King Lemming <kinglemming@gmail.com>
2015-04-05 22:30:39 -04:00
cpw
defaddecec Fix formatting 2015-04-05 22:30:39 -04:00
cpw
7506a5b7ad Add in a fluidid transformer 2015-04-05 22:30:39 -04:00
King Lemming
3fc40b955a Removed fluidID from ItemStack.
This fixes a rather huge issue where FluidStacks on the client could be desynced if a modder was unaware of it.

This is a breaking change but can be mitigated with a transformer to the getter getFluidID().

Signed-off-by: King Lemming <kinglemming@gmail.com>
2015-04-05 22:30:39 -04:00
cpw
38b9febfe5 Forge really should have always supported the concept of an "exact spawn". Individual world providers can still
change this behaviour of course, but for default maps it makes sense to support it as a config option.
2015-04-03 10:31:25 -04:00
cpw
e837b2e2cd MinecraftForge/FML@12ccf9cf49 Rather than try to fall back to the backup level.dat in case of weirdness in the ID map, just fail hard. There is probably a serious modder derp in this case and there's nothing FML can do to recover the situation except avoid making it worse.
MinecraftForge/FML@e8cd368da3 It's an IllegalState not an IllegalArgument *sigh*
MinecraftForge/FML@2be9c74342 And fix itemblocks being removed, leaving behind a residual block. This is a legitimate action - use the missing mapping event to let the mod tell us about it
MinecraftForge/FML@7d8804cf65 You can't setAction to BLOCKONLY
MinecraftForge/FML@c73861efe6 Cherry-pick 01aaa7dc97480b381ca0d192ec65016d7baeb747 Fix mods defined via --mods or --modListFile launch args not being searched for coremods. #560
MinecraftForge/FML@94c45b48c1 Fix json cache crash, handle the file much more cleanly. Probably an MC JIRA since it's a vanilla bug. Closes #619
2015-04-03 10:26:17 -04:00
cpw
38cdbc16e2 Fix json cache crash, handle the file much more cleanly. Probably an MC JIRA since
it's a vanilla bug. Closes #619
2015-04-02 13:07:40 -04:00
Matthew Messinger
ee414b2037 Cherry-pick 01aaa7dc97480b381ca0d192ec65016d7baeb747
Fix mods defined via --mods or --modListFile launch args not being searched for coremods. #560
2015-04-01 19:51:44 -04:00
cpw
e1c83de490 Comment on previous commit fix - it worked. Thanks to skyboy and tterrag for investigating and verifying.
A chest as an acheivement icon will recreate the original problem, for note.
2015-04-01 07:13:14 -04:00
cpw
1b7ce7592c Experimental "fix" for the weird rendering in the Acheivements screen. Thanks skyboy for spotting this. 2015-03-31 20:50:16 -04:00
cpw
0d79aa1e0a You can't setAction to BLOCKONLY 2015-03-31 15:38:53 -04:00
cpw
d684a4e066 And fix itemblocks being removed, leaving behind a residual block. This
is a legitimate action - use the missing mapping event to let the mod
tell us about it
2015-03-31 15:29:51 -04:00
cpw
0b8ff5890a It's an IllegalState not an IllegalArgument *sigh* 2015-03-31 15:11:39 -04:00
cpw
0bff21315c Rather than try to fall back to the backup level.dat in case of weirdness
in the ID map, just fail hard. There is probably a serious modder derp in this
case and there's nothing FML can do to recover the situation except avoid
making it worse.
2015-03-31 15:09:49 -04:00