use of mathax.client.mixin.SignEditScreenAccessor in project Client by MatHax.
the class AutoSign method onOpenScreen.
@EventHandler
private void onOpenScreen(OpenScreenEvent event) {
if (!(event.screen instanceof SignEditScreen))
return;
SignBlockEntity sign = ((SignEditScreenAccessor) event.screen).getSign();
String lineOne = Placeholders.apply(lineone.get().replace("%date%", getDate()));
String lineTwo = Placeholders.apply(linetwo.get().replace("%date%", getDate()));
String lineThree = Placeholders.apply(linethree.get().replace("%date%", getDate()));
String lineFour = Placeholders.apply(linefour.get().replace("%date%", getDate()));
mc.player.networkHandler.sendPacket(new UpdateSignC2SPacket(sign.getPos(), lineOne, lineTwo, lineThree, lineFour));
event.cancel();
}
Aggregations