Everything posted by Draco18s
-
playsound event causing NullPointerException
(1) Use the debugger and figure out what's null when. But my guess would be that you start the game and when you go to open the gui to select a world to play, it crashes. I'll give you one hint.
-
[1.15.2] Custom item's variable is shared throughout all instances of the item
No, Capabilities only. NBT is meant for serialization only.
-
[1.15.2] Custom Shaped Recipe
Write your own IRecipe implementation.
-
[1.15.2] Can I register a Block to an existing TileEntity?
Of course not, because the vanilla sign item places the vanilla sign block, and the vanilla sign block creates the vanilla sign tile entity. GetType only gets called for the game to determine how to serialize and deserialize the TE's data.
-
How add items to inventory
If you want this to work, then it won't be a client only mod, for one. For two, you need to know which player to add the itemstack to.
-
Registry Object not present error
Complain to the author of the mod throwing the error.
-
How add items to inventory
Inventory is server side. The items the client thinks it has aren't real and cannot be real unless either: a) the server adds the items b) the player is in creative mode
-
[1.15.2] Crashing after adding new item
- Help with NBTs and Persistent Data
Use Capabilities. https://mcforge.readthedocs.io/en/1.14.x/datastorage/capabilities/- [1.16] Removing Brewing Recipes From The Registry
Forge classes aren't, you are correct. I thought that BrewingRecipeRegistry was a Vanilla class. Good catch.- Help with NBTs and Persistent Data
What version of Minecraft?- Making Mods
https://mcforge.readthedocs.io/en/1.15.x/gettingstarted/- Support 1.15 and 1.16 with the same codebase
No. The only way to write an abstraction layer that would be able to determine which method to call (eg. if its signature changed in any way) without crashing would be reflection. And using reflection on every point your code touches Forge or Vanilla would bog the JVM down to uselessness. That's why major versions exist.- [1.16] Removing Brewing Recipes From The Registry
Also also, you need to pass in the SRG name, not the MCP name.- Support 1.15 and 1.16 with the same codebase
Hahahaha no. The underlying code that your mod operates on has changed.- When to use world.isRemote
world.isRemote can't help with that. Specifically.- Custom Potion Recipes Return Noncraftable Potions
These do basically the same thing (if you had marked the methods with the @SubscribeEvent annotation, they actually would; as is the EVENT_BUS.register call does nothing). But its largely pointless, because those event methods are empty anyway.- [1.16] Removing Brewing Recipes From The Registry
BrewingRecipeRegistry isn't a Forge registry, you need to use reflection to access the underlying array object.- [ 1.16.1 ] X-ray on model bot side?
You should use a voxel shape that as closely matches your model as possible. Your model appears to be only 1 pixel thick in either the X or Z direction, aligned to the center of the block. So your voxel shape should be more like (0,0,7.5) to (16, 0, 8.5).- Toggle block models
1.15 (well, 1.13+) does not have ModelLoader.setCustomModelResourceLocation because its functionality is no longer required because vanilla model systems are smarter.- When to use world.isRemote
For when you are in code that runs on both the logical server and the logical client, and what you want to do should only be performed on one or the other.- Need Help With Deferred Register (Forge 1.15.2)
Jesus christ. https://github.com/MinecraftForge/MinecraftForge/blob/1.15.x/src/main/java/net/minecraftforge/registries/DeferredRegister.java#L93- Volume of a Block
As I said, you're going to have to compute it yourself. No. You're going to need to read the code. But as far as I understand it, its just a bunch of axis aligned cuboids.- [1.12.2] How To Make More Then One Fluid
1.12 is no longer supported. Update.- Volume of a Block
You'd have to use the VoxelShape, yes. As for how, you're going to have to compute it manually. - Help with NBTs and Persistent Data
IPS spam blocked by CleanTalk.
Important Information
By using this site, you agree to our Terms of Use.