Commit Graph

385 Commits

Author SHA1 Message Date
Richard Freimer 0e65f20f22 Add hooks to make it easier to add custom TNT blocks (#6290) 2019-11-20 19:19:34 -08:00
tterrag 2373dab982 Expose private helper methods in BlockLootTables to subclasses 2019-10-28 19:28:16 -04:00
tterrag acaa470dea
Add Blockstate and Model data providers (#6241) 2019-10-24 22:33:24 -04:00
David Quintana 5e9380ab85
Fix forge blockstates and custom model loading (#6154)
* Reimplement forge blockstates variant through the use of a pseudo-model that handles the model loading, retexturing, custom data, etc. on behalf of the blockstates loader. This model gets injected into the model registry with an autogenerated unique name, to not collide with other model locations.
* Fix model loaders not being properly initialized by calling the reload method from the loader register function. In 1.12, registering a reload listener caused the listener to be called right away from the register method. This is not true anymore.
2019-10-08 00:18:29 +02:00
tterrag ca980a56bc Combine all hidden mod resource packs into a single sortable pack
Fix mod datapacks sorting under vanilla
2019-10-04 18:36:33 -04:00
tterrag 4f12261080 Move OnlyIn patches on DyeColor to SAS file
Also fix broken cobblestone stairs recipe
2019-10-04 02:26:54 -04:00
tterrag 78cdb705d4 Allow structure processors to process entities 2019-09-28 18:18:24 -04:00
tterrag 2392a4c184 Fix new flower pot ctor not being usable with deferred register 2019-09-25 18:01:43 -04:00
tterrag d510978446 Add constructor to StairsBlock that accepts a state supplier 2019-09-24 21:05:23 -04:00
tterrag dfbd61436b Add template arg to StructureProcessor#process 2019-09-22 23:35:12 -04:00
tterrag dee844e232 Add IExtensibleEnum#init, extend FillerBlockType/PlacementBehaviour 2019-09-21 15:57:32 -04:00
cpw 7fa3594c04
Fixed the problem where an error would cause the main thread to continue
even though there were still parallel threads running. Also, handle exceptions
in the AutomaticEventSubscriber rather than leaking them to the Parallel processor.

Actually closes #6148
Signed-off-by: cpw <cpw+github@weeksfamily.ca>
2019-09-17 21:41:08 -04:00
tterrag 6fda1e968d Make FlowerPotBlock extensible and reusable for mods
- Change static lookup map to an instance variable
- Add an instance variable for the "empty pot" for the current block
- Keep one instance of the lookup map between the empty pot and all its full versions
- Convert everything to use delegates
2019-09-17 19:57:58 -04:00
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
tterrag 3dce85c49f Properly fix missing attribute issue, add vanilla bug ID 2019-09-08 02:23:16 -04:00
tterrag fc5573333d Make /locate command support modded structures 2019-09-07 01:09:42 -04:00
Tobias Hotz 185f7344fa
move default log level for debug file to debug instead of trace, and remove millis from console and GUI. Also remove unused config xmls 2019-08-31 13:55:46 -04:00
DaemonUmbra aa38f62bae Change fml.modloading.brokenfile.optifine to not imply that Forge is responsible for Forge-Optifine compatibility. (#6080) 2019-08-28 21:32:33 -07:00
BlakeBr0 336d53b692 Strip side annotations from CropsBlock.getSeedsItem (#6013) 2019-08-28 20:14:41 -07:00
LexManos e784a7f606 Recipe system cleanup. (#6014) 2019-08-29 03:18:41 +02:00
ichttt dd340b8ef2 Fix coremod not redirecting to the correct method (#6078) 2019-08-28 17:49:46 -07: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
its_meow a8a0306f98 Fix AT for EntitySpawnPlacementRegistry.register 2019-08-02 14:06:05 -07:00
desht 19b7d26bc2 Make ParticleManager.IParticleMetaFactory public (#5926) 2019-08-02 14:05:32 -07:00
JoJoModding c7940e70ed Add button to open mods folder (#5986) 2019-08-02 14:00:54 -07:00
LexManos b009cedc0c Introduce new Side Annotation Stripper system to semi-automate the shipment of Sided methods and cleanup patches.
New forge:checkSAS task to validate this config file. Closes #5995
2019-07-31 21:15:39 -07:00
cpw ae09fc6b6d
Register a config command. Currently one subcommand: showfile, which
when passed a modid and a type (CLIENT, COMMON or SERVER) will display
a link in the caller's chat to open that file in the OS file viewer of choice.

Signed-off-by: cpw <cpw+github@weeksfamily.ca>
2019-07-28 21:09:15 -04:00
cpw 4c05c63a04
Fix potion transformer to look up the right name depending on context.
Signed-off-by: cpw <cpw+github@weeksfamily.ca>
2019-07-26 00:35:03 -04:00
cpw 0bdc2d04b4
Added a coremod, shush, don't tell Lex.
Seriously, this is how to do targeted changes to specific classes.

In this case, adding a fieldtomethod redirect for EffectInstance.potion
to allow substitution.

Signed-off-by: cpw <cpw+github@weeksfamily.ca>
2019-07-25 23:02:05 -04:00
cpw 4582a29ec1
Make I18N format errors less spammy, also remove single apostrophes from
current translations in en_us.json. Other langs may still have problems.

Closes #5952
Signed-off-by: cpw <cpw+github@weeksfamily.ca>
2019-07-20 19:14:17 -04:00
cpw 27afdc8a27
Provisional update to 1.14.4. Missing a lot of playerinteractionmanager patches because everything moved and I'm tired.
Fix up immediate problems.

bump to 28.
2019-07-20 00:35:40 -04:00
cpw eff42f6066
Update mappings to 20190719 in prep for 1.14.4..
Signed-off-by: cpw <cpw+github@weeksfamily.ca>
2019-07-19 11:55:30 -04:00
LexManos cb21e95e0b Change default BrewingRecipe to use an Ingredient for the input instead of ItemStack. Closes #5944
Add AT for GameRules.register Closes #5946
Fix Forge Blockstate loader model path is inconsistent with vanilla blockstates Closes #5892
Fix client crashing when opting not to load a world when there's missing blocks Closes #5886
2019-07-18 14:13:20 -07:00
LexManos ce28c5794d Cleanup Forge's Access Transformer, and add ATs for Block.Properties#noDrop, and AxeItem/PickaxeItem. Closes #5866 and Closes #5921 2019-07-10 17:39:19 -07:00
LexManos 61bea2bfda Fixed EntityJoinWorldEvent not being fired when player is added to ServerWorld. #5827
Fixed wrong example path for the access transformer in the MDK build.gradle. #5891
Added getters for mouse x/y velocity and if the middle-mouse button is being held down. #5776
Modify issue template for better clarity. #5874
Fixed grindstone not using ItemStack-sensitive getMaxDamage. #5831
Added ParticleManager.registerFactory to Forge's AT. #5896
Fixed NPE in SidedInvWrapper when side was null. #5787
Moved EndermanEntity.setAttackTarget super call to allow LivingSetAttackTargetEvent the ability to override default behavior. #5778
Added field to make "Looking at" debug info maximum distance configurable #5714
2019-07-08 18:42:12 -07:00
LexManos 13ae8e41ee Fix duplicate WorldEvent.Unload call in client key handler.
Add recipe generator to replace vanilla recipes with Forge tags.
2019-06-27 17:23:23 -07:00
cpw 0a819da0e7
Reorganize sided event dispatch slightly. Dispatch model and entityrenderer
functions at more appropriate times.

Signed-off-by: cpw <cpw+github@weeksfamily.ca>
2019-06-23 16:01:20 -04:00
cpw 60513446fa
Merge branch 'pull/5793' into 1.14.x 2019-06-23 14:42:32 -04:00
JoJoDeveloping b9e5dfd286
Add mod failure identification 2019-06-23 03:14:05 +02:00
cpw 83a0dc2ef9
Merge remote-tracking branch 'origin/1.14.x' into 1.14.x 2019-06-21 22:42:33 -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
tterrag 5a3b375147 Fix #5612 add entity to ISelectionContext 2019-06-21 21:15:56 -04:00
LexManos f01b87fac7 Fix some compile errors in test classes. 2019-06-19 18:07:58 -07:00
LexManos e1cdb2e558 Expose the data entry point and generate Forge's Tags using it. 2019-06-13 20:58:03 -07:00
its_meow a7b56f0975 Fix AT for EntitySpawnPlacementRegistry.register (#5799) 2019-06-12 16:17:25 -07:00
tterrag da22fd40bf Adjust NetworkEvent#enqueueWork to match vanilla logic
In singleplayer our packet work could get delayed until the next tick,
breaking the expectation of packet read order. Fixes that using
NetworkHooks.openGui would result in missing inventory data on the client
2019-06-10 00:13:27 -04: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 892fea3df9 Add forge registry for container types, expose ScreenManager.registerFactory 2019-06-09 00:19:17 -04:00
tterrag a93d7d20ee Rework model patches/classes for new bake signature 2019-06-08 01:02:29 -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
cpw c57c6213ea
Enhance crash reports and logging to capture transformers on stack trace elements.
Moved log4j2.xml file to the launcher source set, so it loads first in the client.

Signed-off-by: cpw <cpw+github@weeksfamily.ca>
2019-05-27 00:00:45 -04:00
cpw 5cd82f16f2
Fix #5735 by pushing new build. Shutdown Forge eventbus when errors occur. Closes #5711
Also, improve logging so warnings, errors and fatals are always shown, regardless of marker.

Signed-off-by: cpw <cpw+github@weeksfamily.ca>
2019-05-12 13:07:29 -04:00
cpw 6a1337aa92
Updated a couple of libraries. Fixed bug where modid could be in toml but
not found during loading, yet game continued to load.

Signed-off-by: cpw <cpw+github@weeksfamily.ca>
2019-05-11 20:47:42 -04:00
tterrag 9209c3cbfe
Add new system for model data, replacing extended states (#5564) 2019-05-09 02:10:38 -04:00
tterrag 616416569b Add explicit return type checks for extensible enums, fix exc 2019-04-25 19:51:20 -04:00
tterrag bda3f1b7c6 Make EnumRarity extensible 2019-04-25 19:29:19 -04:00
Ben Staddon aef224221f Better support for custom bows (#5209) 2019-04-23 18:04:19 -04:00
Ben Staddon 18d0f7ba0d Fix up torch placement logic to handle more vanilla special-casing (#5426) 2019-04-23 17:39:50 -04:00
tterrag 67da3182c1 Implement rendering for item models with emissive quads (#5047) 2019-04-12 10:45:32 -04:00
cpw 3f735b715b
Implement API for mods to control their server status response..
Signed-off-by: cpw <cpw+github@weeksfamily.ca>
2019-03-31 16:36:49 -04:00
cpw 4ecb04ed9f
Merge branch 'pull/5636' into 1.13.x 2019-03-30 15:03:48 -04:00
cpw e0e999da0d
Remove redundant method call in Minecraft patch. Also fix a translation
string error (closes #5643)

Signed-off-by: cpw <cpw+github@weeksfamily.ca>
2019-03-25 21:55:33 -04:00
tterrag 2f486f2bdd
Add method to IResourcePack to hide it entirely from the UI (#5525) 2019-03-25 17:24:37 -04:00
JoJoDeveloping 4764136d47
Re-Add the list ping compatibility checker
Signed-off-by: JoJoDeveloping <jojohostert@gmail.com>
2019-03-25 15:15:25 +01:00
LexManos f5375783c6 Do not invalidate caps when entity is being moved across worlds. Should fix #5500 2019-03-19 14:10:29 -07:00
LexManos 8045e48952 Fix NPE in TileEntityPistonRender when class is created to early. 2019-03-17 22:15:52 -07:00
tterrag 1e34f331da Handle null return from ResourcePackInfo.createResourcePack 2019-03-16 01:52:37 -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
ichttt 00845d5252 Add UI for warnings that occurred during loading (#5530) 2019-03-11 15:32:37 -07:00
cpw cbfa572acb
Tweak log4j2 config and allow access to classdump functionality from
modlauncher.

Signed-off-by: cpw <cpw+github@weeksfamily.ca>
2019-03-02 15:31:35 -05: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
tterrag 4abfedea68 Make BannerPattern extensible (#5464) 2019-02-19 12:14:14 -05:00
Ben Staddon 7d971a3262 Remove EnumFacing internal ID maps from AT file (#5526) 2019-02-18 23:16:28 -08:00
cpw e248503b0a
Fix TPS string
Signed-off-by: cpw <cpw+github@weeksfamily.ca>
2019-02-17 15:03:25 -05:00
tterrag 3baa00decb Fix Block$Properties AT for new class name 2019-02-14 23:13:37 -05: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 f6fd800242
Fix up accidental newline removal that broke the console...
Signed-off-by: cpw <cpw+github@weeksfamily.ca>
2019-02-10 16:31:49 -05:00
cpw c6afb2be3f
Move to using Minecrell's terminal logger directly, for better ANSI control and JLine support.
Signed-off-by: cpw <cpw+github@weeksfamily.ca>
2019-02-10 14:35:21 -05:00
cpw 13501a8b05
Make a second logger with colour highlighting and control it with a sysproperty:
forge.logging.colourconsole.level (defaults to off)..

Signed-off-by: cpw <cpw+github@weeksfamily.ca>
2019-02-10 11:45:36 -05:00
m00nl1ght-dev 8084ca43b9 Port CommandEvent and custom entity selectors to 1.13 (#5411) 2019-02-08 17:41:50 -08:00
LexManos 2e5f25d8ae Finish off most old patches, fix issue for mounted entities. 2019-02-08 17:40:07 -08:00
mcenderdragon 6ea19ec8bf Made functional interface IChunkGeneratorFactory public (#5395) 2019-02-06 23:18:47 -08:00
LexManos e8ae18efda Fixed Crosshair attack indicator texture issue Closes #5442
Add friendlier error message for @Mod annotations with missing mods.toml entry. Closes #5440
Remove Log4J console highlighting. As it doesn't work on many consoles, and prints invalid characters. Closes #5420
2019-02-06 18:18:01 -08:00
Girafi 9119e395d4 Added 'create'-method for EnumCreatureType (#5400) 2019-02-04 11:40:03 -08:00
cpw 2918864248
Merge branch 'pull/5405' into 1.13-pre 2019-01-28 20:50:12 -05:00
LexManos b40e2cc59e More old patch work, cleaned up static methods added to ItemStack, and various networking functions. 2019-01-28 16:25:49 -08:00
ichttt ad32b01d85 Reimplement update checker 2019-01-27 21:23:24 +01:00
ichttt c2a7fe4019 Bring back the forge beta warning. Use a check to see if the forge minor version is zero, as ForgeVersion.getStatus() is not implemented 2019-01-27 19:50:59 +01: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
mezz 7d21e5d328
Cherry pick mezz's logging improvements..
Signed-off-by: cpw <cpw+github@weeksfamily.ca>
2019-01-26 21:09:43 -05:00
mcenderdragon d3c9db906f Make ChunkGeneratorType.Settings accessible for modders (#5376) 2019-01-25 11:24:24 -08:00
liach c01b336095 Improves topological sort
This can be used for mod sorting, dependencies between registries, etc.
e.g. https://github.com/MinecraftForge/MinecraftForge/pull/4694#issuecomment-412520302

New features:
Now accepts guava graph
Performance improvement: no longer reverse the graph; changed dfs to bfs
Accepets a comparator for secondary order, e.g. natural order, index by map
Now properly reports all cycles in a graph with Tarjan's strongly connected component algorithm
Adds a test to prove the validity of the sort and cycle detection
Modified build.gradle for test source directory and dependencies

Mod loading changes:
Sort mod file info instead of suppliers (we don't have suppliers instances)
Moves cycle error reporting out of topological sort and into mod sorter
Prevent mod file dependencies between mods that share the same file

Signed-off-by: liach <liach@users.noreply.github.com>
2019-01-21 03:06:27 +00:00
tterrag ff2e35c243
Greatly improve DeferredWorkQueue API (#5357) 2019-01-18 21:10:22 -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
Ben Staddon c1bb5cb250 Patch PotionHelper to use registry delegates (#5142) 2019-01-11 18:32:17 -05:00
David Quintana e98951ee65 Fix blockstate id map calculation. (#5279) 2019-01-11 14:52:30 -08:00
Vincent Lee 849bc00b46 Make Block.Builder methods accessible. Closes #5310 (#5313) 2019-01-11 11:47:51 -08:00