|
20 | 20 | import net.minecraft.world.entity.projectile.EyeOfEnder;
|
21 | 21 | import net.minecraft.world.entity.projectile.FireworkRocketEntity;
|
22 | 22 | import net.minecraft.world.entity.projectile.ThrownEgg;
|
| 23 | +import net.minecraft.world.entity.projectile.ThrownLingeringPotion; |
| 24 | +import net.minecraft.world.entity.projectile.ThrownSplashPotion; |
23 | 25 | import net.minecraft.world.entity.vehicle.AbstractMinecart;
|
24 | 26 | import net.minecraft.world.item.ItemStack;
|
25 | 27 | import net.minecraft.world.item.Items;
|
|
116 | 118 | import org.bukkit.entity.LargeFireball;
|
117 | 119 | import org.bukkit.entity.LeashHitch;
|
118 | 120 | import org.bukkit.entity.LightningStrike;
|
| 121 | +import org.bukkit.entity.LingeringPotion; |
119 | 122 | import org.bukkit.entity.Llama;
|
120 | 123 | import org.bukkit.entity.LlamaSpit;
|
121 | 124 | import org.bukkit.entity.MagmaCube;
|
|
152 | 155 | import org.bukkit.entity.Snowman;
|
153 | 156 | import org.bukkit.entity.SpectralArrow;
|
154 | 157 | import org.bukkit.entity.Spider;
|
| 158 | +import org.bukkit.entity.SplashPotion; |
155 | 159 | import org.bukkit.entity.Squid;
|
156 | 160 | import org.bukkit.entity.Stray;
|
157 | 161 | import org.bukkit.entity.Strider;
|
@@ -441,14 +445,12 @@ Level minecraftWorld() {
|
441 | 445 | combine(combine(spawnData -> new net.minecraft.world.entity.ExperienceOrb(spawnData.minecraftWorld(), spawnData.x(), spawnData.y(), spawnData.z(), 0, org.bukkit.entity.ExperienceOrb.SpawnReason.CUSTOM, null, null), CLEAR_MOVE_IF_NOT_RANDOMIZED), (spawnData, experienceOrb) -> { if (!spawnData.randomizeData()) { experienceOrb.setYRot(0); } }) // Paper - respect randomizeData
|
442 | 446 | ));
|
443 | 447 | register(new EntityTypeData<>(EntityType.AREA_EFFECT_CLOUD, AreaEffectCloud.class, CraftAreaEffectCloud::new, createAndMove(net.minecraft.world.entity.EntityType.AREA_EFFECT_CLOUD))); // Paper - set area effect cloud rotation
|
444 |
| - register(new EntityTypeData<>(EntityType.EGG, Egg.class, CraftEgg::new, spawnData -> new ThrownEgg(spawnData.minecraftWorld(), spawnData.x(), spawnData.y(), spawnData.z(), new net.minecraft.world.item.ItemStack(Items.EGG)))); |
| 448 | + register(new EntityTypeData<>(EntityType.EGG, Egg.class, CraftEgg::new, spawnData -> new ThrownEgg(spawnData.minecraftWorld(), spawnData.x(), spawnData.y(), spawnData.z(), new ItemStack(Items.EGG)))); |
445 | 449 | register(new EntityTypeData<>(EntityType.LEASH_KNOT, LeashHitch.class, CraftLeash::new, spawnData -> new LeashFenceKnotEntity(spawnData.minecraftWorld(), BlockPos.containing(spawnData.x(), spawnData.y(), spawnData.z())))); // SPIGOT-5732: LeashHitch has no direction and is always centered at a block
|
446 |
| - register(new EntityTypeData<>(EntityType.SNOWBALL, Snowball.class, CraftSnowball::new, spawnData -> new net.minecraft.world.entity.projectile.Snowball(spawnData.minecraftWorld(), spawnData.x(), spawnData.y(), spawnData.z(), new net.minecraft.world.item.ItemStack(Items.SNOWBALL)))); |
| 450 | + register(new EntityTypeData<>(EntityType.SNOWBALL, Snowball.class, CraftSnowball::new, spawnData -> new net.minecraft.world.entity.projectile.Snowball(spawnData.minecraftWorld(), spawnData.x(), spawnData.y(), spawnData.z(), new ItemStack(Items.SNOWBALL)))); |
447 | 451 | register(new EntityTypeData<>(EntityType.EYE_OF_ENDER, EnderSignal.class, CraftEnderSignal::new, spawnData -> new EyeOfEnder(spawnData.minecraftWorld(), spawnData.x(), spawnData.y(), spawnData.z())));
|
448 |
| - register(new EntityTypeData<>(EntityType.POTION, ThrownPotion.class, CraftThrownPotion::new, spawnData -> { |
449 |
| - net.minecraft.world.entity.projectile.ThrownPotion entity = new net.minecraft.world.entity.projectile.ThrownPotion(spawnData.minecraftWorld(), spawnData.x(), spawnData.y(), spawnData.z(), new net.minecraft.world.item.ItemStack(Items.SPLASH_POTION)); |
450 |
| - return entity; |
451 |
| - })); |
| 452 | + register(new EntityTypeData<>(EntityType.SPLASH_POTION, SplashPotion.class, CraftThrownSplashPotion::new, spawnData -> new ThrownSplashPotion(spawnData.minecraftWorld(), spawnData.x(), spawnData.y(), spawnData.z(), new ItemStack(Items.SPLASH_POTION)))); |
| 453 | + register(new EntityTypeData<>(EntityType.LINGERING_POTION, LingeringPotion.class, CraftThrownLingeringPotion::new, spawnData -> new ThrownLingeringPotion(spawnData.minecraftWorld(), spawnData.x(), spawnData.y(), spawnData.z(), new ItemStack(Items.LINGERING_POTION)))); |
452 | 454 | register(new EntityTypeData<>(EntityType.TNT, TNTPrimed.class, CraftTNTPrimed::new, combine(spawnData -> new PrimedTnt(spawnData.minecraftWorld(), spawnData.x(), spawnData.y(), spawnData.z(), null), CLEAR_MOVE_IF_NOT_RANDOMIZED))); // Paper - respect randomizeData
|
453 | 455 | register(new EntityTypeData<>(EntityType.FALLING_BLOCK, FallingBlock.class, CraftFallingBlock::new, spawnData -> {
|
454 | 456 | BlockPos pos = BlockPos.containing(spawnData.x(), spawnData.y(), spawnData.z());
|
|
0 commit comments