-
Posts
3624 -
Joined
-
Last visited
-
Days Won
58
Everything posted by Cadiboo
-
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?
-
Great! IProxy is the conventional name for it though
-
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
-
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
-
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
-
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).
-
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
-
how to make a block that only can be harvested by one toolclass
Cadiboo replied to bouwmeester2003's topic in Modder Support
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 -
When the Pickaxe takes damage, check if it is broken and if so set it’s health to 1.
-
Only in the Block class IIRC, they use it to mean “call from BlockState instance, but implementing/overriding is fine”
-
You have 64 characters to use in your modid, your modid should be completely unique and never change
-
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
-
Make a certain block not visable if option is selected
Cadiboo replied to Discult's topic in Modder Support
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 -
Make a certain block not visable if option is selected
Cadiboo replied to Discult's topic in Modder Support
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. -
Make a certain block not visable if option is selected
Cadiboo replied to Discult's topic in Modder Support
It’s very possible, what exactly are you trying to do? -
Compiled Mod throws exception, yet works fine from IDE
Cadiboo replied to Cookiehook's topic in Modder Support
Except then you forget about it & it does, putting something like if not dev environment crash might be helpful -
You can do this stuff in the display section (top right) of BlockBench and see the results in real time
-
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
-
Custom Dispensers - Specific Items Only
Cadiboo replied to iBuyMountainDew's topic in Modder Support
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 -
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
-
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
-
How are you getting the meta now?
-
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