This commit is contained in:
Zoë Gidiere
2025-10-03 00:59:43 -06:00
parent 2b5d613aef
commit c1a00ca5c7
15 changed files with 59 additions and 75 deletions
@@ -1,15 +1,15 @@
package com.dfsek.terra.bukkit;
import com.dfsek.terra.api.command.CommandSender;
import com.dfsek.terra.api.entity.Entity;
import com.dfsek.terra.api.entity.Player;
import com.dfsek.terra.bukkit.world.BukkitAdapter;
import io.papermc.paper.command.brigadier.CommandSourceStack;
import org.bukkit.ChatColor;
import java.util.Optional;
import com.dfsek.terra.api.command.CommandSender;
import com.dfsek.terra.api.entity.Entity;
import com.dfsek.terra.api.entity.Player;
import com.dfsek.terra.bukkit.world.BukkitAdapter;
public class CloudCommandSender implements CommandSender {
private final CommandSourceStack delegate;
@@ -108,11 +108,11 @@ public class CommonListener implements Listener {
@EventHandler
public void onWolfSpawn(CreatureSpawnEvent event) {
if (!(event.getEntity() instanceof Wolf wolf)) {
if(!(event.getEntity() instanceof Wolf wolf)) {
return;
}
if (!WOLF_VARIANT_SPAWN_REASONS.contains(event.getSpawnReason())) {
if(!WOLF_VARIANT_SPAWN_REASONS.contains(event.getSpawnReason())) {
logger.debug("Ignoring wolf spawned with reason: " + event.getSpawnReason());
return;
}
@@ -122,12 +122,12 @@ public class CommonListener implements Listener {
@EventHandler
public void onChunkGenerate(ChunkLoadEvent event) {
if (!event.isNewChunk()) {
if(!event.isNewChunk()) {
return;
}
for (Entity entity : event.getChunk().getEntities()) {
if (entity instanceof Wolf wolf) {
for(Entity entity : event.getChunk().getEntities()) {
if(entity instanceof Wolf wolf) {
applyWolfVariant(wolf);
}
}
@@ -19,8 +19,6 @@ package com.dfsek.terra.bukkit.world;
import com.dfsek.seismic.type.vector.Vector3;
import com.dfsek.terra.bukkit.CloudCommandSender;
import io.papermc.paper.command.brigadier.CommandSourceStack;
import org.bukkit.Location;
import org.bukkit.Material;
@@ -43,6 +41,7 @@ import com.dfsek.terra.api.world.chunk.Chunk;
import com.dfsek.terra.api.world.info.WorldProperties;
import com.dfsek.terra.bukkit.BukkitEntity;
import com.dfsek.terra.bukkit.BukkitPlayer;
import com.dfsek.terra.bukkit.CloudCommandSender;
import com.dfsek.terra.bukkit.world.block.BukkitBlockTypeAndItem;
import com.dfsek.terra.bukkit.world.block.data.BukkitBlockState;
import com.dfsek.terra.bukkit.world.inventory.BukkitItemStack;