use of net.minecraft.entity.projectile.thrown.EggEntity in project BleachHack by BleachDrinker420.
the class Trajectories method onTick.
@BleachSubscribe
public void onTick(EventTick event) {
poses.clear();
Entity entity = ProjectileSimulator.summonProjectile(mc.player, getSetting(1).asToggle().getState(), getSetting(2).asToggle().getState(), getSetting(3).asToggle().getState());
if (entity != null) {
poses.add(ProjectileSimulator.simulate(entity));
}
if (getSetting(4).asToggle().getState()) {
for (Entity e : mc.world.getEntities()) {
if (e instanceof ThrownEntity || e instanceof PersistentProjectileEntity) {
if (!getSetting(4).asToggle().getChild(0).asToggle().getState() && (e instanceof SnowballEntity || e instanceof EggEntity || e instanceof EnderPearlEntity)) {
continue;
}
if (!getSetting(4).asToggle().getChild(1).asToggle().getState() && e instanceof ExperienceBottleEntity) {
continue;
}
if (!mc.world.getBlockCollisions(e, e.getBoundingBox()).allMatch(VoxelShape::isEmpty))
continue;
Triple<List<Vec3d>, Entity, BlockPos> p = ProjectileSimulator.simulate(e);
if (p.getLeft().size() >= 2)
poses.add(p);
}
}
}
if (getSetting(5).asToggle().getState()) {
for (PlayerEntity e : mc.world.getPlayers()) {
if (e == mc.player)
continue;
Entity proj = ProjectileSimulator.summonProjectile(e, getSetting(1).asToggle().getState(), getSetting(2).asToggle().getState(), getSetting(3).asToggle().getState());
if (proj != null) {
poses.add(ProjectileSimulator.simulate(proj));
}
}
}
}
Aggregations