Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- NBTTagCompound tag = new NBTTagCompound();
- tag.setLong("location", safePos.toLong());
- tag.setString("text", "Grave this way!");
- FMLInterModComms.sendMessage("tomtom", "setPointer", tag);
- @EventHandler
- public void incomingMessage(FMLInterModComms.IMCEvent event)
- {
- LogHelper.info("incoming message!");
- FMLInterModComms.IMCMessage message = event.getMessages().get(0);
- if(message.isNBTMessage())
- {
- NBTTagCompound tag = message.getNBTValue();
- if(!tag.hasKey("location"))
- { return; }
- INSTANCE.setPos(BlockPos.fromLong(tag.getLong("location")));
- if(tag.hasKey("text"))
- {
- INSTANCE.setDisplayText(tag.getString("text"), "target");
- }
- LogHelper.info(String.format("BlockPos: %s DisplayText: %s", getPos().toString(), getDisplayText()));
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement