-
Notifications
You must be signed in to change notification settings - Fork 69
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
4940c2b
commit cadbeaa
Showing
12 changed files
with
125 additions
and
87 deletions.
There are no files selected for viewing
Submodule core
updated
6 files
6 changes: 6 additions & 0 deletions
6
neoforge-main/src/main/java/dev/compactmods/machines/neoforge/compat/jade/CMJadePlugin.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
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
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
18 changes: 18 additions & 0 deletions
18
...in/java/dev/compactmods/machines/neoforge/network/machine/ClientMachinePacketHandler.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,18 @@ | ||
package dev.compactmods.machines.neoforge.network.machine; | ||
|
||
import dev.compactmods.machines.api.room.RoomTemplate; | ||
import dev.compactmods.machines.neoforge.machine.Machines; | ||
import net.minecraft.client.Minecraft; | ||
import net.minecraft.core.GlobalPos; | ||
import net.minecraft.resources.ResourceLocation; | ||
|
||
public class ClientMachinePacketHandler { | ||
public static void setMachineTemplate(GlobalPos position, ResourceLocation template) { | ||
var mc = Minecraft.getInstance(); | ||
assert mc.level != null; | ||
if(mc.level.dimension() == position.dimension()) { | ||
mc.level.getBlockEntity(position.pos(), Machines.UNBOUND_MACHINE_ENTITY.get()) | ||
.ifPresent(ent -> ent.setTemplate(template)); | ||
} | ||
} | ||
} |
Oops, something went wrong.