Jump to content

Cadiboo

Members
  • Posts

    3624
  • Joined

  • Last visited

  • Days Won

    58

Everything posted by Cadiboo

  1. This part is unnecessary and is already done for you. Are you using an instance based event subscriber? Do you have an @Mod annotated class?
  2. Great! IProxy is the conventional name for it though
  3. Unrelated, but just a heads up that BetterFoliage is incompatible with the latest OptiFine (HD_UE3). It’s a simple fix tho. Could you post your debug log any other way? Many people won’t want to download, let alone open rar files from the internet, and also Macs can’t open rar files natively
  4. Looks like a encoding problem, I’d recommend talking to the mod author about it
  5. IIRC this happens with vanilla arrows too sometimes. Arrows in my experience are (one of) the most hacked together things in minecraft as they have special handling in many other classes. In the arrow code you can see that vanilla applies the deflection through motion *= -1 (it might be -0.1, I can’t check right now) instead of using a vector. This is probably unrelated to your problem, but worth a try IMO
  6. A common proxy doesn’t make sense, proxies are for separating side specific code i.e. code that will crash when executed on the wrong side. A proxy by definition cannot be common. Common code goes anywhere except for in a proxy
  7. That JSON specifies the scale of the model, so in that specific case the model will be scaled up and made bigger by a factor of 9. Its perfectly possible, though manually dealing with the JSON is annoying (at least in my experience).
  8. IIRC Unique ids are unique, and are the same on the client and sever
  9. String are Objects, not primitives - even though they are given special handling in java. They override the equals method so string1.equals(string2). ItemStack has a number of methods starting with areItemStacksEqual to compare 2 stacks
  10. This is a good tutorial https://www.sololearn.com/Course/Java/ however it requires you to sign up I think. I personally like https://www.tutorialspoint.com/java, but it’s a bit technical and assumes a bit of prior knowledge
  11. When the Pickaxe takes damage, check if it is broken and if so set it’s health to 1.
  12. Only in the Block class IIRC, they use it to mean “call from BlockState instance, but implementing/overriding is fine”
  13. You have 64 characters to use in your modid, your modid should be completely unique and never change
  14. Wherever the code crashes at Move the crashing code to the proper side. I usually put all my rendering registration in the model registry event
  15. if(!ModConfig.getInvisibleBlockStates().contains(state)) and whenever the player puts on/takes off the goggles call world#notifyBlockUpdate (I think) on the chunk you want rebuilt or RenderGlobal#loadRenderers to rebuild all chunks
  16. I would do it by wrapping the model of the block with your own that checks if the block is visible. This will only take effect whenever the chunk is rebuild i.e. a BlockState inside that chunk is changed or a re-render is called, however you can force re-renders.
  17. It’s very possible, what exactly are you trying to do?
  18. Except then you forget about it & it does, putting something like if not dev environment crash might be helpful
  19. You can do this stuff in the display section (top right) of BlockBench and see the results in real time
  20. ItemStacks are never null So it works with this? Actual Items: 1xitem.netherStar@0 1xtile.blockIron@0 1xtile.blockIron@0 0xtile.air@0 0xtile.air@0 0xtile.air@0 0xtile.air@0 0xtile.air@0
  21. The one that dispenses an item, it should be pretty obvious from looking at the code. IIRC it will also query the defaultDispenseBehaviour list. You probably want the Dropper instead of the Dispenser though, it’s newer and simpler code
  22. Tags don’t include size, you also want to check the size/count of the ItemStack. I believe that ItemStack provides you with a method for this but if it doesn’t you can do it yourself with ItemStack#getCount
  23. You should use a resource location and look at how vanilla turns them into real paths. You should also use the ResourceLocation constructor that takes a domain and a path, not put it together manually with domain + ":" + path
  24. How are you getting the meta now?
  25. Does it work in the dev environment? If so, what does your build.gradle file look like? I suspect that you could be excluding you resources folder. Also, what does your project setup look like? IIRC the location of the resources folder was moved somewhere around 1.8 and you might still be using the old location. Can you open up the compiled mod in a decompiler and see if the resources are inside? I recommend Bytecode Viewer as it contains multiple decompilers and has a relatively easy to use UI
×
×
  • Create New...

Important Information

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