Skip to content

Commit

Permalink
Fix channels 128 cable (#23)
Browse files Browse the repository at this point in the history
* fix to cable 128

* fix to cable 128

* sa

* update bs

---------

Co-authored-by: Martin Robertz <dream-master@gmx.net>
  • Loading branch information
nikita23830 and Dream-Master authored Nov 7, 2024
1 parent bd5f0cb commit 3d3d493
Show file tree
Hide file tree
Showing 5 changed files with 12 additions and 9 deletions.
6 changes: 3 additions & 3 deletions dependencies.gradle
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
// Add your dependencies here

dependencies {
api('com.github.GTNewHorizons:Applied-Energistics-2-Unofficial:rv3-beta-451-GTNH:dev')
api('com.github.GTNewHorizons:Applied-Energistics-2-Unofficial:rv3-beta-473-GTNH:dev')
api('com.github.GTNewHorizons:bdlib:1.10.0-GTNH:dev')

implementation('com.github.GTNewHorizons:waila:1.8.1:dev') {transitive=false}
compileOnly('com.github.GTNewHorizons:NotEnoughItems:2.6.34-GTNH:dev')
compileOnly('com.github.GTNewHorizons:NotEnoughItems:2.6.44-GTNH:dev')
compileOnly('com.github.GTNewHorizons:BuildCraft:7.1.39:dev')
runtimeOnlyNonPublishable("com.github.GTNewHorizons:GTNHLib:0.5.5:dev")
runtimeOnlyNonPublishable("com.github.GTNewHorizons:GTNHLib:0.5.19:dev")
}
2 changes: 1 addition & 1 deletion settings.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ pluginManagement {
}

plugins {
id 'com.gtnewhorizons.gtnhsettingsconvention' version '1.0.27'
id 'com.gtnewhorizons.gtnhsettingsconvention' version '1.0.29'
}


Original file line number Diff line number Diff line change
Expand Up @@ -151,7 +151,7 @@ object ItemVisualiser extends SimpleItem("Visualiser") with ItemLocationStore {
.b()
.hasFlag(GridFlags.CANNOT_CARRY_COMPRESSED)
) flags += VLinkFlags.COMPRESSED
VLink(n1, n2, c.getUsedChannels.toByte, flags)
VLink(n1, n2, c.getUsedChannels, flags)
}

NetHandler.sendTo(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -225,7 +225,10 @@ object VisualiserOverlayRender extends WorldOverlayRenderer {
override def doRender(partialTicks: Float): Unit = {
if (Client.player != null) {
val stack = Client.player.inventory.getCurrentItem
if (stack != null && stack.getItem == ItemVisualiser) {
if (
stack != null && stack.getItem == ItemVisualiser && stack.hasTagCompound && stack.getTagCompound
.hasKey("dim")
) {

// Do not render if in a different dimension from the bound network
val networkDim = stack.getTagCompound.getInteger("dim")
Expand Down
6 changes: 3 additions & 3 deletions src/main/scala/net/bdew/ae2stuff/items/visualiser/data.scala
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ case class VNode(x: Int, y: Int, z: Int, flags: VNodeFlags.ValueSet)
case class VLink(
node1: VNode,
node2: VNode,
channels: Byte,
channels: Int,
flags: VLinkFlags.ValueSet
)

Expand Down Expand Up @@ -54,7 +54,7 @@ class VisualisationData(var nodes: Seq[VNode], var links: Seq[VLink])
links = for (x <- 0 until linkCount) yield {
val n1 = in.readInt()
val n2 = in.readInt()
val c = in.readByte()
val c = in.readInt()
val f = in.readByte()
VLink(
nodes(n1),
Expand Down Expand Up @@ -82,7 +82,7 @@ class VisualisationData(var nodes: Seq[VNode], var links: Seq[VLink])
for (l <- links) {
out.writeInt(nodeMap(l.node1))
out.writeInt(nodeMap(l.node2))
out.writeByte(l.channels)
out.writeInt(l.channels)
out.writeByte(l.flags.toBitMask(0).toByte)
}
}
Expand Down

0 comments on commit 3d3d493

Please sign in to comment.