Jump to content

Leaderboard

Popular Content

Showing content with the highest reputation on 05/19/20 in all areas

  1. Look at how the method is implemented on the creature. You should see exactly how to get a blockpos from an entity position...
    1 point
  2. Create a static final instance (could be just final as well) of your keybinding in a global variable and register it using ClientRegistry#registerKeyBinding during FMLClientSetupEvent. You will need to use packets to apply the potion effects.
    1 point
  3. Its on my ever growing list of TODOs. But at the moment it isn't broken, and other things are, so its low priority. There really isn't a point to doing so. You can put "solved" in the title if you want, but locking a thread is a moderator tool. Its a forum, threads are to remain open by default.
    1 point
  4. Actually, the problem I described is wrong, so apologies. I missed a single line of code. First, the actual problem is that your global variable of your tile entity is not initialized since you decided to make a local variable in your constructor instead (lines 28 and 34). For your method, my understanding is that you should not mix methods outside the realm of the reference holder with the variables inside. You can, but it might lead to a problem later on when dealing with some client server syncing. I'm not sure, but I just tend to avoid it. Second, calling that method inside your tileentity class is just redundant when you are already literally in your instance of a tileentity. You can literally pass in your tileentity by simply using 'this' instead of passing in two variables you only use once.
    1 point
  5. Howdy multipart blockstates are probably your best bet. Here's a working example of something very similar (a 3D web which joins itself to adjacent solid blocks) https://github.com/TheGreyGhost/MinecraftByExample/tree/master/src/main/java/minecraftbyexample/mbe03_block_variants -TGG
    1 point
  6. You should share your project as a github repo, so people can see what you have so far, and give you pointers on how to proceed.
    1 point
  7. You know it tells you your error. Your tile entity is throwing a null value on the server at a specific line in a specific class. I think you should write your get method for the reference holder correctly. You also realize this is completely redundant. Why are you getting the current tile entity in the container from the world rather than passing in the tile entity? These two should tell you exactly how to solve your problem.
    1 point
  8. You're trying to register a ContainerType, and to do that you need to specify your TE's constructor that takes no paremeters.
    1 point
  9. My code dates before DeferredRegister, so I haven't gotten a chance to mess around with it. But here's where I do the needful: https://github.com/Draco18s/ReasonableRealism/blob/1.14.4/src/main/java/com/draco18s/harderores/HarderOres.java#L165 The method call to EasyRegistry there just shoves the value passed into a list and waits for the RegistryEvent.Register<T> for some the appropriate T and then registers the value. It looks complicated, but only because I've got a thousand helpers that do various things to make my life easier in my actual mods,* but here's the relevant helper and event: https://github.com/Draco18s/ReasonableRealism/blob/1.14.4/src/main/java/com/draco18s/hardlib/EasyRegistry.java#L113-L136 https://github.com/Draco18s/ReasonableRealism/blob/1.14.4/src/main/java/com/draco18s/hardlib/EasyRegistry.java#L195-L200 Mod Data Fixers do exist now, but as I said, I haven't really worked on things in a while. That should all still be the same sorts of stuff you need to do. *I definitely do not recommend doing things like this any more. My way is based on my own personal preferences for liking a clean-looking mod class and have shoved all the wonky aspects off into my EasyRegistry where I don't need to look at them. DeferredRegister has probably cleaned this up, I just haven't played with it.
    1 point
  10. Make sure you use the installer so that it downloads all of the required libraries and DO NOT rename the minecraft server jar away from what it names it. If you're using a server host, and the host requires you to name the server jar in a specific way, you rename the forge jar.
    1 point
×
×
  • Create New...

Important Information

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