-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Showing
20 changed files
with
847 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
20 changes: 20 additions & 0 deletions
20
src/main/java/com/mmodding/mmodding_lib/library/network/support/type/NetworkBoolean.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
package com.mmodding.mmodding_lib.library.network.support.type; | ||
|
||
import com.mmodding.mmodding_lib.library.network.support.NetworkSupport; | ||
import net.minecraft.network.PacketByteBuf; | ||
import net.minecraft.util.Identifier; | ||
|
||
public class NetworkBoolean extends NetworkPrimitive<Boolean> implements NetworkSupport { | ||
|
||
public static NetworkBoolean of(Boolean value) { | ||
return new NetworkBoolean(value); | ||
} | ||
|
||
private NetworkBoolean(Boolean value) { | ||
super(value, PacketByteBuf::writeBoolean); | ||
} | ||
|
||
static { | ||
NetworkSupport.register(new Identifier("java", "boolean"), NetworkBoolean.class, buf -> NetworkBoolean.of(buf.readBoolean())); | ||
} | ||
} |
20 changes: 20 additions & 0 deletions
20
src/main/java/com/mmodding/mmodding_lib/library/network/support/type/NetworkByte.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
package com.mmodding.mmodding_lib.library.network.support.type; | ||
|
||
import com.mmodding.mmodding_lib.library.network.support.NetworkSupport; | ||
import net.minecraft.network.PacketByteBuf; | ||
import net.minecraft.util.Identifier; | ||
|
||
public class NetworkByte extends NetworkPrimitive<Byte> implements NetworkSupport { | ||
|
||
public static NetworkByte of(byte value) { | ||
return new NetworkByte(value); | ||
} | ||
|
||
private NetworkByte(byte value) { | ||
super(value, PacketByteBuf::writeByte); | ||
} | ||
|
||
static { | ||
NetworkSupport.register(new Identifier("java", "byte"), NetworkByte.class, buf -> NetworkByte.of(buf.readByte())); | ||
} | ||
} |
20 changes: 20 additions & 0 deletions
20
src/main/java/com/mmodding/mmodding_lib/library/network/support/type/NetworkByteArray.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
package com.mmodding.mmodding_lib.library.network.support.type; | ||
|
||
import com.mmodding.mmodding_lib.library.network.support.NetworkSupport; | ||
import net.minecraft.network.PacketByteBuf; | ||
import net.minecraft.util.Identifier; | ||
|
||
public class NetworkByteArray extends NetworkPrimitive<byte[]> implements NetworkSupport { | ||
|
||
public static NetworkByteArray of(byte[] value) { | ||
return new NetworkByteArray(value); | ||
} | ||
|
||
private NetworkByteArray(byte[] value) { | ||
super(value, PacketByteBuf::writeByteArray); | ||
} | ||
|
||
static { | ||
NetworkSupport.register(new Identifier("java", "byte_array"), NetworkByteArray.class, buf -> NetworkByteArray.of(buf.readByteArray())); | ||
} | ||
} |
20 changes: 20 additions & 0 deletions
20
src/main/java/com/mmodding/mmodding_lib/library/network/support/type/NetworkDouble.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
package com.mmodding.mmodding_lib.library.network.support.type; | ||
|
||
import com.mmodding.mmodding_lib.library.network.support.NetworkSupport; | ||
import net.minecraft.network.PacketByteBuf; | ||
import net.minecraft.util.Identifier; | ||
|
||
public class NetworkDouble extends NetworkPrimitive<Double> implements NetworkSupport { | ||
|
||
public static NetworkDouble of(double value) { | ||
return new NetworkDouble(value); | ||
} | ||
|
||
private NetworkDouble(double value) { | ||
super(value, PacketByteBuf::writeDouble); | ||
} | ||
|
||
static { | ||
NetworkSupport.register(new Identifier("java", "double"), NetworkDouble.class, buf -> NetworkDouble.of(buf.readDouble())); | ||
} | ||
} |
20 changes: 20 additions & 0 deletions
20
src/main/java/com/mmodding/mmodding_lib/library/network/support/type/NetworkFloat.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
package com.mmodding.mmodding_lib.library.network.support.type; | ||
|
||
import com.mmodding.mmodding_lib.library.network.support.NetworkSupport; | ||
import net.minecraft.network.PacketByteBuf; | ||
import net.minecraft.util.Identifier; | ||
|
||
public class NetworkFloat extends NetworkPrimitive<Float> implements NetworkSupport { | ||
|
||
public static NetworkFloat of(float value) { | ||
return new NetworkFloat(value); | ||
} | ||
|
||
private NetworkFloat(float value) { | ||
super(value, PacketByteBuf::writeFloat); | ||
} | ||
|
||
static { | ||
NetworkSupport.register(new Identifier("java", "float"), NetworkFloat.class, buf -> NetworkFloat.of(buf.readFloat())); | ||
} | ||
} |
20 changes: 20 additions & 0 deletions
20
src/main/java/com/mmodding/mmodding_lib/library/network/support/type/NetworkIdentifier.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
package com.mmodding.mmodding_lib.library.network.support.type; | ||
|
||
import com.mmodding.mmodding_lib.library.network.support.NetworkSupport; | ||
import net.minecraft.network.PacketByteBuf; | ||
import net.minecraft.util.Identifier; | ||
|
||
public class NetworkIdentifier extends NetworkPrimitive<Identifier> implements NetworkSupport { | ||
|
||
public static NetworkIdentifier of(Identifier value) { | ||
return new NetworkIdentifier(value); | ||
} | ||
|
||
private NetworkIdentifier(Identifier value) { | ||
super(value, PacketByteBuf::writeIdentifier); | ||
} | ||
|
||
static { | ||
NetworkSupport.register(new Identifier("minecraft", "identifier"), NetworkIdentifier.class, buf -> NetworkIdentifier.of(buf.readIdentifier())); | ||
} | ||
} |
20 changes: 20 additions & 0 deletions
20
src/main/java/com/mmodding/mmodding_lib/library/network/support/type/NetworkInteger.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
package com.mmodding.mmodding_lib.library.network.support.type; | ||
|
||
import com.mmodding.mmodding_lib.library.network.support.NetworkSupport; | ||
import net.minecraft.network.PacketByteBuf; | ||
import net.minecraft.util.Identifier; | ||
|
||
public class NetworkInteger extends NetworkPrimitive<Integer> implements NetworkSupport { | ||
|
||
public static NetworkInteger of(int value) { | ||
return new NetworkInteger(value); | ||
} | ||
|
||
private NetworkInteger(int value) { | ||
super(value, PacketByteBuf::writeVarInt); | ||
} | ||
|
||
static { | ||
NetworkSupport.register(new Identifier("java", "integer"), NetworkInteger.class, buf -> NetworkInteger.of(buf.readVarInt())); | ||
} | ||
} |
20 changes: 20 additions & 0 deletions
20
...main/java/com/mmodding/mmodding_lib/library/network/support/type/NetworkIntegerArray.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
package com.mmodding.mmodding_lib.library.network.support.type; | ||
|
||
import com.mmodding.mmodding_lib.library.network.support.NetworkSupport; | ||
import net.minecraft.network.PacketByteBuf; | ||
import net.minecraft.util.Identifier; | ||
|
||
public class NetworkIntegerArray extends NetworkPrimitive<int[]> implements NetworkSupport { | ||
|
||
public static NetworkIntegerArray of(int[] value) { | ||
return new NetworkIntegerArray(value); | ||
} | ||
|
||
private NetworkIntegerArray(int[] value) { | ||
super(value, PacketByteBuf::writeIntArray); | ||
} | ||
|
||
static { | ||
NetworkSupport.register(new Identifier("java", "int_array"), NetworkIntegerArray.class, buf -> NetworkIntegerArray.of(buf.readIntArray())); | ||
} | ||
} |
21 changes: 21 additions & 0 deletions
21
src/main/java/com/mmodding/mmodding_lib/library/network/support/type/NetworkItemStack.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
package com.mmodding.mmodding_lib.library.network.support.type; | ||
|
||
import com.mmodding.mmodding_lib.library.network.support.NetworkSupport; | ||
import net.minecraft.item.ItemStack; | ||
import net.minecraft.network.PacketByteBuf; | ||
import net.minecraft.util.Identifier; | ||
|
||
public class NetworkItemStack extends NetworkPrimitive<ItemStack> implements NetworkSupport { | ||
|
||
public static NetworkItemStack of(ItemStack value) { | ||
return new NetworkItemStack(value); | ||
} | ||
|
||
private NetworkItemStack(ItemStack value) { | ||
super(value, PacketByteBuf::writeItemStack); | ||
} | ||
|
||
static { | ||
NetworkSupport.register(new Identifier("minecraft", "itemstack"), NetworkItemStack.class, buf -> NetworkItemStack.of(buf.readItemStack())); | ||
} | ||
} |
Oops, something went wrong.