
Everything posted by mattyixiriva
-
Right Click to post Client side chat
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.
-
Right Click to post Client side chat
Please stop posting replies if you're no help.
-
Right Click to post Client side chat
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.
-
Right Click to post Client side chat
@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
-
Right Click to post Client side chat
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.
-
Right Click to post Client side chat
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.
-
Right Click to post Client side chat
I'm only posting images with errors, so anyone trying to help knows where the problem persists.
-
Right Click to post Client side chat
Ok I see how that works but I receive another error. I feel like there's something I need to add in...
-
Right Click to post Client side chat
So what specific part would I need to change?
-
Right Click to post Client side chat
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)); }
-
[1.11.2] Help printing non-player chat message
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.
-
Right Click to post Client side chat
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.
-
Right Click to post Client side chat
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.
-
[1.10.2] [forge-1.10.2-12.18.1.2048-mdk] java.lang.NullPointerException: Initial
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; } }
-
[1.10.2] [forge-1.10.2-12.18.1.2048-mdk] java.lang.NullPointerException: Initial
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 ...
-
[1.10.2] [FMDK 12.18.0.2009] Texture PNG not loading.
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.
-
[1.10.2] [FMDK 12.18.0.2009] Texture PNG not loading.
I'm having a tough time trying to figure out how to register this item.
-
[1.10.2] [FMDK 12.18.0.2009] Texture PNG not loading.
I've no clue where I'm putting that at....BasicItem.java or ModItems.java?
-
[1.10.2] [FMDK 12.18.0.2009] Texture PNG not loading.
Could that underlined part be messing with it?
-
[1.10.2] [FMDK 12.18.0.2009] Texture PNG not loading.
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?
-
[1.10.2] [FMDK 12.18.0.2009] Texture PNG not loading.
UPDATE: Changing everything to lowercase did not help...sadly
-
[1.10.2] [FMDK 12.18.0.2009] Texture PNG not loading.
So assets.Swarmcraft.textures.items assets.Swarmcraft.models.item would be assets.swarmcraft.textures.items assets.swarmcraft.models.item
-
[1.10.2] [FMDK 12.18.0.2009] Texture PNG not loading.
I'm sure everything is lowercase, besides the packages, would I need to lowercase those to?
-
[1.10.2] [FMDK 12.18.0.2009] Texture PNG not loading.
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.
IPS spam blocked by CleanTalk.