Jump to content

Leaderboard

Popular Content

Showing content with the highest reputation on 10/28/18 in all areas

  1. It will neither be sent to the server nor appear in the client's local chat. These are different things. When the client hits enter to send a message it first gets added to it's local client's chat - it is not yet visible to any other player on the server but is visible to the client who is sending it. It then gets sent to the server which sends it to every other player for them to see if needed. I don't know whether you want the client who typed the message to see it, which is why I've included an explanation as to how to add it to the local client's chat. Again, you can add anything you want to that chat and only the client that you are doing it with will see those messages, not anyone else.
    1 point
  2. So do you want to detect when the client player types a message, respond to it and stop it from reaching the server? Forge has an event for that - ClientChatEvent. You can cancel it and then it won't be sent. It however won't add it to the chat either so you would have to do that yourself with GuiNewChat#addToSentMessages. You can get the GuiNewChat instance from GuiIngame#getChatGUI and you can get a GuiIngame instance with Minecraft.ingameGUI.
    1 point
  3. This is client-side only and thus can't be used in common code otherwise you will crash the server. In any case this needs to happen in the ModelRegistryEvent, not anywhere else. You are registering your items twice. As for the error: Whatever you are doing in your PreInit method in your main class crashes the game. I can't tell you what you are doing because you've not provided the code needed. But from the stacktrace it looks like you are calling the Item.registerItems method for god knows what reason.
    1 point
  4. A concept of a common proxy makes no sense. Proxies exist to separate sided only code. If your code is "common" then it goes into your mod class, not into your proxy. serverSide = Reference.COMMON_PROXY_CLASS This makes even less sense. Server proxy either hosts noop methods that are only applicable for the client or server-side only methods. Your common proxy can't be your server proxy. ItemBase is an antipattern. You do not need it. public static final Item RUBY = new ItemBase("ruby", CreativeTabs.MATERIALS); Don't ever use static initializers. Instantinate your stuff in the appropriate registry event. IHasModel is stupid. All items need models, no exception and there is nothing about an item model that requires access to private/protected things. Register your models directly in the ModelRegistryEvent, not in your item classes. What is up with your ruby.json model? Why are there so many transforms specified? Why is it's parent a item/handheld? Main.proxy.registerItemRenderer(this, 0, "invetory"); invetory != inventory. Actually also related and the cause of your issue: public class CommonProxy{ public void registerItemRenderer(Item item, int meta, String id) {} } public class ClientProxy extends CommonProxy{ public void regsterItemRenderer(Item item, int meta, String id) { ModelLoader.setCustomModelResourceLocation(item, meta, new ModelResourceLocation(item.getRegistryName(), id)); } } regsterItemRenderer != registerItemRenderer. This is why you a) Never use a CommonProxy but instead an interface. b) Never manually override methods and use the override feature of your IDE c) Always annotate methods that are intended to be overridden with @Override As an unrelated sidenote: Any particular reason you've hosted your code on mediafire of all places? You can just create a free github repository, you know?
    1 point
  5. Is this your mod? If it isn't complain to the author. If it is you need to read this:
    1 point
  6. Popular != good. A lot of popular mods are actually quite badly written with a lot of bad practices in place and a ton of cargo-cult programming in place. I can recommend some trustworthy repositories for learning:
    1 point
  7. The error is pretty obvious It means that your recipe is missing the "data" property for that ingredient. You need to specify the data property for items that have subtypes, like dirt which has 2 subtypes - normal dirt and coarse dirt.
    1 point
  8. Could you please clarify your question? What is your actual issue? What do you want to acheive? Take note that casts the fuel burn time to a short before saving it to the NBT, meaning that the max burn time you can have persist is 32767. As your number is greater than 32767 it will not persist, instead it will be saved as -21023. There is no fix to this issue as far as I am aware, that's a vanilla oversight.
    1 point
  9. Unless something changed - THIS IS NOT how you make events. Event method should always contain ONLY Event argument. Message should be pulled from event.something and then edited.
    1 point
  10. Anything below 1.9.8 is unsupported on this forum, please update to receive assistance.
    0 points
×
×
  • Create New...

Important Information

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