Everything posted by Draco18s
-
Removing a block on ther server side
You said, "I should replace X with Y?" And I said, "No, the opposite of that" because I told you not to use Y. What's the opposite of replace X with Y? Why, replace Y with X.
-
Removing a block on ther server side
NO! THE OPPOSITE OF THAT!
-
Removing a block on ther server side
No, World is not only for the client. Minecraft is only for the client. As a result the world the client knows about is the client world. https://github.com/Leonardlasardine/Erasium/blob/d0ff39994f1143c3fd847bc8d9b9f3b290859986/src/main/java/fr/leonard/erasium/quarry/QuarryTileEntity.java#L68 That line is not needed. And do not use assert in runtime code. Also. What's this? A WORLD OBJECT? Gosh I wonder if it exists in the same context as the method you wrote... https://github.com/Leonardlasardine/Erasium/blob/d0ff39994f1143c3fd847bc8d9b9f3b290859986/src/main/java/fr/leonard/erasium/quarry/QuarryTileEntity.java#L69-L79 Don't do this. You're effectively reaching across sides. This will crash the dedicated server because those lines reference your QuaryScreen class, which references this: https://github.com/Leonardlasardine/Erasium/blob/d0ff39994f1143c3fd847bc8d9b9f3b290859986/src/main/java/fr/leonard/erasium/quarry/QuarryScreen.java#L6 Which is client side only.
-
[1.15.2] How to work with capabilities
If only there was some documentation about that...
-
How to give an effect to a player when an item is in a container
Containers don't exist unless the player is actively looking at it. You want your TileEntity to generate the effect.
-
Java Class Inheritance
Because :: is not literal Java syntax. https://stackoverflow.com/questions/27015495/meaning-of-in-java-syntax
-
Java Class Inheritance
Examine existing usages using your IDE? Right click -> Find all References
-
Cannot get property DirectionProperty 1.16.1 Custom Block
You indicated that you were following that video. Yet if I look at your code and compare it to his at about 19:30, he does something that you haven't done. So no, you haven't
-
Cannot get property DirectionProperty 1.16.1 Custom Block
Error seems pretty self explanatory to me.
-
[1.15.2] Is there any open source mod that I can learn from?
Several https://github.com/TheGreyGhost/MinecraftByExample https://github.com/Choonster-Minecraft-Mods (Choonster hasn't updated in a while, but he does have Things, and stuff in 1.14 is going to have a lot of similarities to 1.16)
-
How To Detect An Entity colliding With A Block
If you want a 1x1x1 sized block that hurts you when you walk or rub your face on it, set its voxel shape bounds to something like (0.001,0.001,0.001,0.999,0.999,0.999).
-
ItemStack#damageItem doesn't work
This is pointless. If damage exceeds max damage, the item is broken and removed from your inventory.
-
[1.16.1] Altering hitbox shape of mob
You need to use multiple hitboxes, like the dragon.
-
Which class handles the rendering of a tooltip?
Local variables are never given "deobfuscated" names.
-
Deferred Registers not Wanting to Work in Forge 1.15.2
Or looking at the DeferredRegister class itself to see where the constructor is called from...
-
[1.16.3] ore generation and storage
Literally 9 posts down:
-
Is world capability global?
Barring weird things like cross dimensional renderers (Looking Glass, Immersive Portals). But the mechanics those mods use to handle the extra data isn't backbone.
-
[1.15.2] Find nearest structure locks
Don't recreate this array every time. Create it once. Use an || and do this as the first thing you do, so you don't create local unused variables for the garbage collector to clean up. Oh, you actually don't care about living entities, you care about AnimalEntities. Why the fuck didn't you use this as your early exit condition? Not that either are related to your issue, but good coding practices should still be followed.
-
Is world capability global?
Word == Dimension. Attaching a capability to a world is the same as attaching it to a dimension. The "collection of dimensions that are a save file" does not have its own capability attachment point AFAIK.
-
[1.16.3] Lighting/Shadow issues with blocks taller than 1m
(FWIW, there's no "one block" solution: the game doesn't know that the upper half is occupied, so you can place other blocks there and mobs will pathfind through it)
-
Texture not loading in-game
Please do not send me private messages. You fix file-not-found errors by making the file exist. If you think it does and the game is complaining, then one of the two of you is wrong somewhere (and it ain't the game).
-
loot table not dropping anything
Well, if you aren't using either nor Your loot table doesn't drop anything.
-
New Day Event
No, because a Minecraft day isn't 4000 ticks long.
-
New Day Event
Check the world time and % by the length of a day.
-
Texture not loading in-game
I see FileNotFoundExceptions.
IPS spam blocked by CleanTalk.