#1321: Clean up some stuff which got missed during previous PRs

- Add missing CraftBukkit comment to CommandGive
- Remove no longer needed IRegistryCustom from CraftStructure conversion
- Use setBasePotionType instead of deprecated setBasePotionData

By: DerFrZocker <derrieple@gmail.com>
This commit is contained in:
CraftBukkit/Spigot
2023-12-26 07:44:21 +11:00
parent fd3e1799d3
commit 61052d56b5
7 changed files with 8 additions and 12 deletions

View File

@@ -39,7 +39,6 @@ import org.bukkit.entity.ThrownPotion;
import org.bukkit.entity.TippedArrow;
import org.bukkit.entity.WitherSkull;
import org.bukkit.inventory.ItemStack;
import org.bukkit.potion.PotionData;
import org.bukkit.potion.PotionType;
import org.bukkit.projectiles.BlockProjectileSource;
import org.bukkit.util.Vector;
@@ -92,7 +91,7 @@ public class CraftBlockProjectileSource implements BlockProjectileSource {
} else if (AbstractArrow.class.isAssignableFrom(projectile)) {
if (TippedArrow.class.isAssignableFrom(projectile)) {
launch = new EntityTippedArrow(world, iposition.x(), iposition.y(), iposition.z(), new net.minecraft.world.item.ItemStack(net.minecraft.world.item.Items.ARROW));
((Arrow) launch.getBukkitEntity()).setBasePotionData(new PotionData(PotionType.WATER, false, false));
((Arrow) launch.getBukkitEntity()).setBasePotionType(PotionType.WATER);
} else if (SpectralArrow.class.isAssignableFrom(projectile)) {
launch = new EntitySpectralArrow(world, iposition.x(), iposition.y(), iposition.z(), new net.minecraft.world.item.ItemStack(net.minecraft.world.item.Items.SPECTRAL_ARROW));
} else {