aboutsummaryrefslogtreecommitdiff
path: root/src/main/java/kubatech/api/network
diff options
context:
space:
mode:
authorJason Mitchell <mitchej@gmail.com>2023-01-28 19:03:53 -0800
committerJason Mitchell <mitchej@gmail.com>2023-01-28 19:03:53 -0800
commitf51616bda220887fdd45c4bc951ff59e3398213a (patch)
tree35fdbb15b4c7ea0282773a388eff517a1d09d941 /src/main/java/kubatech/api/network
parent11216d666cbc30fc1e1dfc84e1e0c2f4252b1fc2 (diff)
downloadGT5-Unofficial-f51616bda220887fdd45c4bc951ff59e3398213a.tar.gz
GT5-Unofficial-f51616bda220887fdd45c4bc951ff59e3398213a.tar.bz2
GT5-Unofficial-f51616bda220887fdd45c4bc951ff59e3398213a.zip
[ci skip] spotlessApply with the new settings
Diffstat (limited to 'src/main/java/kubatech/api/network')
-rw-r--r--src/main/java/kubatech/api/network/CustomTileEntityPacket.java42
-rw-r--r--src/main/java/kubatech/api/network/LoadConfigPacket.java36
2 files changed, 34 insertions, 44 deletions
diff --git a/src/main/java/kubatech/api/network/CustomTileEntityPacket.java b/src/main/java/kubatech/api/network/CustomTileEntityPacket.java
index 334ff091aa..551110a107 100644
--- a/src/main/java/kubatech/api/network/CustomTileEntityPacket.java
+++ b/src/main/java/kubatech/api/network/CustomTileEntityPacket.java
@@ -1,24 +1,25 @@
/*
- * KubaTech - Gregtech Addon
- * Copyright (C) 2022 - 2023 kuba6000
- *
- * This library is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Lesser General Public
- * License as published by the Free Software Foundation; either
- * version 3 of the License, or (at your option) any later version.
- *
- * This library is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public License
- * along with this library. If not, see <https://www.gnu.org/licenses/>.
- *
+ * KubaTech - Gregtech Addon Copyright (C) 2022 - 2023 kuba6000 This library is free software; you can redistribute it
+ * and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software
+ * Foundation; either version 3 of the License, or (at your option) any later version. This library is distributed in
+ * the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. You should have
+ * received a copy of the GNU Lesser General Public License along with this library. If not, see
+ * <https://www.gnu.org/licenses/>.
*/
package kubatech.api.network;
+import java.nio.charset.StandardCharsets;
+
+import kubatech.api.tileentity.CustomTileEntityPacketHandler;
+import kubatech.api.utils.ModUtils;
+import kubatech.kubatech;
+
+import net.minecraft.client.Minecraft;
+import net.minecraft.tileentity.TileEntity;
+import net.minecraft.world.World;
+
import cpw.mods.fml.common.network.NetworkRegistry;
import cpw.mods.fml.common.network.simpleimpl.IMessage;
import cpw.mods.fml.common.network.simpleimpl.IMessageHandler;
@@ -27,15 +28,9 @@ import gregtech.api.interfaces.metatileentity.IMetaTileEntity;
import gregtech.api.interfaces.tileentity.IGregTechTileEntity;
import io.netty.buffer.ByteBuf;
import io.netty.buffer.Unpooled;
-import java.nio.charset.StandardCharsets;
-import kubatech.api.tileentity.CustomTileEntityPacketHandler;
-import kubatech.api.utils.ModUtils;
-import kubatech.kubatech;
-import net.minecraft.client.Minecraft;
-import net.minecraft.tileentity.TileEntity;
-import net.minecraft.world.World;
public class CustomTileEntityPacket implements IMessage {
+
public int w, x, y, z;
public final ByteBuf customdata = Unpooled.buffer();
@@ -125,6 +120,7 @@ public class CustomTileEntityPacket implements IMessage {
}
public static class Handler implements IMessageHandler<CustomTileEntityPacket, IMessage> {
+
@Override
public IMessage onMessage(CustomTileEntityPacket message, MessageContext ctx) {
if (!ModUtils.isClientSided) return null;
diff --git a/src/main/java/kubatech/api/network/LoadConfigPacket.java b/src/main/java/kubatech/api/network/LoadConfigPacket.java
index 0c9015de12..04a8f68770 100644
--- a/src/main/java/kubatech/api/network/LoadConfigPacket.java
+++ b/src/main/java/kubatech/api/network/LoadConfigPacket.java
@@ -1,35 +1,27 @@
/*
- * KubaTech - Gregtech Addon
- * Copyright (C) 2022 - 2023 kuba6000
- *
- * This library is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Lesser General Public
- * License as published by the Free Software Foundation; either
- * version 3 of the License, or (at your option) any later version.
- *
- * This library is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public License
- * along with this library. If not, see <https://www.gnu.org/licenses/>.
- *
+ * KubaTech - Gregtech Addon Copyright (C) 2022 - 2023 kuba6000 This library is free software; you can redistribute it
+ * and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software
+ * Foundation; either version 3 of the License, or (at your option) any later version. This library is distributed in
+ * the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. You should have
+ * received a copy of the GNU Lesser General Public License along with this library. If not, see
+ * <https://www.gnu.org/licenses/>.
*/
package kubatech.api.network;
-import cpw.mods.fml.common.network.simpleimpl.IMessage;
-import cpw.mods.fml.common.network.simpleimpl.IMessageHandler;
-import cpw.mods.fml.common.network.simpleimpl.MessageContext;
-import io.netty.buffer.ByteBuf;
import java.nio.charset.StandardCharsets;
import java.util.HashMap;
import java.util.HashSet;
+
import kubatech.config.Config;
import kubatech.config.OverridesConfig;
import kubatech.kubatech;
import kubatech.loaders.MobRecipeLoader;
+import cpw.mods.fml.common.network.simpleimpl.IMessage;
+import cpw.mods.fml.common.network.simpleimpl.IMessageHandler;
+import cpw.mods.fml.common.network.simpleimpl.MessageContext;
+import io.netty.buffer.ByteBuf;
public class LoadConfigPacket implements IMessage {
@@ -54,7 +46,8 @@ public class LoadConfigPacket implements IMessage {
byte[] sbytes = new byte[buf.readInt()];
buf.readBytes(sbytes);
mobsOverrides.put(
- new String(sbytes, StandardCharsets.UTF_8), OverridesConfig.MobOverride.readFromByteBuf(buf));
+ new String(sbytes, StandardCharsets.UTF_8),
+ OverridesConfig.MobOverride.readFromByteBuf(buf));
}
}
}
@@ -81,6 +74,7 @@ public class LoadConfigPacket implements IMessage {
}
public static class Handler implements IMessageHandler<LoadConfigPacket, IMessage> {
+
@Override
public IMessage onMessage(LoadConfigPacket message, MessageContext ctx) {
kubatech.info("Received Mob Handler config, parsing");