Everything posted by vemerion
-
How to Programm a Coustom Command that Starts something in the 1.20.1
I think the easiest way to learn about commands is to look at the vanilla commands. Commands.java is probably a good place to start.
- (1.20.1) Rendering text to the HUD
-
[1.20] Add custom entity to custom biome
They will only spawn on grass blocks because of the ANIMALS_SPAWNABLE_ON block tag. So if your biome does not have grass blocks then they won't spawn. Could this be the problem?
-
Interracting with GUIs (client & server side)
Is it a screen from your own mod or do you want to modify an already existing screen?
-
Help with removing/setting curative items for when an item that gives potion effects is used.
Glad it worked, happy to help!
-
Help with removing/setting curative items for when an item that gives potion effects is used.
I think something like this should work: var effect = new MobEffectInstance(ModEffects.BLINDNESS.get(),1,1); effect.setCurativeItems(List.of()); pEntity.addEffect(effect);
- [1.20.2 - Solved] FriendlyByteBuff is null in constructor when using IForgeMenu.create for registration of custom menu type
-
[1.20.2 - Solved] FriendlyByteBuff is null in constructor when using IForgeMenu.create for registration of custom menu type
You can use IForgeServerPlayer.openMenu()
-
Rendering block position outlines for newer versions
Yes, 'RenderWorldLastEvent' should work (although it is called 'RenderLevelLastEvent' in 1.19 and was replaced by 'RenderLevelStageEvent' in 1.20 so I wonder what version you are porting to 🤔). Mostly it is just important to get the parameters right, but there might be some RenderSystem stuff that should be set before. You can look in the vanilla source code what they do when calling renderVoxelShape().
-
Rendering block position outlines for newer versions
You can use LevelRenderer.renderVoxelShape()
-
use custom item with keybind
You should follow the approach described here and then when a key press is detected you need to call 'use()' and also send a packet to the server to make sure the server also calls 'use()'.
-
[1.20.1] Need help detecting the edge of a block before falling
You should remove this to avoid reaching across logical sides. You can instead access the player via 'event.player'. As for your questions, I am not sure what you want to detect. But you can use the 'isOnGround()' method to check if an entity is currently on the ground or not.
- [1.20.4] Best way to make an entity emit light?
-
[1.20.1] Custom Anvil Block "Index 0 out of bounds for length 0" thrown when GUI opened or changed
It looks like you are not calling this.addDataSlot(this.cost); in the last of the NetheriteAnvilMenu constructors.
-
INVALID OR CORRUPTED SAVE DATA
I think the full log is needed track down what the problem is. You can use pastebin for example to upload the log.
-
the :runClient task doesn't work.
If you could post the full log in pastebin or similar that would be great 🙂
-
Creating an instance of block
Can't you instead use one of the blocks in the Blocks class (such as Blocks.AIR) to do the measurements?
-
How to Check if a Mob is Hostile
Probably not a sure-fire way, but you could check if the entity is an instance of 'Enemy', or check if the entity type has the mob category 'MONSTER'.
-
Force client to know whats in a chest
This question came up recent in another post, I think you can find the answer there:
-
How to add 2D Icons to a block dynamically
Sure! You need to create your own BlockEntityRenderer and render the item, and then register the BlockEntityRenderer to your block in the EntityRenderersEvent.RegisterRenderers event
-
[1.18.2] GUI for custom entity with inventory
Yes, I would say a custom network message is the best way to do this (at least to my knowledge)
-
Help with @ObjectHolder
The registry name should be all lowercase, so "item" and not "Item"!
-
Cannot make leaves with holes using the Block class MC 1.19.2
I think specifying "render_type": "minecraft:cutout" in the model json should fix the issues!
-
[SOLVED] [1.19.2] Item rendering dark in inventory
No problem, glad to be of help
-
[SOLVED] [1.19.2] Item rendering dark in inventory
Looks like you need to specify "gui_light": "front" outside of the "base" object.
IPS spam blocked by CleanTalk.