Jump to content
View in the app

A better way to browse. Learn more.

Forge Forums

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

mattyixiriva

Members
  • Joined

  • Last visited

Everything posted by mattyixiriva

  1. I'm using that because for some reason I can't get ITextComponent to work, probably cause I'm not well informed on the subject. I can't find any explanation or examples. For the server part. When I run a server from Eclipse it won't launch. I can run a Client fine and have the mod work just how I need it.
  2. Please stop posting replies if you're no help.
  3. I found another topic with chat messages I implemented this playerIn.sendMessage(new TextComponentTranslation("Hello", new Object[0])); Which works perfectly for what I want it to do but I can't run a server still.
  4. @Override public ActionResult onItemRightClick(World worldIn, EntityPlayer playerIn, EnumHand handIn) { if (worldIn.isRemote) { playerIn.sendMessage(new ITextComponent("HELLO!")); } return new ActionResult(EnumActionResult.PASS, playerIn.getHeldItem(handIn)); } "Cannot instantiate the type ITextComponent" Why is this a topic I seem to not be able to find online anywhere
  5. Well I'm taking a break for now, not being able to figure this out is annoying me and I got work tomorrow, night for now.
  6. ok.......anyways... So when I change playerIn.sendMessage("Hello fellow Foxes!!") into playerIn.sendMessage(ITextComponent); the error on sendMessage goes away but now ITextComponent has a error.
  7. I'm only posting images with errors, so anyone trying to help knows where the problem persists.
  8. Ok I see how that works but I receive another error. I feel like there's something I need to add in...
  9. So what specific part would I need to change?
  10. I figured it out what I ended up doing is using this code. @Override public ActionResult onItemRightClick(World worldIn, EntityPlayer playerIn, EnumHand handIn) { if (worldIn.isRemote) { Minecraft.getMinecraft().player.sendChatMessage("Hello fellow Foxes!!"); } //Minecraft.getMinecraft().player.sendChatMessage("Hello fellow Foxes!!"); return new ActionResult(EnumActionResult.PASS, playerIn.getHeldItem(handIn)); }
  11. I'm trying to get a item to print text in chat with out saying a player sent it. What I have happening right now is this. public ActionResult<ItemStack> onItemRightClick(World worldIn, EntityPlayer playerIn, EnumHand handIn) { Minecraft.getMinecraft().player.sendChatMessage("Hello fellow Foxes!!"); return new ActionResult(EnumActionResult.PASS, playerIn.getHeldItem(handIn)); } My results are this. I don't want it to say a player sent it. I want it to just show the following text. I've been looking it up for about an hour and I finally decided to look it up here. Any help would be very great.
  12. I figured it out by doing some more research! Only thing I need to figure out now is out to get it to execute on Client Side only. So it doesn't pop up twice in chat.
  13. I'm just trying to make a single object post text in chat on the client side only. So basically I want to have my mod "Item" to post "Hello World!" in the players chat window when I right click. I've tried a ton of tutorials for using "EvenHandlers" or "onItemRightClick" and I've no clue how to get them to work. public class ItemFoxTail extends Item { public ItemFoxTail() { setCreativeTab(CreativeTabs.MISC); setUnlocalizedName(Reference.FoxTech_Items.FOX_TAIL.getUnlocalizedName()); setRegistryName(Reference.FoxTech_Items.FOX_TAIL.getRegistryName()); setMaxStackSize(1); } } That's the basics of my item I have at the moment. public ItemStack onItemRightClick(ItemStack itemStack, World world, EntityPlayer player) ^ is what I was trying to use but kept getting errors in Eclipse.
  14. SOLVED!! I was running the item "public static enum FoxTechItems" when there was no item classes available. public static enum FoxTechItems { //EXAMPLE("example", "ItemExample"),// private String unlocalizedName; private String registryName; FoxTechItems(String unlocalizedName, String registryName) { this.unlocalizedName = unlocalizedName; this.registryName = registryName; } public String getUnlocalizedName() { return unlocalizedName; } public String getRegistryName() { return registryName; } }
  15. I'm getting a random crash and can't decipher it... FoxTech.java Reference.java FT_Blocks.java BlockFT_ElecFurn.java CRASHLOG So...yeah that's what's up.... I have no errors in Eclipse... :I ...
  16. I'm learning to code Java, and mod at the same time probably not smart. I guess I'll do some more digging around tomorrow.
  17. I'm having a tough time trying to figure out how to register this item.
  18. I've no clue where I'm putting that at....BasicItem.java or ModItems.java?
  19. Could that underlined part be messing with it?
  20. http://pastebin.com/MjjxwK32 - Main http://pastebin.com/rLjYuuJd - BasicItem http://pastebin.com/BBL8gMhv - ModItems http://pastebin.com/z1Ve4Jdh - ItemRenderRegister http://prntscr.com/brsfu0 EDIT** Where do I put that code?
  21. UPDATE: Changing everything to lowercase did not help...sadly
  22. So assets.Swarmcraft.textures.items assets.Swarmcraft.models.item would be assets.swarmcraft.textures.items assets.swarmcraft.models.item
  23. I'm sure everything is lowercase, besides the packages, would I need to lowercase those to?
  24. Hey, everyone! So my problem is getting a texture to load. Instead of writing and making something long, I'll post simple pictures and text/code links to pastebin. http://pastebin.com/bnF5zGKp - Main.java http://pastebin.com/X6UrZNLT - ModItems.java http://pastebin.com/ECh5jSLt - BasicItem.java http://pastebin.com/ChyMLsEU - ItemRenderRegister.java http://pastebin.com/PW9J5mMr - CONSOLE LOG Now let me explain some, so I followed the tutorial correctly, I had the item showing up exactly like it was intended to. A simple item, does nothing at all. Which is what should be there. The thing that is wrong, is the texture not loading. The image above shows how I have the files laid out. I think it may be a problem directing to the "file".png location in the JSON file for the item. I looked through the other java files and found nothing. Please any help will be much appreciated. This code is followed off a tutorial @ http://bedrockminer.jimdo.com/modding-tutorials/basic-modding-1-8/first-item/ I'm a novice at modding/Java (like that hasn't been said before) So any help and detailed explanations will be appreciated.

Important Information

By using this site, you agree to our Terms of Use.

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.