Commit graph

2000 commits

Author SHA1 Message Date
bl4ckscor3
5d62261082 Fix RawMouseEvent not being cancelable (#6310) 2019-11-12 15:12:25 -08:00
DaemonUmbra
f4a85e5f03 Fixed an NPE caused by missing registries. (#6292)
Missing registries in this case being registries renamed without proper remapping or created by mods that were removed.
2019-11-05 11:10:32 -08:00
DaemonUmbra
7f8b30aed3 Made the slash optional in fml confirm/cancel. (#6282) 2019-11-05 11:10:19 -08:00
LexManos
b8ea220925 Fix registry snapshots not reading aliases correctly. Closes #6298 2019-11-05 11:10:03 -08:00
cpw
1e1644f6d4
A few tweaks to things. Make the mods command a bit better, make the
IndexedMessageCodec actually log which network channel it got back packets
on. Also, improve the custom directorymodlocator with actual custom names,
finally, allow up to 99 log rollovers, up from 7 default (this means a
repeatedly crashing server is less likely to roll out the log of the first
crash).

Signed-off-by: cpw <cpw+github@weeksfamily.ca>
2019-11-03 12:33:07 -05:00
tterrag
fab4ce894a Fix BlockStateProvider#horizontalBlock emitting rotations >=360 2019-11-01 17:10:06 -04:00
Camilo
f2f7ab80f6 Added some more biome types to BiomeDictionary (#6250) 2019-11-01 11:26:08 -07:00
DaemonUmbra
c044f3b0c4 Replaced getTypes invocation in ensureHasTypes with a direct reference to types, preventing infinite recursion (#6284)
The direct reference is checked via ternary and reports if the set is empty, this is likely to result in log spam if modders don't assign types to their biomes
2019-11-01 11:24:00 -07:00
tterrag
ebd463e92f Fix lang generator escaping newlines, add lang generator test 2019-10-30 15:25:03 -04:00
tterrag
69ba974960 Escape control chars and unicode when writing out lang datagen 2019-10-30 15:01:25 -04:00
tterrag
dbee8a24d8 Allow LanguageProvider helpers to accept suppliers of subtypes 2019-10-28 21:23:01 -04:00
cpw
862289cf56
Handle logging during shutdown better on the server, by not
closing the logfile before the server itself has shutdown.

Signed-off-by: cpw <cpw+github@weeksfamily.ca>
2019-10-26 16:55:15 -04:00
LexManos
3484200f80 Make Loot Table data generators more reusable for modders. 2019-10-24 22:09:08 -07:00
tterrag
acaa470dea
Add Blockstate and Model data providers (#6241) 2019-10-24 22:33:24 -04:00
AfterRebelion
ca8a418364 Exclude Cobblestone slabs and wall recipes (#6230) 2019-10-22 15:31:35 -07:00
Wyn Price
6422310453 Fixed forge rendering pipeline and shape based light occulsion. (#6178) 2019-10-22 15:29:27 -07:00
cpw
c8967fa176
Expose the registrationchange event to simple channel (not that anyone should care, but who knows?)
Also, Context.getNetworkManager should have been public. Derp.

Signed-off-by: cpw <cpw+github@weeksfamily.ca>
2019-10-18 09:32:44 -04:00
cpw
dc664ba597
Add in an event to expose the standard MC channel stuff to network
event channels that care about such things. Mods using simplechannel
don't need to care.

Also, put a sync wrapper around crashreportextender, so it doesn't
die sometimes randomly during startup.

Signed-off-by: cpw <cpw+github@weeksfamily.ca>
2019-10-17 20:28:39 -04:00
David Quintana
ec3e8c2039 Fix vanilla models with parents not loading properly from forge blockstates. 2019-10-16 23:11:23 +02:00
ichttt
6c8342b74e Fixed loading error/warning screen not showing (#6218) 2019-10-15 14:59:41 -07:00
JoJoModding
8adc546d92 Allow mods actually to have their own usable config gui (#6208) 2019-10-15 14:56:27 -07:00
ichttt
c98abaaa42 Fix some config checks still using the old fields (#6193) 2019-10-15 14:54:47 -07:00
Justin
a328364999 Fix mod info panel rendering incorrectly on some systems with HiDPI displays (pesky macs) (#6170) 2019-10-15 14:31:41 -07:00
FireController1847
94cbf72e39 Re-add PlayerGiveXpEvent & PlayerChangeLevelEvent (#6165) 2019-10-14 10:37:44 -07:00
Wyn Price
5978670897 Fixed IModelData not being cleared when tile entity is removed (#6115) 2019-10-10 23:07:52 -04:00
tterrag
940bbc4e91 Better sanity checks in ModelDataManager 2019-10-10 16:02:36 -04:00
Vincent Lee
7070bd0340 Make customClientFactory optional again (#6191) 2019-10-10 11:23:27 -07: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
cpw
9c759294c6
Add a super early GUI for showing pre-game launch messages from FML. NOTE: this cannot show on MAC because MAC can't handle
off-thread GUIs in any way shape or form, and we need the main thread to do real work.

Fix forge fading in wrongly.

Signed-off-by: cpw <cpw+github@weeksfamily.ca>
2019-10-05 17:03:02 -04:00
David Quintana
b294f4d894
New round of fluid system fixes: (#6175)
- Fix race condition lazy-initializing flowing fluid block data.
- Fix typo in ItemTextureQuadConverter that prevents certain animated textures from being used in the fluid bucket.
- Fix calls to onContentsChanged in FluidTank.
- Fix FluidUtil.tryEmptyContainer logic when simulating.
- Fix EmptyFluidHandler.fill returning the wrong number.
2019-10-05 19:49:26 +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
cpw
8482293b40
Split server and client side pack locators apart and move them to their
respective behavioural components. This should facilitate fixing the
server pack data pack ordering, as well as other new features of mod
resource packs.

Signed-off-by: cpw <cpw+github@weeksfamily.ca>
2019-10-04 15:24:15 -04:00
LexManos
dc5a06aab4 Fix dimension types being incorrect when connecting to a non-Forge server. Closes #6203 2019-10-04 10:36:50 -07:00
cpw
35bd69808c
Fix the stupid derp that broke singleplayer dims. Don't send the dim packet
to the local client - it is not needed because obviously not. Seems to have
fixed the problem. Probably infinity new bugs by this.

Signed-off-by: cpw <cpw+github@weeksfamily.ca>
2019-10-04 07:27:11 -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
cpw
48735c3946
Properly propagate the DimensionType information from server to client
at client connection time. This means the client now knows about the
dimensiontype properly and can access the ModDimension information on
the client.

Signed-off-by: cpw <cpw+github@weeksfamily.ca>
2019-10-02 21:54:02 -04:00
Ruben Taelman
c985225d0c Fix FluidTank with empty contents throwing error if drained (#6196) 2019-10-01 19:57:05 -07:00
tterrag
b3631b707c Make patched-in StairsBlock constructor public
Also fix supplier generic being too narrow in DeferredRegister#register
2019-09-27 17:56:30 -04:00
tterrag
476b7056fb Usability improvements to RegistryObject/DeferredRegister 2019-09-25 18:01:39 -04:00
tterrag
01a862db30 Fix sea level not being available on client, move hook to Dimension 2019-09-23 13:08:26 -04:00
tterrag
571ecafdbc Fix type bound on GameRegistry.findRegistry being too narrow 2019-09-21 16:19:23 -04:00
tterrag
dee844e232 Add IExtensibleEnum#init, extend FillerBlockType/PlacementBehaviour 2019-09-21 15:57:32 -04:00
cpw
07bcff5067
Tag the deprecation of DeferredWorkQueue. I think this is causing confusion
as to scope. Its functionality will be tied to the events in future -
so mods can request the deferred work through methods on the Mod Lifecycle
events directly. The API will be coming soon.

Signed-off-by: cpw <cpw+github@weeksfamily.ca>
2019-09-17 21:41:08 -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
Brennan Ward
af8074cc39 Post tag event directly from reloader thread (#6164) 2019-09-17 14:39:36 -07:00
cpw
71a4828809
Some tweaks around the code base. A functional consumer for networking - return a bool from your consumer function, rather than setPacketHandled.
Tweak the server modloading behaviour to try and be a bit clearer that a mod errored.

Signed-off-by: cpw <cpw+github@weeksfamily.ca>
2019-09-16 20:14:25 -04:00
Brennan Ward
79ce18ac3e Update furnace fuels to not recreate it's list every query, and update when tags are reloaded. Add Tag update events. (#6140) 2019-09-16 14:04:32 -07:00
Nightenom
bb83e11a7c Maintain default behavior for Item#canPlayerBreakBlockWhileHolding() (#6128) 2019-09-16 13:36:43 -07:00
MrCrayfish
f4215d121c Reimplemented "MouseEvent" as RawMouseEvent for 1.14.X (#6144) 2019-09-16 13:03:10 -07:00
LexManos
3cc76a3f60 Fix Entity.getPersistentData function name. Closes #6131
Bump spec version for first 1.14.4 RB.
2019-09-12 09:12:30 -07:00
David Quintana
58335d7bc0
Minor fixes to the fluids (#6150)
* Fixed vanilla rendering of fluids to take into account the alpha bits of the color, and fix usages accordingly.
* Fixed missing texture derp.
2019-09-12 17:33:19 +02: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
LexManos
281ef5a152 Add new DeferredRegistry helper, and change RegistryObject to update when overrides are registered. 2019-09-10 16:02:07 -07:00
tterrag
f777aba227 Remove StructureArgument to work around vanilla issue, clean up custom arguments 2019-09-08 02:01:17 -04: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
LexManos
3ef1d6919c Fix REGISTER packet encode/decode issues.
Changed ForgeConfig values to return the default value if the config is not loaded, and exposed the value objects as a internal config.
2019-09-05 15:38:14 -07:00
LexManos
e1863383ff Fix naming conflicts with official names. 2019-09-04 22:33:17 -07:00
LexManos
4dc34b7d5b Fix item used stat not triggering properly on last item in the stack. 2019-09-03 19:58:57 -07:00
LexManos
2c8c022034 Add a bunch of tags from the omnibus.
Fix test imports. And update patches for line numbers.
2019-09-03 18:51:09 -07:00
bl4ckscor3
b5b43a5a36 Add spawn reason to spawn events (#6096) 2019-09-03 15:15:48 -07:00
Wire Segal
c09fe57031 Add collisionExtendsVertically hook to allow modded blocks that extend collision into the block above similar to fences. (#6092) 2019-09-03 14:50:27 -07:00
ichttt
ddb90a69d3 Fix CME on chunk unload in FarmlandTicketManager (#5998) 2019-09-03 12:59:35 -07:00
cpw
bdce8d0494
Add a modfolderfactory. Fix up login payload exposure.
Signed-off-by: cpw <cpw+github@weeksfamily.ca>
2019-09-01 14:40:39 -04:00
cpw
a4aa85259e
Add in some client only player connectivity events. Closes #5536
Signed-off-by: cpw <cpw+github@weeksfamily.ca>
2019-08-31 13:55:46 -04:00
cpw
ea1c7a7339
Add in MC REGISTER nonsense. Shut up #5730
Tweak network a bit to fix initialization order stupidity. (Constants don't
load classes!)

Signed-off-by: cpw <cpw+github@weeksfamily.ca>
2019-08-31 13:55:46 -04:00
GirafiStudios
26e4bf92a0
Added getters for FMLPlayMessages.SpawnEntity 2019-08-31 13:55:46 -04:00
cpw
68cb017be1
Move indexFor and biConsumer into FMLHandshakeHandler and expose them publicly, so mods can add additional
login messages. Closes #6087

Signed-off-by: cpw <cpw+github@weeksfamily.ca>
2019-08-31 13:55:45 -04:00
David Quintana
68ff1afac1
Hookup BlockEvent.FluidPlaceBlockEvent (#6103) 2019-08-31 14:15:08 +02:00
David Quintana
d9f6659f2c
Fluid rework derp fixes. (#6098)
* Fix nulls returning from non-null methods, and null-check of non-nullable values.
* Fix missed computation of the isEmpty flag in FluidStack
* Cleanup getAmount/isEmpty calls.
* Remove redundant suppliers. That info is readily available from the vanilla Fluid / FluidState.
2019-08-29 21:09:42 +02:00
Vincent Lee
bae2ee0420 Minor model system cleanup/documentation (#6089) 2019-08-28 21:33:49 -07:00
ichttt
06c3e255b3 Add a config comment that lists the available constants of enums (#6079) 2019-08-28 21:28:21 -07:00
Daniël Goossens
c83d4d29e4 Added new InputEvent.MouseScrollEvent, fixes #5811 (#6037) 2019-08-28 21:13:31 -07:00
Brennan Ward
ee1c06085b Add Villager Trading Events (#6016) 2019-08-28 20:34:07 -07:00
Wyn Price
95c58ba75c Updated constants to 1.14 (#6012) 2019-08-28 20:13:47 -07:00
Vincent Lee
838998b885 Add particle factory registration event (#6018) 2019-08-28 18:42:17 -07:00
David Quintana
a9b3b48273 Make FluidStacks non-nullable, and implement some TODOs. 2019-08-29 03:18:42 +02:00
David Quintana
b7e1cc5f6b Fluid API rework (#5983)
- Moved forge fluids into FluidAttributes companion object to the vanilla Fluid. By gigaherz
- Redesigned the Fluid API to be closer to the Items API. By King Lemming
Co-authored-by: King Lemming <kinglemming@gmail.com>
2019-08-29 03:18:41 +02:00
LexManos
e784a7f606 Recipe system cleanup. (#6014) 2019-08-29 03:18:41 +02:00
LexManos
7deb479676 Fix blocks being placed in adventure mode. Closes #6085
Add early error for setting invalid world directory. Closes #6084
Fix PlayerTickEvent not firing when dead, even if player isn't removed from world yet. Closes #6074
Fix PlayerDestroyItemEvent not firing for some cases. Closes #6067
2019-08-28 12:57:25 -07:00
LexManos
1ab40e0b3f Fix Javac generics breakage. 2019-08-20 15:40:36 -07:00
LexManos
283c3d1664 Prevent worlds from unloading while players are in out-of-world states by tracking all worlds references by every player in the server's player list. 2019-08-20 15:31:08 -07:00
LexManos
5291ea7270 Add Argument serializer for ModIdArgument. EnumArgument can't as vanilla doesn't support extra data. 2019-08-20 15:29:26 -07:00
LexManos
0c1c1b65e1 Sort server.properties while writing. 2019-08-20 15:27:31 -07:00
LexManos
dc0eacb80f Fix Configs not generating correctly on first load Closes #6069 2019-08-19 19:45:32 -07:00
Vincent Lee
8c04651301 Add hook to load custom mrls/rls not attached to a block or item. (#6010) 2019-08-15 11:03:57 -07:00
kirderf1
5e392e3300 Make DimensionManager.SavedEntry save sky light consistently (#6019) 2019-08-15 10:17:28 -07:00
cpw
4323c6d845
Grrr. Stupid error. Sorry lex: I fixed it.
Signed-off-by: cpw <cpw+github@weeksfamily.ca>
2019-08-05 08:56:42 -04:00
cpw
81ec8b99ac
Actually reload config when it changes on disk. Closes #5541 and #5959
Signed-off-by: cpw <cpw+github@weeksfamily.ca>
2019-08-04 22:37:43 -04:00
cpw
1af7b7603d
Move fml's PlayerEvent and TickEvent to forge. Update
`import net.minecraftforge.fml.common.gameevent.PlayerEvent;`
to
`import net.minecraftforge.event.entity.player.PlayerEvent;`
and
`import net.minecraftforge.fml.common.gameevent.TickEvent;`
to
`import net.minecraftforge.event.TickEvent;`

Signed-off-by: cpw <cpw+github@weeksfamily.ca>
2019-08-04 22:34:14 -04:00
cpw
0fd8fa2211
Bump modlauncher to 3.2.x. Add a sender modid and document IMC. Closes #5746
Signed-off-by: cpw <cpw+github@weeksfamily.ca>
2019-08-04 22:19:02 -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
DaemonUmbra
44f3f9e2d0 Fix a crash I caused by misunderstanding formatToString (#6007) 2019-08-02 18:48:46 -07:00
its_meow
50e411b82a Add piston events (#5798) 2019-08-02 14:12:21 -07:00
JoJoModding
c7940e70ed Add button to open mods folder (#5986) 2019-08-02 14:00:54 -07:00
DaemonUmbra
58ede2c80a Change ModLoadingException to display ModID instead of ModInfo instance identifier. (#5999) 2019-08-02 13:44:56 -07:00
Gamebuster
9a50c208f0 Fixed Buttons in the error screen are incorrectly rendered if they are extremely long Closes #5687 (#5924) 2019-08-02 13:42:58 -07:00
Gamebuster
7acb380ba8 Fix LazyOptional throwing NPE to consumers when owners null. (#5772) 2019-08-02 13:42:13 -07:00
LexManos
48fa2f458c Make Villager profession unlocalized name use modids when not 'minecraft' Closes #5977
Fixed trees able to be generated through water. Closes #6000
Change Block#toString to use getRegistryName instead of getNameForObject Closes #5937
Allow Cooking Recipes to deserialize results with stack sizes. Closes #5960
2019-08-02 13:37:02 -07: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