-
Posts
47 -
Joined
-
Last visited
Everything posted by superminerJG
-
Yep. If you're wondering about the functional interfaces, I use them to keep code clean. Blocks are registered in ModBlocks, and suppliers and functions are created using the Suppliers class. When does this happen, and why? Logs: https://gist.github.com/superminerJG/de17f22335b40f7edcf3fa36c3116a0a Mod repo: https://github.com/superminerJG/Vanilla-Automation EDIT: using the registry object as a supplier solved it.
-
For reference, here's a link to my repo. I am adding "mercury poisoning" to the game. Starting from when the player grabs an item under the tag "vanauto:contains_mercury", every 20 seconds, they have a chance of receiving the poison effect for 10 seconds. I plan on doing this by storing an NBT tag on the player: "LastHgAcquisition", which is then used to calculated whether to tick the player or not. The problem is, I'm not sure if this is good practice, since NBT is usually managed by capabilities, and adding an entire capability like "CanHgPoisonCapability" seems kinda clunky. Is there a simpler way to track these sorts of things? Note: stackable items need to stay stackable.
-
I'm adding cinnabar (and later, other mercury-related things) and I wanted to add some kind of "mercury poisoning" to these items. The idea is that every 20 seconds, a player holding cinnabar has a 10% chance to receive Poison II for 10 seconds. I've been looking at Extra Utilities' Unstable Ingot, which causes the player holding it to explode 10 seconds after it's been taken out of the crafting grid. However, RWTema hasn't updated it to 1.15.2, so I'm not sure how it might work now. Any ideas?
-
-
Reasons Forge isn't coming to Bedrock: Bedrock is written in C++, which is much harder to decompile than Java Bedrock runs on Xbox 1, PS4, and Switch. Inserting Forge's code onto a console is even harder (Console makers hate homebrew) Furthermore, the decompiled code is nearly impossible to make sense of (or deobfuscate) so modders won't know what they're doing Well there you go. Unless Mojang makes Minecraft open-source, Bedrock modding is very, very, very, very hard to do.
-
java.lang.ExceptionInInitializerError when I use Javacord
superminerJG replied to Nyphew's topic in Modder Support
You need to build it using Gradle. -
java.lang.ExceptionInInitializerError when I use Javacord
superminerJG replied to Nyphew's topic in Modder Support
An ExceptionInInitializerError basically says an exception occured when assigning a static variable. Make sure the static variables' initializers don't produce exceptions. -
Game Crashing after brand new install idk help plz
superminerJG replied to kyliexroo's topic in Support & Bug Reports
There is a 1.15.2 preview, try that. -
[1.15.2] How to check if a key is double tapped
superminerJG replied to squidlex's topic in Modder Support
class Ticker extends ITickable{ static int timer = 0; static boolean pressed = false; static boolean doublePressed = false; static void tick() { if (Minecraft.getInstance().gameSettings.keyBindLeft.isKeyDown()) { if (!pressed) { if (timer < 8) { doublePressed = true; } timer = 10; pressed = true; } if (doublePressed) { //do stuff } } else { pressed = false; if (doublePressed) { doublePressed = false; timer = 0; } } timer--; } } I honestly don't know if this will work, but this is how I think it should work. Obviously you can improve on this, but the idea is to make sure that the second press doesn't happen too soon. -
[1.14.4] Modifying an ItemStack with a custom crafting recipe?
superminerJG replied to Invilis's topic in Modder Support
I believe you'll need to subclass net.minecraft.item.crafting.SpecialRecipe to create a special crafting recipe (look at ArmorDyeRecipe) Then you need to register a recipe serializer for said SpecialRecipe. -
java.lang.ExceptionInInitializerError when I use Javacord
superminerJG replied to Nyphew's topic in Modder Support
Would you mind putting your mod's source code on GitHub? -
[1.15.2] How to check if a key is double tapped
superminerJG replied to squidlex's topic in Modder Support
The reason this happens is if you hold the key for long enough, it starts to send repeated keydown inputs. So that's why the boolean is necessary. like if i held down k for long it does this: kkkkkkkkkkkkkkkkkkkkkkkkk -
I have three items involved: a sledgehammer, copper ore and copper dust. When you craft the sledgehammer and the copper ore together (shapeless), it should give you copper dust. However, the sledgehammer stays on the crafting grid and loses 1 durability. Can this be done through JSON, or do I have to code it in to get it to work? If I do have to code it in, how?
-
https://github.com/JGgithub2018/Vanilla-Automation Repo for the mod. Backstory: I'm using a helper method on the ModRegistry.Blocks class which registers BlockItems for each block. However, an exception occurs in the for each loop, specifically when getting entries. Since when did the register not have an object that was just registered? Thanks everyone.
-
My things do not register. Some help?
superminerJG replied to superminerJG's topic in Modder Support
Well, even more tweaks. still nothing. ? NEWEST COMMIT HERE!!! -
My things do not register. Some help?
superminerJG replied to superminerJG's topic in Modder Support
After cleanup and moving registries to FluxMachines.java, I don't know how it doesn't register still. I checked McJty's 1.14 tutorial, and I don't get how it shouldn't work now. -
My things do not register. Some help?
superminerJG replied to superminerJG's topic in Modder Support
Thanks. Ahem. Somehow ended up not pushing some changes. *pls read edit message* -
Minecraft 1.14.3 Forge. As in the title, I used registry events to register an item and a block. But they don't register. Why? REPO here ---> https://github.com/JGgithub2018/Fluxed-Machinery?files=1