Skip to content

Commit

Permalink
Bump version to 1.2.1: fix dedicated server crash
Browse files Browse the repository at this point in the history
  • Loading branch information
3TUSK committed Aug 7, 2022
1 parent 860a694 commit d2ff176
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 6 deletions.
2 changes: 1 addition & 1 deletion build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ java {

teacon {
modId = 'powertool'
modVersion = '1.2.0'
modVersion = '1.2.1'
modLicense = 'GPL-3.0'
modGitHubRepo = 'teaconmc/PowerTool'
modAuthors = ['IzzelAliz']
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,15 +27,19 @@ public void write(FriendlyByteBuf buf) {

public void handle(Supplier<NetworkEvent.Context> contextSupplier) {
var context = contextSupplier.get();
context.enqueueWork(() -> {
context.enqueueWork(new Handler());
context.setPacketHandled(true);
}

public class Handler implements Runnable {
@Override
public void run() {
var mc = Minecraft.getInstance();
var level = mc.level;
if (level != null && level.getBlockEntity(this.location) instanceof HolographicSignBlockEntity theSign) {
if (level != null && level.getBlockEntity(OpenHolographicSignEditor.this.location) instanceof HolographicSignBlockEntity theSign) {
mc.setScreen(new HolographicSignEditingScreen(theSign, mc.isTextFilteringEnabled()));
}
});
context.setPacketHandled(true);
}
}


}

0 comments on commit d2ff176

Please sign in to comment.