Commit Graph

152 Commits

Author SHA1 Message Date
David Quintana b0c9d7cce9
Some (sadly breaking) improvements to the Fluid API (#6110)
* Some (sadly breaking) improvements to the API, after feedback and concerns provided by users:
  - Moved calculation of the translation key to the FluidAttributes constructor, so that builders can be shared between still & flowing sub-fluids.
  - Moved biome-based coloring to a dedicated FluidAttributes.Water variant, which is not used by default.
  - Added logic to automatically gather fluid textures into the list of textures to bake.
  - Patched BucketItem and FlowingFluidBlock to avoid eager access to the fluid objects.
  - Added a ForgeFlowingFluid class, as a more user-friendly way to construct a new FlowingFluid.
2019-09-11 16:00:32 +02:00
LexManos 281ef5a152 Add new DeferredRegistry helper, and change RegistryObject to update when overrides are registered. 2019-09-10 16:02:07 -07:00
tterrag fc5573333d Make /locate command support modded structures 2019-09-07 01:09:42 -04:00
tterrag 55fe7c470f Make STRUCTURE_FEATURE registry a slave map of the FEATURE registry
Also convert Feature.STRUCTURES to a slave map
2019-09-06 23:42:19 -04:00
cpw 5048739b7f
Turned minecraft into a proper Mod, with a "dummy" language provider.
Also fixed the "translations" not being available early if an exception occurs
by force loading the forge and MC ones. Closes #5984

Signed-off-by: cpw <cpw+github@weeksfamily.ca>
2019-08-04 20:16:01 -04:00
LexManos 318fc6ffe8 Fixed DimensionType.getRegistryName() returning null Closes #5992
Fixed RegisterDimensionEvent not firing for new worlds. Closes #5987
2019-07-31 22:43:46 -07:00
LexManos 731e1920d2 Fix @ObjectHolderRegistry not properly detecting vanilla class level references. Closes #5958 2019-07-25 17:59:08 -07:00
David Quintana ae3d002ac6 Fix & Improve state comparison when checking vanilla block replacements (#5922) 2019-07-22 19:23:20 -07:00
cpw e5acea60e6
Fix too many registries being sent from server to client
Signed-off-by: cpw <cpw+github@weeksfamily.ca>
2019-06-23 19:54:55 -04:00
cpw c10174d50d
Update mappings, move mod initialization to the async loader.
Signed-off-by: cpw <cpw+github@weeksfamily.ca>
2019-06-21 22:42:16 -04:00
Johannes ed3dc8c7d3 Implement getValue in ClearableRegistry fixing DimensionArgument. (#5809)
Fix DimensionArgument
2019-06-12 16:16:32 -07:00
tterrag 3385e62aa7 Add forge registries for most vanilla registries
Made all registry names consistent with their vanilla counterparts
Also added a system for legacy registry names, so no data will be lost
Cleaned up formatting in GameData and ForgeRegistries
2019-06-09 04:23:39 -04:00
tterrag 40f2276e88 Add registry flag for syncing 2019-06-09 00:55:42 -04:00
tterrag 892fea3df9 Add forge registry for container types, expose ScreenManager.registerFactory 2019-06-09 00:19:17 -04:00
cpw 9fa4641cb0
Update mappings
Signed-off-by: cpw <cpw+github@weeksfamily.ca>
2019-06-08 10:45:28 -04:00
LexManos b74b72e44c Fix NamespacedWrapper not delegating a new getter. Fixing data loading spam at world start.
Update red/yellow/green tags with new vanilla item names.
Reenabled test source directory in project and made ModelDataTest compile.
2019-06-07 19:34:16 -07:00
LexManos a7df63e1a1
Update to 1.14.2 2019-06-07 16:50:47 -04:00
LexManos eae0858de6 Fix build script producing duplicated eclipse source folders.
Fix not including userdev source in sources jar.
Update license header of files that need it.
Delete patches_old folders. Most are unneeded in 1.13+ as the systems they effected were changed significantly. Any that need to be readdressed can be done as PRs.
2019-05-13 19:11:24 -07:00
tterrag 416bf9e3bf Allow loading json constants outside of _constants 2019-04-25 19:22:43 -04:00
Ben Staddon 931105123e Allow custom DataSerializers to be registered safely (#5245) 2019-04-24 13:05:12 -04:00
Ben Staddon eed92ba07c Only prompt for missing registries on local worlds (#5348) 2019-04-23 20:45:48 -04:00
Ben Staddon 8b5a5ecd74 Ensure slave maps are cleaned up when handling registry overrides (#5250) 2019-04-23 12:31:55 -04:00
MrRiegel d20b1f271e Fix an ObjectHolderRef internal error message (#5214) 2019-04-12 10:49:26 -04:00
Ben Staddon a02bec7ebe Fix some null returns from defaulted registries (#5235) 2019-04-11 18:05:26 -04:00
cpw 944d760855
Fire the ModIdRemappingEvent on the Forge Event bus. Closes #5632
Signed-off-by: cpw <cpw+github@weeksfamily.ca>
2019-03-25 21:55:34 -04:00
cpw d99a55a7d1
Allow login packets to only generate on server based connections
Run injectSnapshot on the client thread, wait for result and
disconnect when injectSnapshot fails.
Fix DevServer to load MOD_CLASSES
Fix LaunchTesting to properly load log4j2 markers (don't use a
static variable in that class!)

Signed-off-by: cpw <cpw+github@weeksfamily.ca>
2019-03-15 23:22:28 -04:00
LexManos 47e6b34d2b DimensionManager.registerDimension now returns the DimensionType instance for convienance.
You can still access others in DimensionType.getByName()
Fixed ForgeRegistry rappers not forwarding isEmpty.
2019-03-06 21:01:12 -08:00
LexManos 58494f8878 Rewrite the FML Handshake packet formats to include actually syncing the registry data and introduce the concept of caching it locally.
Snapshots are not injected yet due top threading issues.
2019-02-27 23:56:31 -08:00
cpw 245d0b6282
Fix startup Query to actually display (fixed commit).
Signed-off-by: cpw <cpw+github@weeksfamily.ca>
2019-02-23 20:42:45 -05:00
cpw bbdf52e038
Update to 0.10 modlauncher API with performance improvements..
Signed-off-by: cpw <cpw+github@weeksfamily.ca>
2019-02-23 14:36:05 -05:00
tterrag 2ec74e5c22 Fix RegistryManager#getRegistry not working for generic registry entries 2019-02-14 18:50:15 -05:00
tterrag 9d56309a05 Fix license headers 2019-02-14 18:49:40 -05:00
LexManos 2f547c8c56 Fix javac compile issues. 2019-02-14 15:21:28 -08:00
LexManos ca72710937 Initial 1.13.2 update. Major thing to note is that Dimensions have been completely revamped.
DimensionType is not unique per Dimension. See DimensionManager for more details.
Vanilla now has a chunk loading system, so Forge's will need to be deprecated/adapted.
2019-02-14 15:08:53 -08:00
cpw 586c24f9d6
Implement a GUI packet and GUIFACTORY for triggering from the server.
Signed-off-by: cpw <cpw+github@weeksfamily.ca>
2019-02-13 21:06:39 -05:00
cpw f83500db11
Its 2019. Update licence headers to match.
Signed-off-by: cpw <cpw+github@weeksfamily.ca>
2019-02-10 17:57:03 -05:00
LexManos 053c5300ed Reintroduce ObfuscationReflestionHelper closes #5373 2019-02-06 20:46:21 -08:00
cpw 0a11ffb827
More logging tweaks, including some aimed at userdev.
`forge.logging.markers=<LIST OF MARKERS>` will enable markers.

Signed-off-by: cpw <cpw+github@weeksfamily.ca>
2019-01-27 00:06:57 -05:00
cpw 3c55b46ca0
Big cleanup of logging. Might do some tweaks of the userdev logging, but this should be good for vanilla..
Signed-off-by: cpw <cpw+github@weeksfamily.ca>
2019-01-26 22:18:28 -05:00
cpw 040cc4bf16
Expose a couple of mods.toml properties properly. Half-implemented
override namespace - still needs to be reviewed and determined how this
might work in detail.

Signed-off-by: cpw <cpw+github@weeksfamily.ca>
2019-01-20 21:26:31 -05:00
cpw 7c840dce35
Fix classcast in autoeventsubscriber, also actually make progression
work properly. This whole thing is a bit of a gross hack.

Signed-off-by: cpw <cpw+github@weeksfamily.ca>
2019-01-20 12:20:27 -05:00
cpw f4d2d1a24b
Move Registry Events to the mod event bus.
Add infrastructure to allow parallel or synchronous dispatch of
mod events, and pass-through of events to the dispatch system.

Signed-off-by: cpw <cpw+github@weeksfamily.ca>
2019-01-19 23:27:27 -05:00
LexManos 3b029ba031 Re-introduce patch for injecting registry mappings during world loading.
And re-introduce registry freezing to ONLY the Register events.
Filter ObjectHolders by registry type and fire between every Register event.
2019-01-16 12:28:13 -08:00
cpw 99452a8b45 Update a bunch of libs, rename some of the mod events to more
meaningful names.
2019-01-14 00:39:00 -05:00
David Quintana e98951ee65 Fix blockstate id map calculation. (#5279) 2019-01-11 14:52:30 -08:00
LexManos 36d2e67b07 Reimplement @ObjectHolder scanning, and expose system for others to add handlers.
Fix forgedev and userdev run configs.
Fix issue in log functions assuming String arguments.
2019-01-09 20:57:01 -08:00
LexManos f7acc73282 Update userdev and runconfigs for ForgeGradle changes. 2019-01-08 00:29:36 -08:00
LexManos 7c0d94ce9c Patch work, most of block classes, and fix eclipse run configs. 2018-11-16 23:15:39 -08:00
LexManos 94e1a8e0a4 Update mappings to 09/21 snapshots.
Conflict with getMatrix in ITransformation, so renamed to getMatrixVec.
2018-09-22 03:40:22 -07:00
LexManos a0e217b1dc More because git likes to split to many 2018-09-21 02:17:20 -07:00
cpw 03d19f2e70 Tweak to remove javac compile errors related to generics on registries.
Also remove the recipes registry call - they're gone from registries completely.
2018-09-16 22:27:08 -04:00
cpw abacf8e141 Net handling pass 2. Tidied up login packet sourcing, generate registry packets. 2018-09-16 20:59:25 -04:00
tterrag 231dfeee31 Enforce bounds on min/max registry IDs 2018-09-16 16:59:08 -04:00
LexManos c77d00efe4 Recipe work. No longer a registry. OreDictionary related code removed in favor of Tags. Started moving some OreDict items to tags.
Added code to RuntimeEnumExtender to return existing enum values with the same name if they exist instead of creating more.
2018-09-16 04:20:28 -07:00
LexManos b4c23aba8e Command work, and Added TileEntityType as a Forge Registry. 2018-09-15 00:59:19 -07:00
tterrag 3f743887e7 More compile cleanups. (#5139) 2018-09-14 09:30:56 -07:00
LexManos bec9214d0c Fix launching in dev 2018-09-10 13:08:35 -07:00
LexManos 12869710de Remove old paulscode libraries.
Re-work EnumHelper and ObjectHolder systems to bypass JITer of final fields.
Other cleanups.
2018-09-06 04:39:01 -07:00
LexManos 2798080f60 More error cleanup, reinstanted IForgeReigstryEntry.
The abstract class will be used as the default, and to enable delegates but we should keep it api simple by keeping the interface.
Removed some patches that didnt get removed in the rebase.
2018-09-05 20:06:18 -07:00
cpw d7e9217695 Network init 2018-09-05 13:14:16 -07:00
cpw b50b768852 Server starts 2018-09-05 13:13:53 -07:00
cpw 77c3310711 Zeroth pass on 1.13 2018-09-05 12:56:01 -07:00
cpw d0ab0e166c Well, it works, for a game, now. 2018-09-05 12:30:02 -07:00
cpw 06b16aaa19 Some more stuffs. ObjectHolder's replacement? 2018-09-05 11:58:31 -07:00
cpw 1b1ee6f0b8 more things. Moving ModContainer around. 2018-09-05 11:49:48 -07:00
cpw c1f0e1b68f Holy Moly, it's a big fat commit of broken code! 2018-09-05 11:16:33 -07:00
LexManos 0cf5ef221c Run licenseFormat to apply license header to all files. 2018-07-01 14:17:31 -07:00
Ben Staddon 43895d773e Add validation to recipe registry (#4957) 2018-06-26 22:00:53 -07:00
Ben Staddon 1d863cdefc Check name prefix used for tile entity registrations (#4681) 2018-05-16 22:52:32 -07:00
cpw 9e9cb021ab Clean up broken aliases caused by registry bug #4894. (#4909) 2018-04-30 21:05:37 -07:00
LexManos f2fa21e6e2 Move registry snapshot read/write code to Snapshot class. Cleaner code. 2018-04-29 17:58:02 -07:00
Ben Staddon 2353800d61 Fix typo in validation of vanilla registry wrappers (#4899) 2018-04-26 21:18:39 -07:00
mezz bc3bbe3d84 Avoid copying Forge Registry keys, values, and entries (#4545) 2018-01-18 12:46:05 -08:00
mezz d0bdb23300
Minor code and documentation cleanup. (#4664) 2018-01-12 23:54:29 -08:00
LexManos 3c5e082541 Downgrade RegistryEntry's dangerous alternative prefix message to info instead of BigWarning.
This is still most likely a broken mod, but nobody ever actually fixes themselves, and i'm tired of being blamed for 'spamming' the logs.
2017-12-21 01:36:23 -08:00
rguy96 274dfc23ef Fix GameData#revert ignoring RegistryManager parameter (#4232) 2017-10-31 11:29:35 -07:00
mezz 083daeb5ed Update mcp mappings to 20171003 2017-10-03 22:08:36 -07:00
LexManos 303a775fc3 Add new /forge entity list command for displaying a list of all entities in world.
As well as tracking down chunks with large amounts of entities.
2017-09-25 12:56:09 -07:00
kashike f2b07e8db1 Introduce entity entry builder, useful in the Register<EntityEntry> event replacing needed calls to EntityRegistry. (#4408) 2017-09-20 13:03:03 -07:00
LexManos 52702e5cc9 Fix issue saving observers using different metadata then vanilla. 2017-08-30 13:20:51 -07:00
LexManos 45dfce0013 Fix for dummied server side registry entries while client has read entries. 2017-08-22 02:08:34 -07:00
LexManos 28e341002f Add support for server side only recipes, as well as detection of vanilla client recipe book filter to prevent errors. 2017-08-15 05:10:07 -07:00
LexManos afea45dccc Fix tripwire statemap not being complete when mappings change. Closes #3924 2017-07-18 12:53:55 -07:00
LexManos 872d721e77 Send remap event when data is frozen to notify modders to bake things.
Fixes search not working when connecting to vanilla servers.
2017-07-13 14:45:51 -07:00
Ben Staddon 0fde64ac38 Clean up uses of deprecated library functions (#4130)
Avoid catching and rethrowing runtime exceptions
Append error messages to exceptions instead of the log
2017-07-12 21:50:28 -07:00
LexManos fdfaa5036d Fix override duplication caused by bad comparison. 2017-07-05 14:41:24 -07:00
LexManos 7b0a005167 Fix log spam when creating dummy blocks. 2017-07-05 14:40:43 -07:00
Kina 81584d4215 Correct the default resource location of potion registry (#4117) 2017-07-02 13:13:46 -05:00
LexManos c3e5b4bb2e Add @ObjectHolder scanning to vanilla MobEffects, Biomes, Enchantments, SoundEvents, and PotionTypes constants. Closes #4104 2017-06-28 13:17:59 -07:00
mezz 8581225da8 Use java 8 collection functions 2017-06-28 00:14:10 -07:00
LexManos d0b24313d3 Fix MissingMapping REMAP action. Closes #4069 2017-06-27 16:56:42 -07:00
LexManos cab4f783e9 Fix error when using RegistryBuilder and not specifying a max id number. 2017-06-27 15:18:03 -07:00
LexManos c565984822 Allow the recipe registry to be modified. 2017-06-27 15:17:26 -07:00
LexManos 3ae30478db More work on registry override ability. Closes #4079 2017-06-25 20:45:48 -07:00
LexManos b542179242 Make Dummy block an Air block. 2017-06-24 15:06:28 -07:00
mezz 27321efb1f Clean up logging 2017-06-24 01:46:05 -07:00
tterrag b71ab7e444 Make ForgeRegistry iterator sorted. Closes #4058 (#4059) 2017-06-23 23:52:27 -05:00
LexManos dd42f84a47 Loosen up registry locks until data freeze. 2017-06-23 17:52:59 -07:00
LexManos f4afb6f56c Implement override tracking and syncing.
Overrides MUST be registered within a tracked event so we know what mod it came from.
This will allow servers/saves to select which mod 'wins' and becomes to active entry.
This should also mean that when connecting to a vanilla server things will revert.
2017-06-23 16:59:57 -05:00
LexManos e805b12df8 Fixup some registry tests, dummies are now persisted across syncing. 2017-06-23 16:59:57 -05:00