render emissive eye/glow layers, per-model vanilla render types (cutout vs translucent, unshaded), sheep undercoat and vanilla wool colour, angry wolves, tipped arrow and invulnerable wither textures, small armor stand armor textures, elytra rest pose, vanilla mob arm poses (piglins, illagers), layer test scenes
This commit is contained in:
1 parent
45d033bd89
commit
2c2e9e2e32
12 files changed
+896
-99
No files matched your search
@@ -168,6 +168,103 @@ public class PPTest extends JavaPlugin {
|
||||
scenes.put("pose_beds", new Scene("pose_beds", this::poseHumans, 1.3, 2.6, -3.2, 1.3, 0.4, 0.2));
|
||||
scenes.put("pose_stands", new Scene("pose_stands", this::poseStands, 4, 2.4, -5, 4, 0.9, 0));
|
||||
scenes.put("pose_stands_side", new Scene("pose_stands_side", this::poseStands, -3, 2.4, -3, 4, 0.9, 0));
|
||||
// Entity texture / layer states (rfSpawn, deterministic): emissive eyes (spider, cave spider, enderman,
|
||||
// phantom, breeze, copper golem, warden), sheep wool colour / undercoat / baby wool / jeb_, angry wolves,
|
||||
// partial-alpha cutout textures (llama, tropical fish); small armor stands with armor, elytra at rest,
|
||||
// piglin / illager arm poses, skeleton holding a sword, invulnerable wither, tipped / potion arrows.
|
||||
scenes.put("rf_vlayers", new Scene("rf_vlayers", this::rfVisualLayers, 5.5, 3.4, -6, 5.5, 0.6, 2.5));
|
||||
scenes.put("rf_vlayers_close", new Scene("rf_vlayers_close", this::rfVisualLayers, 3.2, 1.5, -2.4, 3.2, 0.5, 1));
|
||||
scenes.put("rf_vstates", new Scene("rf_vstates", this::rfVisualStates, 5.5, 3.4, -6, 5.5, 0.9, 2.5));
|
||||
scenes.put("rf_vstates_close", new Scene("rf_vstates_close", this::rfVisualStates, 3.2, 1.7, -2.6, 3.2, 0.9, 0.5));
|
||||
}
|
||||
|
||||
private void rfVisualLayers(Location o) {
|
||||
// Row 1: emissive eye layers.
|
||||
rfSpawn(o, 0, 0, 0, 180, Spider.class);
|
||||
rfSpawn(o, 1.6, 0, 0, 180, CaveSpider.class);
|
||||
rfSpawn(o, 3.2, 0, 0, 180, Enderman.class);
|
||||
rfSpawn(o, 4.8, 1.2, 0, 180, Phantom.class);
|
||||
rfSpawn(o, 6.4, 0, 0, 180, Breeze.class);
|
||||
rfSpawn(o, 8.0, 0, 0, 180, CopperGolem.class)
|
||||
.setWeatheringState(io.papermc.paper.world.WeatheringCopperState.OXIDIZED);
|
||||
rfSpawn(o, 10.2, 0, 0.5, 180, Warden.class);
|
||||
// Row 2: sheep (white, red, red sheared, baby red, jeb_, blue sheared), angry wolves (wild, tame).
|
||||
rfSpawn(o, 0, 0, 2.6, 180, Sheep.class);
|
||||
rfSpawn(o, 1.4, 0, 2.6, 180, Sheep.class).setColor(DyeColor.RED);
|
||||
Sheep sr = rfSpawn(o, 2.8, 0, 2.6, 180, Sheep.class);
|
||||
sr.setColor(DyeColor.RED);
|
||||
sr.setSheared(true);
|
||||
Sheep sb = rfSpawn(o, 4.2, 0, 2.6, 180, Sheep.class);
|
||||
sb.setColor(DyeColor.RED);
|
||||
sb.setBaby();
|
||||
Sheep jeb = rfSpawn(o, 5.6, 0, 2.6, 180, Sheep.class);
|
||||
jeb.customName(Component.text("jeb_"));
|
||||
Sheep sbl = rfSpawn(o, 7.0, 0, 2.6, 180, Sheep.class);
|
||||
sbl.setColor(DyeColor.BLUE);
|
||||
sbl.setSheared(true);
|
||||
rfSpawn(o, 8.6, 0, 2.6, 180, Wolf.class).setAngry(true);
|
||||
Wolf wt = rfSpawn(o, 10.0, 0, 2.6, 180, Wolf.class);
|
||||
tame(wt, DyeColor.RED);
|
||||
wt.setAngry(true);
|
||||
// Row 3: partial-alpha cutout textures.
|
||||
rfSpawn(o, 0.5, 0, 5.2, 180, Llama.class).setColor(Llama.Color.GRAY);
|
||||
rfSpawn(o, 2.0, 0, 5.2, 180, Llama.class).setColor(Llama.Color.WHITE);
|
||||
TropicalFish tf = rfSpawn(o, 3.4, 0.3, 5.2, 180, TropicalFish.class);
|
||||
tf.setPattern(TropicalFish.Pattern.BRINELY);
|
||||
tf.setBodyColor(DyeColor.ORANGE);
|
||||
tf.setPatternColor(DyeColor.LIGHT_BLUE);
|
||||
for (Entity e : w.getNearbyEntities(o.clone().add(6, 1, 2), 9, 4, 6)) {
|
||||
if (e instanceof LivingEntity le) le.setBodyYaw(180);
|
||||
}
|
||||
}
|
||||
|
||||
private void rfVisualStates(Location o) {
|
||||
// Row 1: small armor stands with armor / elytra, elytra at rest, piglin arm poses.
|
||||
ArmorStand small = rfSpawn(o, 0, 0, 0, 180, ArmorStand.class);
|
||||
small.setSmall(true);
|
||||
small.setArms(true);
|
||||
diamondArmor(small);
|
||||
ArmorStand smallE = rfSpawn(o, 1.2, 0, 0, 180, ArmorStand.class);
|
||||
smallE.setSmall(true);
|
||||
smallE.getEquipment().setChestplate(it(Material.ELYTRA));
|
||||
rfSpawn(o, 2.4, 0, 0, 180, ArmorStand.class).getEquipment().setChestplate(it(Material.ELYTRA));
|
||||
rfSpawn(o, 3.7, 0, 0, 180, Zombie.class).getEquipment().setChestplate(it(Material.ELYTRA));
|
||||
Piglin p1 = rfSpawn(o, 5.0, 0, 0, 180, Piglin.class);
|
||||
p1.getEquipment().setItemInMainHand(it(Material.GOLDEN_SWORD));
|
||||
Piglin p2 = rfSpawn(o, 6.3, 0, 0, 180, Piglin.class);
|
||||
p2.getEquipment().setItemInMainHand(it(Material.GOLDEN_SWORD));
|
||||
p2.setAggressive(true);
|
||||
Piglin p3 = rfSpawn(o, 7.6, 0, 0, 180, Piglin.class);
|
||||
ItemStack cb = it(Material.CROSSBOW);
|
||||
org.bukkit.inventory.meta.CrossbowMeta cm = (org.bukkit.inventory.meta.CrossbowMeta) cb.getItemMeta();
|
||||
cm.addChargedProjectile(it(Material.ARROW));
|
||||
cb.setItemMeta(cm);
|
||||
p3.getEquipment().setItemInMainHand(cb);
|
||||
Piglin p4 = rfSpawn(o, 8.9, 0, 0, 180, Piglin.class);
|
||||
p4.getEquipment().setItemInOffHand(it(Material.GOLD_INGOT));
|
||||
PiglinBrute pb = rfSpawn(o, 10.2, 0, 0, 180, PiglinBrute.class);
|
||||
pb.getEquipment().setItemInMainHand(it(Material.GOLDEN_AXE));
|
||||
pb.setAggressive(true);
|
||||
for (Entity e : List.of(p1, p2, p3, p4, pb)) ((PiglinAbstract) e).setImmuneToZombification(true);
|
||||
// Row 2: illagers, skeleton with a sword, invulnerable wither.
|
||||
rfSpawn(o, 0, 0, 2.6, 180, Pillager.class);
|
||||
rfSpawn(o, 1.3, 0, 2.6, 180, Pillager.class).getEquipment().setItemInMainHand(it(Material.CROSSBOW));
|
||||
rfSpawn(o, 2.6, 0, 2.6, 180, Vindicator.class).getEquipment().setItemInMainHand(it(Material.IRON_AXE));
|
||||
Vindicator va = rfSpawn(o, 3.9, 0, 2.6, 180, Vindicator.class);
|
||||
va.getEquipment().setItemInMainHand(it(Material.IRON_AXE));
|
||||
va.setAggressive(true);
|
||||
rfSpawn(o, 5.2, 0, 2.6, 180, Skeleton.class).getEquipment().setItemInMainHand(it(Material.IRON_SWORD));
|
||||
rfSpawn(o, 8.5, 0, 3.2, 180, Wither.class).setInvulnerableTicks(100);
|
||||
// Row 3: hovering arrows: plain, tipped (custom colour without alpha bit), potion (opaque ARGB colour), spectral.
|
||||
projectile(o.clone().add(0.5, 1, 5.5), new Vector(1, 0, 0), 0.0001, false, Arrow.class);
|
||||
Arrow tipped = (Arrow) projectile(o.clone().add(0.5, 1.6, 5.5), new Vector(1, 0, 0), 0.0001, false, Arrow.class);
|
||||
tipped.setColor(Color.fromARGB(0x00FF2020));
|
||||
Arrow potion = (Arrow) projectile(o.clone().add(0.5, 2.2, 5.5), new Vector(1, 0, 0), 0.0001, false, Arrow.class);
|
||||
potion.setBasePotionType(org.bukkit.potion.PotionType.POISON);
|
||||
projectile(o.clone().add(0.5, 2.8, 5.5), new Vector(1, 0, 0), 0.0001, false, SpectralArrow.class);
|
||||
for (Entity e : w.getNearbyEntities(o.clone().add(6, 1, 2), 9, 4, 6)) {
|
||||
if (e instanceof LivingEntity le && !(e instanceof ArmorStand)) le.setBodyYaw(180);
|
||||
}
|
||||
}
|
||||
|
||||
private void perfFarm(Location o) {
|
||||
|
||||
Reference in new issue
Block a user