I want my entity to spawn a few seconds after the sound plays
player.playSound(SoundInit.HORN_DISC.get(), SoundCategory.AMBIENT, 5.0f, 1.0f);
if(entitytype.spawn((ServerWorld)world, itemstack, context.getPlayer(), blockpos1, SpawnReason.SPAWN_EGG, true, !Objects.equals(blockpos, blockpos1) && direction == Direction.UP) != null) {
if(!player.abilities.isCreativeMode) {
itemstack.setDamage(1);
}
}
Hello. I want to delay the execution of code, so therefore I need a manual tick counter. Problem is I don't know how to make a manual tick counter. Can someone send me an example of one or simply explain what I have to do? Please understand that I am new modding and coding in general so I'd appreciate it if you were to give a more detailed explanation. Thanks in advance.
I want to make an object of ServerWorld inside the Item#onItemUse method. I am very new to java and modding and I need help. I tried doing ServerWorld world = new Serverworld(...); but it has a lot of parameters. So how should I do this?
So I am new to modding and I was wondering how I can like my 2 (and more in the future) mods using dependencies (I have my main mod and a side mod). I tried putting the dependency in the mods.toml file and include the .jar file of my main mod in run>mods but it shows an error (shown below). https://github.com/congueror/CTools https://github.com/congueror/CLib
EDIT: congueror's lib is my main mod
When ever I try killing the ender dragon it crashes my game and sends me this:
Colliding entity with block
java.lang.NullPointerException: Colliding entity with block
I have 5GB Allocated and I tried this with no mods and it still crashed.
Please fix this and keep up the good work.
Important Information
By using this site, you agree to our Terms of Use.