Jump to content

zerodeaths000

Members
  • Posts

    9
  • Joined

  • Last visited

Everything posted by zerodeaths000

  1. Hi, Im trying to create a custom block that when right-clicked, opens up a custom crafting gui, and able to craft recipes in the table. I struggled with understanding the implementation of the normal crafting table but failed for a long time, thats why I decided to seek help. Thanks for any responses!
  2. Figured it out. For anyone wondering, you can use the blockstate's getValue function, pass it your IntegerProperty, and it returns the current value!
  3. Hey, I created a custom crop for minecraft 1.19.3, and want to check if its current age is == x. What is the correct way of approaching and solving this problem?
  4. Make sure that you download the Windows installer, then open Java, and maybe try launching forge with: -java -jar [FORGE JAR NAME].jar If it doesn't work than make sure that you didn't download the Newest forge version and java version, they can be unstable.
  5. Im not entirely sure of what I'm supposed to do, I don't really understand how to call spawnParticles(), could you send an example? Have a nice day!
  6. I couldn't give a better title. I have a code that generates some particles when an item gets thrown. I just don't understand why the particles are invisible. Im using wolrd.addParticle() to add them to the world. My code: public class ThrowFireEvent { @SubscribeEvent public static void ThrowFireEvent(ItemTossEvent event) { ItemEntity item = event.getEntityItem(); World world = item.getEntityWorld(); double x = (double)item.getPosition().getX(); double y = (double)item.getPosition().getY(); double z = (double)item.getPosition().getZ(); world.addParticle(ParticleTypes.CAMPFIRE_COSY_SMOKE, true, x, y, z, 0.0D, 0.05D, 0.0D); } } There are no errors in the code and once I printed out the world and the coordinates and they were all right. I also took a look at minecraft's torch block and It does it at the same way. Hopefully you know the answer, and every bit of help is appreciated. (Sorry for bad English, and plus note, I'm using 1.15.2) Edit: It does work when I call it in other events.
  7. Hi guys, I recently started modding in minecraft, I have previous experience from a lot of languages, but for me, java is somehow different. Anyways, im creating a simple mod that creates some particles when you throw something in the fire. This is how the class looks like: public class ThrowFireEvent { @SubscribeEvent public static void ThrowFireEvent(ItemTossEvent event) { ItemEntity item = event.getEntityItem(); World world = item.getEntityWorld(); while(!item.isBurning()) { if(item.isBurning()) { double x = item.chunkCoordX; double y = item.chunkCoordY; double z = item.chunkCoordZ; } } } } I want to create the particles with world.addParticles() but I can't find out what particleData means. Thanks for the helps and have a nice day! (Sorry for bad English)
×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.