-
Posts
16559 -
Joined
-
Last visited
-
Days Won
156
Everything posted by Draco18s
-
Registries are fired in order: Blocks -> Items -> Everything else (in a non-reliable order)
-
Show this class.
-
Yes, so, I see that you have a null pointer somewhere on line 202 of your ItemRegistryHandler. By using my telepathic powers It's probably that variable right there (you should see a blue floating finger pointing at line 202, if you do not, please contact your local psychics association).
-
Have you used guis with a tileentity? Same thing, except you don't have a connection to any server objects. Its just a screen.
-
[1.16.1] Opening written book, and unexpected potion duplication
Draco18s replied to jackokring's topic in Modder Support
No, that's where tags go. Dude: https://minecraft.gamepedia.com/Written_Book#Item_data -
[1.16.1] Opening written book, and unexpected potion duplication
Draco18s replied to jackokring's topic in Modder Support
What. This makes zero sense. Models are 3D models, which are client files. Written book content is NBT data. Go look at WrittenBookItem. -
[1.16.1] Opening written book, and unexpected potion duplication
Draco18s replied to jackokring's topic in Modder Support
Pretty sure the "complete set" in the creative tab is expected behavior. As for the book: https://github.com/jackokring/MinecraftMod/blob/master/src/main/java/uk/co/kring/mc/Jacko.java#L267-L271 I don't see where you are setting its text. As do most items in creative mode... -
[Solved] Is there a way to register TileEntities from an array?
Draco18s replied to BlockyPenguin's topic in Modder Support
Or use a DeferredRegister. -
[1.15.2] /bin/main has mods that were not found
Draco18s replied to tomatoBhutan's topic in Modder Support
minecraft-xl-core != minecraftxlcore -
[Solved] Is there a way to register TileEntities from an array?
Draco18s replied to BlockyPenguin's topic in Modder Support
by the way, e.getRegistry.registerAll() exists. Well, you don't register TEs, you register TE Types. So put those in an array. And yes, you'll probably need a helper function. Write a helper function and put its return value into the array. -
Non-ticking TEs do not generate appreciable amounts of lag.
-
[1.14] BlockState definition missing model for variant
Draco18s replied to nil's topic in Modder Support
Your json file is not valid json. -
How to make an Item Tier have an enchantment glint by default?
Draco18s replied to Snad's topic in Modder Support
-
How to make an Item Tier have an enchantment glint by default?
Draco18s replied to Snad's topic in Modder Support
Ok. Now then. This doesn't happen by magic. You will need to subclass the various tool classes (sword, axe, hoe...) and override hasEffect in them too. -
How to make an Item Tier have an enchantment glint by default?
Draco18s replied to Snad's topic in Modder Support
But you haven't shown where its used. You've shown us that you register one item, an item that does not use the class. -
That's not the problem. That's just a different way to access a capability and ifPresent is perfectly acceptable (and indeed, preferred). I suspect the issue is that ClientTickEvent runs in the main menu before there is a world. Before there is a player and there is no null-check on line 92: Minecraft.getInstance().player.[...] player, there, may be null!
-
createTileEntity in Block [1.16.1] any way to auto from registry?
Draco18s replied to jackokring's topic in Modder Support
if(this == MyBlocks.BlockA) { return new TileEntityA(); } if(this == MyBlocks.BlockB) { return new TileEntityB(); } ... ? -
[1.14.4] ITickable crash on Server [SOLVED]
Draco18s replied to Zeher_Monkey's topic in Modder Support
You have the wrong interface Do not use IInventory, use Capabilities. -
IIRC there's a method (field?) in the FontRenderer that will return the right value. Its been a while since I was digging around in it, but a couple years back I was working on a Unity project where I was trying to replicate the Minecraft UI system (which is now useless, as uGUI is 1000 times better, but imGUI was way worse). All I remember at the moment was that I discovered the value as part of that process when I was not getting a consistent look on the Unity side. A hard coded 9 pixels is probably fine, but its worth spending a few minutes digging around to check.
-
[1.15.2] Registering capability multiple times ERROR
Draco18s replied to xanderindalzone's topic in Modder Support
You do understand that this line: https://github.com/xanderindalzone/customgunsmod/blob/master/src/main/java/com/xanderindalzone/customgunsmod/CustomGunsMod.java#L93 And this line: https://github.com/xanderindalzone/customgunsmod/blob/master/src/main/java/com/xanderindalzone/customgunsmod/CustomGunsMod.java#L89 Do basically the same thing, right? Lines 89 and 91 each register one method specified, line 93 registers "all annotated methods" which happens to be...one method (line 137). Then you have this line: https://github.com/xanderindalzone/customgunsmod/blob/master/src/main/java/com/xanderindalzone/customgunsmod/CustomGunsMod.java#L80 Which literally does the same thing as line 89, registering the same method a second time. -
Because all those bits of info are now specified in the mods.toml file.
-
[1.15.2] Testing mod, Minecraft* will not start
Draco18s replied to TheThorneCorporation's topic in Modder Support
Show your main mod class and your mods.toml file. -
createTileEntity in Block [1.16.1] any way to auto from registry?
Draco18s replied to jackokring's topic in Modder Support
No. I'm saying that the two things are fundamentally unrelated: like temperature and weight. They appear to have a relationship (after all, objects have both temperature and weight...) in that a given block that has a tile entity will have createTileEntity called and it will return a value, but you can't 1:1 map those two things together in any meaningful sense. For example this: https://github.com/Draco18s/ReasonableRealism/blob/1.14.4/src/main/java/com/draco18s/harderores/block/AxelBlock.java#L66-L77 Sometimes the block has a TE, sometimes it does not. Writing a condition that says "when the block has X state, it return TE_X, when it has Y state it returns TE_Y, when it is in Z state, it returns null." It is even possible to write two different blocks to have the same TE. The vanilla furnace for example: at one time the lit furnace and the unlit furnace were two, completely separate, blocks that the game would switch between in order to handle lighting. You simply cannot convert from one to the other because it does not make sense to even ask the question. -
You're right, my mistake. My next guess would be that the bound texture is getting messed up, but OP's rebinding it to a vanilla one and the one that's being rendered mistakenly doesn't look like a vanilla one...