fixup tests and add missing API detected by those tests

This commit is contained in:
Jake Potrebic
2023-12-08 12:07:56 -08:00
parent 4fc499dde8
commit b21ac86cac
8 changed files with 73 additions and 17 deletions

View File

@@ -17,6 +17,7 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
int datavalue;
switch (effect) {
+ case PARTICLES_SCULK_CHARGE: // Paper - add missing effects
+ case TRIAL_SPAWNER_DETECT_PLAYER: // Paper - add missing effects
case VILLAGER_PLANT_GROW:
datavalue = (Integer) data;
break;
@@ -28,6 +29,20 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
case INSTANT_POTION_BREAK:
datavalue = ((Color) data).asRGB();
break;
@@ -0,0 +0,0 @@ public class CraftEffect {
Preconditions.checkArgument(data == Material.AIR || ((Material) data).isRecord(), "Invalid record type for Material %s!", data);
datavalue = Item.getId(CraftMagicNumbers.getItem((Material) data));
break;
+ // Paper start - handle shoot white smoke event
+ case SHOOT_WHITE_SMOKE:
+ final BlockFace face = (BlockFace) data;
+ Preconditions.checkArgument(face.isCartesian(), face + " isn't cartesian");
+ datavalue = org.bukkit.craftbukkit.block.CraftBlock.blockFaceToNotch(face).get3DDataValue();
+ break;
+ // Paper end - handle shoot white smoke event
case SMOKE:
switch ((BlockFace) data) {
case DOWN:
@@ -0,0 +0,0 @@ public class CraftEffect {
}
break;