Everything posted by Draco18s
-
[1.10.2] Event not working at all.
Do you have this anywhere: @SubscribeEvent public void onEvent(MouseEvent event) { //... }
-
[Solved] Looking to get back into Minecraft Modding
That's effectively a library mod. "Coremod" has a specific meaning.
-
[1.10.2] Event not working at all.
Welp, there's your problem. You're not supposed to extend the event classes. You're supposed to create a single function that takes a single parameter (of any Event subtype) and mark it with an @EventHandler annotation. Can you please link the tutorial you were using?
-
Registering enums
Registry name is per block, not per state. You can only set it once.
-
writeToNBT/readFromNBT not called?
Your TileEntity's NBT methods aren't calling super, ergo there is some data loss (the TE's position in the world), and rather than try and recover what it can (because it doesn't know where it goes), Minecraft just creates a new one.
-
[1.10.2] Block renders on world but not in hand
Alternatively you can just add a rotation to your inventory variant.
-
[1.10.2] Block renders on world but not in hand
Yep, because the item version of your block uses metadata:0. If you want it to be a different variant, you need to specify that. (e.g. getSubBlocks)
-
[1.10.2] Block renders on world but not in hand
The ItemBlock still uses a metadata value somewhere. It's probably using 0.
-
[1.10.2] Block renders on world but not in hand
That depends: is the default state the one used for the itemblock?
-
1.10 crashes on start + missing sounds.
The entire Minecraft class is client side only: import net.minecraft.client.Minecraft;
-
1.10 crashes on start + missing sounds.
Your crash occurs in com.minecolonies.colony.Colony which is not available on your github. Also what Jeffry said. Searched what class?
-
[1.10.2] Block renders on world but not in hand
You'd want the only value for the singular variant in that case, yes.
-
Help with recipe class [1.7.10]
Unrelated question: why does your class start with an 'I'?
-
[1.10.2] Block renders on world but not in hand
It's just a loop that determines all the valid states and registers a renderer for them.
-
[1.10.2] Block renders on world but not in hand
https://github.com/Draco18s/ReasonableRealism/blob/master/src/main/java/com/draco18s/ores/client/ClientProxy.java#L54-L56
-
[1.10.2] Block renders on world but not in hand
Oh! Your block has several states. Are you holding one that does not correspond to the default state?
-
[1.10.2] Block renders on world but not in hand
That should work, provided that the block has an item associated with it.
-
[1.10.2] Block renders on world but not in hand
Did you register a renderer for your itemblock?
-
[1.10.2] Block renders on world but not in hand
You need an inventory variant. You'd know this if you read the log.
-
[1.10.2] Metadata Crop Blockstate/Models
IIRC, it gets truncated binarily to 4 bits. That is, 16 and 0 would be identical.
-
IProperties for texture changes 1.10
getMetaFromState/getStateFromMeta only handles the metadata encoded information (16 unique states) getActualState handles all the other states: TileEntity, World, etc.
-
IProperties for texture changes 1.10
Look at BlockWool, it has a color enum already. You'd want something just like it, only with fewer colors (or you can re-use it). Alternatively, I did my enums like this: https://github.com/Draco18s/ReasonableRealism/blob/master/src/main/java/com/draco18s/hardlib/blockproperties/Props.java#L17-L68 I created an interface to get/find metadata values, name, etc. My approach was simpler as it only required a single interface that I could apply to every enum rather than having an arbitrary approach involving a META_LOOKUP array. (Although it looks like my getByOrdinal(int) method is broken in that repo, and I currently don't have access to my dev; long story short, there's already a way to get an enum by ordinal and that method is just a wrapper, but is supplied by the interface: EnumWhatever.values[n] ).
-
IProperties for texture changes 1.10
Blockstate json files: https://github.com/Draco18s/ReasonableRealism/blob/master/src/main/resources/assets/harderores/blockstates/hardiron.json That block has an IProperty integer for its variants, but enum values work as well: https://github.com/Draco18s/ReasonableRealism/blob/master/src/main/resources/assets/harderores/blockstates/millstone.json#L27
-
Extended Reach [1.10.2]
Is your main mod class called SpearMod ?
-
1.10.2 How to do armor
Go look at what the super method does. Do what the super method does, only use your own Mod ID instead of "minecraft."
IPS spam blocked by CleanTalk.