Everything posted by cinsiian
-
[1.14.4] Event not getting registered
oh
-
[1.14.4] Event not getting registered
I cannot find any of these events in my forge
-
[1.14.4] Event not getting registered
I am using the version 28.1.10
-
[1.14.4] Event not getting registered
Do I have to register it via MinecraftForge.EVENT_BUS ?
-
[1.14.4] Event not getting registered
@EventBusSubscriber public class Handler { @SubscribeEvent() public static void drop(HarvestDropsEvent event) { Block block = event.getState().getBlock(); Random rand = new Random(); if(block instanceof TallGrassBlock && !event.isSilkTouching()) { int gen = 1 + rand.nextInt(100); int extra = 1 + rand.nextInt(50); if(gen < 51) {event.getDrops().add(new ItemStack(Items.PLANT_FIBER));} if(extra < 14) {event.getDrops().add(new ItemStack(Items.PLANT_FIBER));} } if((block == Blocks.GRASS || block == Blocks.DIRT || block == Blocks.COARSE_DIRT || block == Blocks.PODZOL || block == Blocks.MYCELIUM) && !event.isSilkTouching()) { int gen = 1 + rand.nextInt(100); int extra = 1 + rand.nextInt(50); if(gen < 21) {event.getDrops().add(new ItemStack(Items.PLANT_FIBER));} if(extra < 14) {event.getDrops().add(new ItemStack(Items.PLANT_FIBER));} } } } Okay basically this event is not getting registered, whats the problem?
-
[1.14] Make some blocks affected by gravity.
Oh I made the block in the event and now works. Thank you
-
[1.14] Make some blocks affected by gravity.
public Block dirt_gravity = new GravityBlock(Blocks.DIRT).setRegistryName(Blocks.DIRT.getRegistryName()); @SubscribeEvent public void register_block(RegistryEvent.Register<Block> event) { event.getRegistry().register(dirt_gravity); } @SubscribeEvent public void register_item(RegistryEvent.Register<Item> event) { event.getRegistry().register(new BlockItem(dirt_gravity, new Item.Properties()).setRegistryName(Blocks.DIRT.getRegistryName())); } still nothing
-
[1.14] Make some blocks affected by gravity.
event.getRegistry().register(new GravityBlock(Blocks.DIRT).setRegistryName(Blocks.DIRT.getRegistryName())); I tried also with new ResourceLocation("minecraft", "dirt") but nothing is happening :8 Do I have to make an itemblock as well?
-
[1.14] Make some blocks affected by gravity.
event.getRegistry().register(new GravityBlock(Blocks.DIRT).setRegistryName("dirt")); Nothing is changed. Am I doing something wrong?
-
[1.14] Make some blocks affected by gravity.
I assume I didnt override the block correctly?
-
[1.14] Make some blocks affected by gravity.
Hello, how can i make some vanilla blocks affected by gravity? Is it possible? Like in a registry event do I check the block and then make it extends FallingBlock? Thank you
-
[1.14.4] Entity that can wear armor/use items
Hello. I need to cast an Entity to another entity wich can grab items/wear armor. How is this entity type called? I need that to check the armor slots. Than you
-
[1.14.4] HUD adaptation
oh my bad, i forgot to move the rendering method. Thank you everything is fixed.
-
[1.14.4] HUD adaptation
- [1.14.4] HUD adaptation
Do horse health work like player health? Because I'm checking if the health > 20 and nothing happens(The horse has 2 health bars)- [1.14.4] HUD adaptation
No its not, in 1.13 mojang made that you need to regenerate the air outside the water. But yea, I fixed it. Now I just need to know- [1.14.4] HUD adaptation
Its in the spoiler.. i just need to hide the air bar when the player's air is regenerating- [1.14.4] HUD adaptation
Hello, so I made a custom bar above the hunger bar, and sometimes it overrites vanilla's guis. I already managed to move it up if the player is swimming/in water to make the air bar appear. The problem is that when you get out the water the air bar keeps getting shown and i need to hide it. I tried to do that but it doesnt work: I also need to check if the player is rinding an entity and get the entity's health. In this case i will check if the health is > 2, and then if its true, render my hud above the entity health's bar. How can I do that? Thanks.- [SOLVED] How to summon a lightning strike in 1.14.4
Thank you, solved- [SOLVED] How to summon a lightning strike in 1.14.4
Hello everyone, So basically when I summon my lightning, the effect doesnt come out, it just spawns the fire where the lightning should spawn. This is the code that im currently using: Do I have to send something to the client? Thanks for help.- How to spawn lightning with forge 1.14
I dont think this is the correct way to save values, just use the player and the world(player.getEntityWorld) provided by the event. I suggest to use a PlayerInteractEvent instead of InputEvent, you can get the player/world from there.- [SOLVED] Mana game mechanic in 1.14.4 help
I finally did it, I managed to get it work, thanks everyone for the help! Marking this as solved. Thanks everyone again!!!!- [SOLVED] Mana game mechanic in 1.14.4 help
Oh I get it, I have to set the server's player mana using the constructor in a network event. Am I right?- [SOLVED] Mana game mechanic in 1.14.4 help
Ok but i dont need the client player, i need the server player wich I can get the capability and set the Packet.mana for the client (Server > Client)- [SOLVED] Mana game mechanic in 1.14.4 help
So how can I get the normal player? - [1.14.4] HUD adaptation
IPS spam blocked by CleanTalk.
Important Information
By using this site, you agree to our Terms of Use.