-
Posts
16559 -
Joined
-
Last visited
-
Days Won
156
Everything posted by Draco18s
-
But that's not what that means. What you just said is equivalent to this: int anonymousFunction(BlockState lightLevelToReturn) { return 10; } Notice how the thing named "light level" is not, in fact, the light level?
-
FYI, the parameter you've named "lightLevel" there is badly named. That's a parameter in and is most likely a BlockState
-
I don't know, what's the method signature?
-
A BooleanProperty is an object that says "a blockstate is allowed to have two values: true and false." It is not, itself, the state of the block in the world. Getting a bool from the blockstate is simple: you ask the blockstate for its value.
-
It appears your config (or config class) is broken.
-
[SOLVED][1.16.2] How to place a block using an Item
Draco18s replied to zeldem's topic in Modder Support
It can, its just not desired. Learn what static means, why it is not applicable to singletons, and why your item is a singleton and ItemStacks are not. -
1.12 isn't supported, didn't see that, update to at least 1.14 https://github.com/Dwight-Studio/Deepworld/blob/1.12.2/src/main/java/fr/dwightstudio/deepworld/common/DeepworldItems.java#L23 Problematic Code #14 Create your items properly. Other things: https://github.com/Dwight-Studio/Deepworld/blob/1.12.2/src/main/java/fr/dwightstudio/deepworld/common/DeepworldItems.java#L39 You don't need the DeepWorld. here, the prepare method is already available in the current scope. https://github.com/Dwight-Studio/Deepworld/blob/1.12.2/src/main/java/fr/dwightstudio/deepworld/common/Deepworld.java#L46-L62 Do not log random garbage. No one fucking cares. https://github.com/Dwight-Studio/Deepworld/blob/1.12.2/src/main/java/fr/dwightstudio/deepworld/common/block/BlockFrame.java#L30 If a type of property already exists in vanilla, it is preferential to use the existing property rather than creating a new one. In this case BlockHorizontal.FACING, as it makes intermod compatibility cleaner (eg. an item that can rotate FACING blocks can't rotate your block). https://github.com/Dwight-Studio/Deepworld/blob/1.12.2/src/main/java/fr/dwightstudio/deepworld/common/block/BlockFrame.java#L141-L144 Don't override unless you intend to actually alter functionality. https://github.com/Dwight-Studio/Deepworld/blob/1.12.2/src/main/java/fr/dwightstudio/deepworld/common/item/ItemDeepworld.java Do not create "base" items that your mod items extend. Code Style #4
-
(1.16.1) How to add another texture layer to chestplate
Draco18s replied to iSyriux's topic in Modder Support
On top of that, this line: https://github.com/iSyriux2/BLBLBLLBLB/blob/master/src/main/java/com/isyriux/divinerod/DivineRodMod.java#L43 Does the same thing as all of these put together: https://github.com/iSyriux2/BLBLBLLBLB/blob/master/src/main/java/com/isyriux/divinerod/DivineRodMod.java#L33-L40 Pick an event registration method and stick with it. You even went with a different, third option, here: https://github.com/iSyriux2/BLBLBLLBLB/blob/master/src/main/java/com/isyriux/divinerod/DivineRodMod.java#L80 And another, fourth option, here: https://github.com/iSyriux2/BLBLBLLBLB/blob/master/src/main/java/com/isyriux/divinerod/util/registhandler.java#L23 And then here: https://github.com/iSyriux2/BLBLBLLBLB/blob/master/src/main/java/com/isyriux/divinerod/armour/PowerReenforcedArmourItem.java#L18 Don't return null. -
(1.16.1) How to add another texture layer to chestplate
Draco18s replied to iSyriux's topic in Modder Support
Everything you see here: https://github.com/Draco18s/ReasonableRealism -
(1.16.1) How to add another texture layer to chestplate
Draco18s replied to iSyriux's topic in Modder Support
...yes, yes they do. You have to install something. -
No, you'd have to completely replace the registered item with one of your own. And doing that in a way that doesn't cause issues is complicated.
-
Because checking what block is at a position for a chunk that is being unloaded causes the chunk to be loaded again.
-
[1.15.1] Disable individual vanilla ores from spawning
Draco18s replied to Megaton_216_'s topic in Modder Support
Yeah, my code was "I'm exploring the system" rather than 100% coverage. -
Yes, but other items elsewhere in the world might also leave for other reasons at any time.
-
[1.15.1] Disable individual vanilla ores from spawning
Draco18s replied to Megaton_216_'s topic in Modder Support
Because iron ore isn't generated "in the world" it's generated by the biome during biome feature population. Its how only extreme hills has emerald ore. -
Yeah I never said that. And if fluid duplication is that big of a deal, then suffer the 1mb loss instead.
-
I think the error means this part, then. Change from <SlabBlock> to <Block>
-
And does this class extend anything? If so, what?
-
....ForgeRegistries.BLOCKS?
-
IIRC you shouldn't even need to extend the vanilla Slab or Stair block class, you should be able to create your own just by passing in parameter data.
-
Put in a if statement checking if it is the player?
-
The player has a Position value. Use it.
-
Returning something that is not null is different than not returning anything at all. Learn basic java.
-
Don't return null?
-
Or you do edge-condition checks. Water bottle? 333mb (oh no a loss) Cauldron? 333mb / 666mb / 1000mb (depending on state) Worried about someone pulling 333 out of your widget and putting it in a cauldron, then sucking it out of the cauldron to generate fluid? Don't be. They need to do that 1000 times to get ONE extra block worth of liquid. The game already has matter generators in the form of cobblestone generators. Or maybe you don't. You can only pull 999 out of a cauldron, but in order to fill it you need to push 1000. Big deal.