Permalink
Show file tree
Hide file tree
6 changes: 3 additions & 3 deletions
6
src/main/scala/net/bdew/lib/multiblock/data/OutputConfigFluid.scala
6 changes: 3 additions & 3 deletions
6
src/main/scala/net/bdew/lib/multiblock/data/OutputConfigFluidSlots.scala
6 changes: 3 additions & 3 deletions
6
src/main/scala/net/bdew/lib/multiblock/data/OutputConfigItems.scala
6 changes: 3 additions & 3 deletions
6
src/main/scala/net/bdew/lib/multiblock/data/OutputConfigPower.scala
4 changes: 2 additions & 2 deletions
4
src/main/scala/net/bdew/lib/multiblock/gui/WidgetRSConfig.scala
14 changes: 11 additions & 3 deletions
14
src/main/scala/net/bdew/lib/multiblock/network/MultiblockNetHandler.scala
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Browse files
Browse the repository at this point in the history
reworked custom network code to not use java serialization
- Loading branch information
Showing
14 changed files
with
70 additions
and
66 deletions.
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
6 changes: 3 additions & 3 deletions
6
src/main/scala/net/bdew/lib/multiblock/data/OutputConfig.scala
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
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
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
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
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
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
6 changes: 3 additions & 3 deletions
6
src/main/scala/net/bdew/lib/multiblock/network/MsgOutputCfg.scala
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 |
|---|---|---|
| @@ -1,5 +1,5 @@ | ||
| package net.bdew.lib.multiblock.network | ||
|
|
||
| trait MsgOutputCfgPayload extends Serializable | ||
|
|
||
| case class MsgOutputCfg(output: Int, payload: MsgOutputCfgPayload) extends MultiblockNetHandler.Message | ||
| trait MsgOutputCfg { | ||
| def output: Int | ||
| } |
13 changes: 12 additions & 1 deletion
13
src/main/scala/net/bdew/lib/multiblock/network/MsgOutputCfgRSMode.scala
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 |
|---|---|---|
| @@ -1,5 +1,16 @@ | ||
| package net.bdew.lib.multiblock.network | ||
|
|
||
| import net.bdew.lib.misc.RSMode | ||
| import net.minecraft.network.PacketBuffer | ||
|
|
||
| case class MsgOutputCfgRSMode(rsMode: RSMode.Value) extends MsgOutputCfgPayload | ||
| case class MsgOutputCfgRSMode(output: Int, rsMode: RSMode.Value) extends MultiblockNetHandler.Message with MsgOutputCfg | ||
|
|
||
| object CodecOutputCfgRSMode extends MultiblockNetHandler.Codec[MsgOutputCfgRSMode] { | ||
| override def encodeMsg(m: MsgOutputCfgRSMode, p: PacketBuffer): Unit = { | ||
| p.writeVarInt(m.output) | ||
| p.writeByte(m.rsMode.id) | ||
| } | ||
|
|
||
| override def decodeMsg(p: PacketBuffer): MsgOutputCfgRSMode = | ||
| MsgOutputCfgRSMode(p.readVarInt(), RSMode(p.readByte())) | ||
| } |
15 changes: 14 additions & 1 deletion
15
src/main/scala/net/bdew/lib/multiblock/network/MsgOutputCfgSlot.scala
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 |
|---|---|---|
| @@ -1,3 +1,16 @@ | ||
| package net.bdew.lib.multiblock.network | ||
|
|
||
| case class MsgOutputCfgSlot(slot: String) extends MsgOutputCfgPayload | ||
| import net.minecraft.network.PacketBuffer | ||
|
|
||
| case class MsgOutputCfgSlot(output: Int, slot: String) extends MultiblockNetHandler.Message with MsgOutputCfg | ||
|
|
||
| object CodecOutputCfgSlot extends MultiblockNetHandler.Codec[MsgOutputCfgSlot] { | ||
| override def encodeMsg(m: MsgOutputCfgSlot, p: PacketBuffer): Unit = { | ||
| p.writeVarInt(m.output) | ||
| p.writeUtf(m.slot) | ||
| } | ||
|
|
||
| override def decodeMsg(p: PacketBuffer): MsgOutputCfgSlot = { | ||
| MsgOutputCfgSlot(p.readVarInt(), p.readUtf(100)) | ||
| } | ||
| } |
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
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 |
|---|---|---|
| @@ -1,3 +1,3 @@ | ||
| package net.bdew.lib.network | ||
|
|
||
| abstract class BaseMessage[CH <: NetChannel] extends Serializable | ||
| abstract class BaseMessage[CH <: NetChannel] |
23 changes: 0 additions & 23 deletions
23
src/main/scala/net/bdew/lib/network/CompoundNBTSerialize.scala
This file was deleted.
Oops, something went wrong.
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