Everything posted by Draco18s
-
Extending Blocks from Vanilla - Questions about Design Philosophy with regards to Vanilla Block Properties, compatibility
Are you replacing the vanilla doors? No? Then you are not overriding the registry entry for vanilla doors. The "overriding vanilla blocks" issue deals with registering a block with the same registry name of a vanilla entry (eg. "minecraft:door"). You are not doing this, the problem that thread mentions is not relevant. You are extending the door class. You are overriding methods not the blocks. You can do whatever the heck you want to your own blocks, you don't even need to extend BlockDoor if you want to (though not recommended). The problem mentioned in that thread is how due to the way blockstates are serialized you can't add new states to existing blocks. You aren't adding new states to an existing block, you're adding whatever the fuck you want to your own block.
-
Extending Blocks from Vanilla - Questions about Design Philosophy with regards to Vanilla Block Properties, compatibility
That is not what you're trying to do. You're adding new doors not replacing the vanilla door.
-
Half Baked Plans
Tile Entities are more intensive, not less. The game already uses baked models for your blocks, so that won't help, other than cutting down startup time (assuming you do less to compute your models than the base game). Unfortunately beyond that, I don't think we can help.
-
How can you make a Food Item placable?
By the way, your block's voxel shape is way more complex than it needs to be. And some of the values have gotten very...mm...floating point precision error'd (like, 7.299999999999997 instead of 7.3) Grabbed one and ran it through some code I had from the Advent of Code to get an idea of what it looks like (each character represents a 0.5 pixel area). It's a mug. ############# ############# ################## ################### ################### ### ############# ### ############# ### ############# ### ############# ### ############# ################### ################### ################### ############# ############# ########### ########### ######### ######### You could just make that a single cuboid instead of making Minecraft compute the physics shape at such precision. I could see maybe wanting to make it two or three because of the handle, but 50 slices?
-
How can you make a Food Item placable?
Your coder needs to extend the relevant item class to get the behavior you want. I assume that vanilla has a special item class for the sweet berries already and it's just a matter of either using this item for your block, or extending it. But yes, showing the current code will help us address the problem.
-
Adding my block to already existing entity block types
https://lmgtfy.app/?q=java+how+do+I+extend+a+class
-
How to get furnace smelting result ? 1.16.5
It's buried in a complex linq expression here, but example: https://github.com/MinecraftForge/MinecraftForge/blob/72598871762a98c566689acddec539fa369ed86c/src/test/java/net/minecraftforge/debug/gameplay/loot/GlobalLootModifiersTest.java#L158-L164 What that linq expression does is check the itemstack passed to the method to see if it has a smelting result (161), and if so, return the result as a new stack (162), else return the original stack (163).
-
How would I auto smelt items when broken by a specific pickaxe?
It's almost like I wrote all the code you need for you.
-
How to change isImmuneToFire from custom item tool? 1.16.5
What are you trying to make immune to fire? The axe? The player?
-
Adding my block to already existing entity block types
Don't overwrite, extend.
-
Kill a entity from code
I'm sure the server already exists; after all, it would have to in order for you to join the world...
-
(1.16.5) Button on my screen rendering "weird"
You never assign anything to myButton. You changed this:
-
Modifying an entity's loot table
IIRC, the Forge GitHub's samples contain a mob modifier. I don't remember what mob I did though. I vaguely remember it being zombies. But it should provide a functioning template.
-
My custom slimeblock doesnt stick to anything
Ok, now think about the logic you have in your canStickTo function.
-
My custom slimeblock doesnt stick to anything
Well, think about it. You want your sticky blocks to pull each other, yes?
-
My custom slimeblock doesnt stick to anything
To invert this statement: if(other.getBlock() == Blocks.SLIME_BLOCK || other.getBlock() == Blocks.HONEY_BLOCK) return true; Do this: if(other.getBlock() == Blocks.SLIME_BLOCK || other.getBlock() == Blocks.HONEY_BLOCK) return false; You then need to realize that this statement doesn't do what you want: return other.isStickyBlock(); //only stick to other blocks if the other block is also sticky
-
My custom slimeblock doesnt stick to anything
...return false?
-
[Solved][1.18] Crash when attempting to use getDistance() to get distance between player and entity
...and Objects.requireNonNull does not return a non-null value when passed null. It is an assertion; if it fails, throws a null pointer exception. This is its implementation: public static <T> T requireNonNull(T obj) { if (obj == null) throw new NullPointerException(); return obj; }
-
Block does not Light
That boolean property could be called MADE_OF_GOLD for all the relevance it has to its name.
-
[1.16.5] Slider not saving values into nbt
https://mcforge.readthedocs.io/en/1.17.x/networking/
-
[1.16.5] i cant figure out how to make the block light up when its night time and turn off when day
I tend to forget that one, but do remember F4, which opens the type hierarchy for a focused Type, and if I know that I'm looking for a block (or PlayerEvent, or whatever), I can quickly make a variable and F4 it and browse.
-
[1.16.5] i cant figure out how to make the block light up when its night time and turn off when day
This block surely has code you can look at, yeah? Go look at it.
-
[Solved] [1.18] DrawBlockHighlightEvent Doesn't exist anymore?
MCPBot on the Forge discord server.
-
[1.16.5] i cant figure out how to make the block light up when its night time and turn off when day
Hint: take a look at the daylight sensor.
-
Cannot resolve method
Show your code.
IPS spam blocked by CleanTalk.