Jump to content
Search In
  • More options...
Find results that contain...
Find results in...

Slastic

Members
  • Posts

    24
  • Joined

  • Last visited

Recent Profile Visitors

The recent visitors block is disabled and is not being shown to other users.

Slastic's Achievements

Tree Puncher

Tree Puncher (2/8)

0

Reputation

  1. How to modify all swords in the game ex: making it say hi when you right-click (any sword)
  2. Use onBlockActivated() to dectect when the user right-clicks a block For example in the class which you put your block properties What GUI? What is it supposed to be, just a simple gui with buttons? Or a container example your inventory. I'm also new, but I help when I know I can
  3. I will try using the capabilities system
  4. There is a totem block, when you right click it - onBlockActivated() - it will show a gui with a button that says bind totem. If they bind it, it will show another gui, this gui will show a list of all bound totems Lastly when you press totem 1 for example it will tp you to the first one you bounded. Hopefully that made sense Here is what adds buttons to teleport to totems And onBlockActivated I'm aware my code properly has issues keep in mind that I'm new to this so don't expect this to be perfect Thanks you have been great help
  5. How would you use Capabilities for this? I looked through the forum but have no clue where to start
  6. TotemPos.get(playerIn).add(pos.getX(), pos.getY(), pos.getZ()); So I would add to it like this, right? The list HashMap is registered as told public static HashMap<PlayerEntity, BlockPos> TotemPos = new HashMap<>();
  7. Thanks much I will try this out, may need help though One question is how would you put data into the list, for example (onBlockActivated) data like pos. Then how would you be able to select a specific item (using the index value, from it) I have a UI that has 10 buttons, click the first button it will select the first index from the hashmap Hope that made some sense, and that I'm not mistaken
  8. How can I store a list of coordinates (BlockPos) and String name, for each individual player globally. What would be a simple way of doing this? Does this require The Capability System, if so -- how would you use it for this? https://mcforge.readthedocs.io/en/latest/datastorage/capabilities/ I'm newbie, Help is appreciated
  9. public TotemSelectorScreen(ITextComponent titleIn) { super(titleIn); } private static final ResourceLocation TOTEM_GUI_TEXTURE = new ResourceLocation(Main.MOD_ID, "textures/gui/totem_selector.png"); int xSize = 176; int ySize = 125; @Override public void init() { super.init(); this.buttons.clear(); this.addButton(new Button (this.width / 2 - 100, this.height - (this.height / 4) + 10, 200, 20, "totembutton", (button) -> { System.out.println("button testing"); })); } @Override public void render(int mouseX, int mouseY, float partialTicks) { RenderSystem.color4f(1.0F, 1.0F, 1.0F, 1.0F); this.renderBackground(); this.minecraft.getTextureManager().bindTexture(TOTEM_GUI_TEXTURE); int x = (this.width - this.xSize) / 2; int y = (this.height - this.ySize) / 2; this.blit(x, y, 0, 0, this.xSize, this.ySize); } @Override public boolean isPauseScreen() { return false; } Why does GUI button not display? I'm sorry I started recently and I am not so good at this stuff, still learning
  10. That's not where i got the idea from, now I understand.
  11. DistExecutor.runWhenOn(Dist.CLIENT, () -> () -> { Minecraft.getInstance().gameRenderer.displayItemActivation(new ItemStack(RegistryHandler.MAGIC_MIRROR.get())); }); Did I do this correctly?
  12. Ok, sorry about that I will learn to use them if you have an example or a forum you can give it would be a great help. Like, https://mcforge.readthedocs.io/en/1.15.x/networking/; Draco18s gave me https://mcforge.readthedocs.io/en/latest/concepts/sides/ also looking through this
×
×
  • Create New...

Important Information

By using this site, you agree to our Privacy Policy.