Everything posted by Novârch
-
i get this error while i try to load mekanism mod
1.12 is no longer supported on this forum. Please update to a modern version of Minecraft to receive support.
-
[1.15.2] Remove Slowness when using an Item
LivingEntity#removePotionEffect(Effect) Edit: Oof, thought you meant a potion effect, I should really take my time and read these in detail.
-
Custom Potion Recipes Return Noncraftable Potions
First of all, don't reference FMLJavaModLoadingContext directly from that class, put it as a parameter in the PotionRegistryHandler#init method, second of all, you never even register your potions by calling EFFECTS#register, and lastly, your DeferredRegisters have their names mixed up, the first one is for effects and the second one is for potions.
-
[SOLVED] Struggles With Creating Capabilities
You need an interface to make a capability, I'd say you should call it IPet, Pet should implement it and you should pass in IPet in @CapabilityInject and the first parameter of register. The interface should look something like this with what you're currently doing: public interface IExample { EntityType<?> getEntityType(); void setEntityType(EntityType<?> type); } I strongly recommend you use generics instead if you can, something like this: public interface IExample { <T extends Entity> EntityType<T> getEntityType(); <T extends Entity> void setEntityType(EntityType<T> type); } Ping me or something next post, I'll help you out if I can. Edit: Oh come on, solved as I was posting.
-
[1.16.1] Custom tool type?
private static final Set<Block> EFFECTIVE_ON = Sets.newHashSet(Blocks.OAK_PLANKS, Blocks.SPRUCE_PLANKS, Blocks.BIRCH_PLANKS) Pretty much the same as in AxeItem, edited some stuff to avoid breaching Mojang's copyright. Remember that you need a class that extends ToolItem (at least in 1.15, but I don't think that changed in 1.16).
-
Update 1.15.2 source code to 1.16.1?
Of course there is, change some version numbers in your mods.toml and build.gradle and voila, you're on 1.16, it's pretty obvious which ones you should change, but if you aren't sure I recommend setting up a 1.16 project from the MDK and copying it from that. On a separate note, I personally recommend you stay away from 1.16 Forge until it gets a recommended release.
-
[1.16.1] Custom tool type?
It's just a parameter, pass it in, but you can't directly reference the one in AxeItem as it's private, if you really don't want to copy it,
-
[1.16.1]How do I create Item that when rightclick it random other item
Pretty easy, actually. You've got the random generation down, don't change it, as for the PlayerEntity#dropItem method requiring an ItemStack, if you took literally 1 second to look at ItemStack, you'd see that it has a constructor that takes in an Item. If you can solve a crossword puzzle, you can translate 1.12 item code to 1.15, barely anything had changed (excluding metadata, of course).
-
Commad
Seems client commands are currently impossible. Edit: What about a keybind, I think you could use that.
-
[1.16.1] Custom tool type?
You could copy the EFFECTIVE_ON field from AxeItem, ShovelItem or PickaxeItem and pass it into the ToolType constructor, or if you're super paranoid like me, use some reflection or AT's to get direct access to the field so you don't have to copy Mojang's code.
-
[Solved] Custom Gui
Neat, I'll try to help you with that one, Brigadier command syntax is incredible.
-
Help! Minecraft crashing and do not know why!
1.12 is no longer supported on this forum. Please update to a modern version of Minecraft to receive support.
-
How do I add an ItemStack to a horse inventory slot?
I'm gonna take a wild guess and say you're calling the method on the player, I can't be certain without seeing your code.
-
How do I add an ItemStack to a horse inventory slot?
Well look through the code and find out, it has to be somewhere, my guess is 0 for the saddle and 1 for the armor.
-
Make another inventory slot.
This is just from a first glance, so take it with a grain of salt, EE3 seems to write the player's UUID to the ItemStack-s NBT, this is very hard to follow because of the mods' heavy use of util classes, but can be deciphered with some time, I'll give you the link to the item on GitHub, beware it's for 1.12 though, but I think NBT hasn't really changed since day 1.
-
Make another inventory slot.
Make your own thread if you want help. If you can't understand the source it's very unlikely you can actually make it yourself, if you want to make a mod, learn Java, get acquainted with Forge and Minecraft, and then do what you want, asking for help when you don't understand Forge/Java will get you nowhere long-term.
-
1.12.2 Forge 2847
1.12 is no longer supported on this forum. Please update to a modern version of Minecraft to receive support.
-
[Solved] Custom Gui
1.16 is still in Beta and doesn't have real mappings ready yet, the current mappings are handmade, I honestly recommend you don't use 1.16 yet, but if you really want to you could fire up a Forge 1.15 project and look at the classes there, they're basically the same.
-
[SOLVED] [1.12.2] world is null when reading NBT
That method cannot be what you're looking for, it's static and you can't override static methods, look for another method.
-
[Solved] Custom Gui
You don't need a tutorial to do something, take a look at the vanilla code, I believe it's all in net.minecraft.client.gui
-
[1.14.4] Override method from Block shows error? [SOLVED]
You're trying to override a static method, you can't do that, and it doesn't even make sense.
-
[SOLVED] [1.12.2] world is null when reading NBT
You cannot override static methods, that is basic Java, it doesn't make any sense.
-
[1.16.1] Music Discs Are Not Playing Anything.
Remove ModMusicDiscItem and instantiate MusicDiscItem directly, your issue most likely comes from the fact you are using the deprecated method that takes in a SoundEvent, use the one that uses a Supplier<SoundEvent>.
-
pixelmon generations and reccurent complex crash
Versions 1.12 and below are no longer supported on this forum. Please update to a modern version of Minecraft to receive support.
-
forge 32.0.63 The game crashed whilst rendering overlay Error: java.lang.NullPointerException: Rendering overlay
Forge 1.16 is still in Beta, you should expect bugs and crashes until a recommended release comes out. As for your issue, try without Storage Drawers. Please don't whine if you don't get help immediately, people have more important things to do than answer forum questions.
IPS spam blocked by CleanTalk.