Commit Graph

83 Commits

Author SHA1 Message Date
LexManos f101700969 Fix FML's Config Sync packet not allowing same length filenames in encoder and decoder. Closes #7584 2021-01-05 11:50:05 -08:00
diesieben07 acd18455c2
Workaround for modded attributes on vanilla entities logging warnings on vanilla clients
Switch to a handler-based approach per packet class, simplify patch, add some docs

Add license header and docs

Switch to a network handler based approach

Switch to a network handler based approach

revert build gradle change

Simplify Packet patch

Add license header to IForgePacket

Revert ForgeHooks changes

Less hacky and more generic way to filter packets for vanilla connections

_Actually_ Order SAS.
It's early

Order SAS

simplify vanilla connection check

Remove unneeded import change
2020-11-03 18:47:04 -05:00
David Quintana 53eedb0f10
Update forge mappings to 20201028-1.16.3 (#7435) 2020-10-29 01:11:57 +01:00
Richard Freimer af75547d37
Fix a few minor issues with custom tag types and fix OptionalNamedTags (#7316) 2020-09-23 20:12:11 -07:00
LexManos c75eb9e7cf 1.16.3 Update
Also included a bunch of warning cleanups.
2020-09-10 12:01:45 -07:00
Richard Freimer 45f8dc5245
Add support for custom tag types (#7289) 2020-09-08 19:10:36 -07:00
David Quintana 517bbc8b5b Update copyright year to 2020. 2020-07-02 19:49:11 +02:00
covers1624 80eb12e59d
Compiling fixes - IN GAME! 2020-06-25 17:55:52 -04:00
cpw 6d15febdb3
Setup and import of 1.16 YEET 2020-06-25 17:55:38 -04:00
DaemonUmbra 2ce4f5ece5
Updated ForgeDev MCP Mapping Version (#6532) 2020-02-25 19:45:14 -08:00
cpw aca45340bf
Fix up alarming security crisis with network handling that allowed for wrong code execution on the server, resulting in CRASHED SERVERS. AWFUL stuff.
Also fixed a silly log message from the login handler.

This change introduces a mechanism to direct certain packets to only process on one side or another. Invalid sidedness will result in the connection being terminated.

Signed-off-by: cpw <cpw+github@weeksfamily.ca>
2020-02-23 22:15:34 -05:00
LexManos 1933d05e36 Update to 1.15
Due to the massive rendering changes, certain features, such as emissive item rendering and the forge block rendering/lighting pipeline are currently disabled.

Co-authored-by: David Quintana <gigaherz@gmail.com>
Co-authored-by: tterrag <tterrag1098@gmail.com>
Co-authored-by: Unnoen <theunnoen@gmail.com>
2019-12-17 03:38:12 +01: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
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
Vincent Lee 7070bd0340 Make customClientFactory optional again (#6191) 2019-10-10 11:23:27 -07: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
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
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
LexManos 281ef5a152 Add new DeferredRegistry helper, and change RegistryObject to update when overrides are registered. 2019-09-10 16:02:07 -07: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
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 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
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 c8e5007913
Remove legacy StartupProgress.
Implement properly scalable progress thanks to @gigaherz. Closes #5863.
Implement API for pushing messages to the startup screen from mods.
Add memory display.

Signed-off-by: cpw <cpw+github@weeksfamily.ca>
2019-06-30 23:48:54 -04: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
tterrag d5ee80a70a Add IContainerFactory for reading custom container data on the client 2019-06-10 18:14:49 -04: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
cpw 9fa4641cb0
Update mappings
Signed-off-by: cpw <cpw+github@weeksfamily.ca>
2019-06-08 10:45:28 -04:00
LexManos a7df63e1a1
Update to 1.14.2 2019-06-07 16:50:47 -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
JoJoDeveloping 7e4101b3ad
Remove game registry comparsion from list ping
Signed-off-by: JoJoDeveloping <jojohostert@gmail.com>
2019-03-25 22:22:29 +01:00
cpw d8d30e1f82
Defer configuration of channel until it is actually available during
connection. Closes #5626

Signed-off-by: cpw <cpw+github@weeksfamily.ca>
2019-03-25 17:20:44 -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
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
its_meow ff6fa31b1d Fix entity spawn packet pitch (reversed yaw/pitch) (#5603) 2019-03-13 12:53:48 -07:00
LexManos 7bd7b059c4 Make userdev parse out the classifier for the Forge jar that is on the classpath.
Should fix debugging Minecraft at dev time.
2019-03-06 12:06:49 -08:00
cpw 230d69b772
Tidy up network initialization, and force it to classload early in
modloading lifecycle. Closes #5576

Signed-off-by: cpw <cpw+github@weeksfamily.ca>
2019-03-04 08:22:46 -05:00
cpw 3c73dc2d0b
Put both LogicalSides on NetworkDirection:
Origination (where it came from) and Reception (where it arrived at).

Signed-off-by: cpw <cpw+github@weeksfamily.ca>
2019-02-28 21:39:36 -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
cpw cb70702ab5
Handle differing network versions for FML gracefully?
Signed-off-by: cpw <cpw+github@weeksfamily.ca>
2019-02-28 00:59:27 -05:00
cpw dd7e7fc122
Try to fix #5573 by peeling the worldclient fetch into a separate handler.
Signed-off-by: cpw <cpw+github@weeksfamily.ca>
2019-02-27 13:45:51 -05:00
cpw 2a4e05c982
Allow vanilla connections properly, and allow mods to decide.
Signed-off-by: cpw <cpw+github@weeksfamily.ca>
2019-02-24 13:52:26 -05:00
cpw 8d1ff45c71
Fix GUI packet dispatch, add additional blockpos helper for common usecase.
Signed-off-by: cpw <cpw+github@weeksfamily.ca>
2019-02-24 11:51:53 -05:00