Everything posted by Draco18s
-
[1.13.2] Is there any way to give a player a status effect when holding an item?
One of these things is not like the other.
-
[1.12.2] BlockStem CropGrowEvent.Post
Yes. Because the pumpkin is the operant blockpos being modified by the growth event. If you feel that this is wrong, create an issue on Forge's git repo
-
Texture for an ItemGroup not appearing, but that item's texture works fine as an item
You have a static initializer. This will cause your code to run at an unpredictable time. In this case, it runs before Items are registered.
-
No Textures And Lang File Not Working [SOLVED]
...Yes, yes it does. The server doesn't know what "textures" are, its a client side only task...which is what proxies are for.
-
[1.12.2] Itemstack information is not updated [SOLVED]
On the item stack, as part of your existing (or, if you want, a new) capability.
-
[SOLVED][1.13.2] Blockstate submodels not appearing.
Show your block's java code too.
-
[1.12.2] Itemstack information is not updated [SOLVED]
What happens when you have 7 of these on the server? Now it won't reduce the values every half second, but rather every 3.5 seconds. Server tick 1 Stack 1: increment to 1 Stack 2: increment to 2 Stack 3: increment to 3 ... Server tick 2: Stack 1: increment to 8 Stack 2: increment to 9 Stack 3: increment to 10 (and do thing) Stack 4: increment to 1 Stack 5: increment to 2 ...
-
[1.12.2] Itemstack information is not updated [SOLVED]
Also, why are these here? https://github.com/GloriousAlpaca/Leer/blob/master/Void Mod/src/main/java/mod/leer/item/ItemTrap.java#L31-L32 This line is irrelevant: https://github.com/GloriousAlpaca/Leer/blob/master/Void Mod/src/main/java/mod/leer/item/ItemTrap.java#L74 The explosion will destroy the stack. Pretty sure this is not called when you think it is: https://github.com/GloriousAlpaca/Leer/blob/master/Void Mod/src/main/java/mod/leer/item/ItemTrap.java#L84-L88 Why are you using NBT and a Capability? https://github.com/GloriousAlpaca/Leer/blob/master/Void Mod/src/main/java/mod/leer/item/ItemTrap.java#L100 What is this method even meant to do? https://github.com/GloriousAlpaca/Leer/blob/master/Void Mod/src/main/java/mod/leer/item/ItemTrap.java#L96 Right click ten times and then it gains the power of...exploding if it doesn't have enough energy (and otherwise consumes 100 energy, why would you ever charge this item?)
-
help my server is crashing
Complain to the author of Sponge Powered.
-
[1.13.2] BlockStem CropGrowEvent.Post fires even if plant didnt grow
Make a bug report https://github.com/MinecraftForge/MinecraftForge/
-
[1.13.2] Can't find any guide
Ahh, I see now.
-
[1.13.2] Potion Effect + Tag mechanic
EntityJoinWorldEvent and check if the entity is a player. Then you would need a PlayerTickEvent handler that would: Get the capability from the event's player object Call the function, passing the capability so that... ...the function can modify the radioactivity level of the player
-
[1.13.2] Can't find any guide
As far as I can tell, its a lot better than previous series (like Loremaster). But I'd be interested in knowing what it is that he does wrong or otherwise poorly explains (I skimmed through the first couple looking to see if I could find any obvious problems).
-
[1.12.2] Potential Memory leak detected
Which is going to be 99.99% of the time.
-
Add functionality to vanilla blocks
Its been a long time, but I was pretty sure I messed with bonemeal use too, but I can't find it now. You should still be able to hook into the Bonemeal events and cancel it, preventing their usage on crops.
-
Add functionality to vanilla blocks
You might also want to check out my farming mod: https://github.com/Draco18s/ReasonableRealism/tree/1.12.1/src/main/java/com/draco18s/farming Code is still 1.12, but everything should still be possible. I did weeds and bonemeal and hoe modifications too.
-
Add functionality to vanilla blocks
CropGrowEvent I don't know if its been added to the 1.13 codebase yet, but I added it to 1.12 a while back, so it should get moved forward soon, if it hasn't been already.
-
Find and replace adjacent blocks
Ok, so, two problems: 1) Comparing strings in order to identify blocks is The Worst idea. Blocks.WHEAT, Blocks.BEETROOT, Blocks.CARROTS, and Blocks.POTATOES are a thing. Just check if(block == Blocks.WHEAT), etc. 2) This can't handle mod added crops of any kind, you should instance check if(block instanceof BlockCrops)
-
[1.12.2] [Solved] How to not consume item in SPECIFIC recipe
You need your own custom IRecipe implementation.
-
[1.12.2] How do I create Blockstates and howto register them
Show more of the error. MissingVariantException is an exception caused by another exception that prints out below it.
-
[1.13.2] Potion Effect + Tag mechanic
A working example helps. https://github.com/Draco18s/ReasonableRealism/tree/1.12.1/src/main/java/com/draco18s/farming/entities/capabilities There's also some bits in my EventHandler class that are relevant.
-
[1.12.2] How do I make bedrock add stat to the player stat. [Solved]
You can't. There's a function that sets stats off, but as it defaults to on, there's no method that turns the value back on. And given that bedrock can't be broken by any means that would ever trigger stats, there's no point.
-
[1.12.2] How do I create Blockstates and howto register them
You have to register an item mode in the ModelRegistryEvent.
-
[1.12.2]Why does the Robot class mousePress not work?
Just because you put an @SubscribeEvent annotation on this method doesn't mean you've told Forge that this class is an event handler class. No. Just no. That is not how you use InputEvent. You're creating a new robot every tick. I have no idea what the Robot class does, but I doubt that this is going to ever work.
-
[1.12.2] How do I create Blockstates and howto register them
Yes, its handled automatically because of createBlockState(). Whatever it returns is what gets looked for in the blockstate file. Note that even a block without states still has a state. Its just an unnamed state with no properties, but the blockstate json file still has to map that block to a model. eg: https://github.com/Draco18s/ReasonableRealism/blob/1.12.1/src/main/resources/assets/harderores/blockstates/sifter.json
IPS spam blocked by CleanTalk.