mirror of
https://github.com/GTNewHorizons/Mantle.git
synced 2026-11-28 07:35:44 +00:00
Expand syncing capabilities
This commit is contained in:
1 parent
e328399520
commit
339941cac2
2 files changed
+24
-1
No files matched your search
@@ -21,7 +21,7 @@ public abstract class AbstractConfigSyncPacket extends AbstractPacket {
|
||||
|
||||
@Override
|
||||
public IMessage handleClient(NetHandlerPlayClient netHandler) {
|
||||
AbstractConfig.syncConfig(getConfig(), config);
|
||||
sync();
|
||||
return null;
|
||||
}
|
||||
|
||||
@@ -31,6 +31,11 @@ public abstract class AbstractConfigSyncPacket extends AbstractPacket {
|
||||
throw new UnsupportedOperationException("Trying to sync client configs to the server. You registered the packet for the wrong side.");
|
||||
}
|
||||
|
||||
protected boolean sync() {
|
||||
return AbstractConfig.syncConfig(getConfig(), config);
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public void fromBytes(ByteBuf buf) {
|
||||
config = new ArrayList<>();
|
||||
|
||||
Reference in new issue
Block a user