|
48 | 48 | import com.laytonsmith.abstraction.bukkit.blocks.BukkitMCSkull;
|
49 | 49 | import com.laytonsmith.abstraction.bukkit.entities.BukkitMCAgeable;
|
50 | 50 | import com.laytonsmith.abstraction.bukkit.entities.BukkitMCAnimal;
|
| 51 | +import com.laytonsmith.abstraction.bukkit.entities.BukkitMCBoat; |
51 | 52 | import com.laytonsmith.abstraction.bukkit.entities.BukkitMCBreedable;
|
| 53 | +import com.laytonsmith.abstraction.bukkit.entities.BukkitMCChestBoat; |
52 | 54 | import com.laytonsmith.abstraction.bukkit.entities.BukkitMCCommandMinecart;
|
53 | 55 | import com.laytonsmith.abstraction.bukkit.entities.BukkitMCComplexEntityPart;
|
54 | 56 | import com.laytonsmith.abstraction.bukkit.entities.BukkitMCComplexLivingEntity;
|
|
130 | 132 | import org.bukkit.command.ConsoleCommandSender;
|
131 | 133 | import org.bukkit.entity.Ageable;
|
132 | 134 | import org.bukkit.entity.Animals;
|
| 135 | +import org.bukkit.entity.Boat; |
133 | 136 | import org.bukkit.entity.Breedable;
|
| 137 | +import org.bukkit.entity.ChestBoat; |
134 | 138 | import org.bukkit.entity.ComplexEntityPart;
|
135 | 139 | import org.bukkit.entity.ComplexLivingEntity;
|
136 | 140 | import org.bukkit.entity.Entity;
|
@@ -463,6 +467,21 @@ public static MCEntity BukkitGetCorrectEntity(Entity be) {
|
463 | 467 | return new BukkitMCMinecart(be);
|
464 | 468 | }
|
465 | 469 |
|
| 470 | + if(Static.getServer().getMinecraftVersion().gte(MCVersion.MC1_21_3)) { |
| 471 | + // boats were split into different classes by wood type |
| 472 | + if(be instanceof ChestBoat) { |
| 473 | + // Must come before Boat |
| 474 | + type.setWrapperClass(BukkitMCChestBoat.class); |
| 475 | + return new BukkitMCChestBoat(be); |
| 476 | + } |
| 477 | + |
| 478 | + if(be instanceof Boat) { |
| 479 | + // Must come before Vehicle |
| 480 | + type.setWrapperClass(BukkitMCBoat.class); |
| 481 | + return new BukkitMCBoat(be); |
| 482 | + } |
| 483 | + } |
| 484 | + |
466 | 485 | if(be instanceof SizedFireball) {
|
467 | 486 | // Must come before Fireball
|
468 | 487 | type.setWrapperClass(BukkitMCSizedFireball.class);
|
|
0 commit comments