diff --git a/src/main/java/carpet/fakes/ExperienceOrbInterface.java b/src/main/java/carpet/fakes/ExperienceOrbInterface.java deleted file mode 100644 index f6f0485f..00000000 --- a/src/main/java/carpet/fakes/ExperienceOrbInterface.java +++ /dev/null @@ -1,10 +0,0 @@ -package carpet.fakes; - -public interface ExperienceOrbInterface -{ - int getCombineDelay(); - void setCombineDelay(int what); - void setAmount(int what); - int getCount(); - void setCount(int i); -} diff --git a/src/main/java/carpet/helpers/FeatureGenerator.java b/src/main/java/carpet/helpers/FeatureGenerator.java index 5751caac..81f19f91 100644 --- a/src/main/java/carpet/helpers/FeatureGenerator.java +++ b/src/main/java/carpet/helpers/FeatureGenerator.java @@ -11,7 +11,6 @@ import java.util.Map; import java.util.Objects; import java.util.Optional; import java.util.OptionalInt; -import java.util.Random; import net.minecraft.core.BlockPos; import net.minecraft.core.Holder; @@ -60,7 +59,6 @@ import net.minecraft.world.level.levelgen.structure.structures.JigsawStructure; public class FeatureGenerator { - public static final Object boo = new Object(); synchronized public static Boolean plop(String featureName, ServerLevel world, BlockPos pos) { Thing custom = featureMap.get(featureName); @@ -170,13 +168,6 @@ public class FeatureGenerator return (w, p) -> plopAnywhere(structure, w, p, w.getChunkSource().getGenerator(), wireOnly); } - public static Boolean spawn(String name, ServerLevel world, BlockPos pos) - { - if (featureMap.containsKey(name)) - return featureMap.get(name).plop(world, pos); - return null; - } - private static Structure getDefaultFeature(StructureType structure, ServerLevel world, BlockPos pos) { // would be nice to have a way to grab structures of this type for position @@ -345,8 +336,6 @@ public class FeatureGenerator public static boolean plopAnywhere(Structure structure, ServerLevel world, BlockPos pos, ChunkGenerator generator, boolean wireOnly) { - if (world.isClientSide()) - return false; CarpetSettings.skipGenerationChecks.set(true); try { diff --git a/src/main/java/carpet/helpers/ThrowableSuppression.java b/src/main/java/carpet/helpers/ThrowableSuppression.java deleted file mode 100644 index 981c0945..00000000 --- a/src/main/java/carpet/helpers/ThrowableSuppression.java +++ /dev/null @@ -1,12 +0,0 @@ -package carpet.helpers; - -import net.minecraft.core.BlockPos; - -public class ThrowableSuppression extends RuntimeException{ - - public final BlockPos pos; - public ThrowableSuppression(String message, BlockPos pos) { - super(message); - this.pos = pos; - } -} \ No newline at end of file diff --git a/src/main/java/carpet/logging/logHelpers/ExplosionLogHelper.java b/src/main/java/carpet/logging/logHelpers/ExplosionLogHelper.java index 7d6edacd..d6ac7bf6 100644 --- a/src/main/java/carpet/logging/logHelpers/ExplosionLogHelper.java +++ b/src/main/java/carpet/logging/logHelpers/ExplosionLogHelper.java @@ -20,7 +20,6 @@ public class ExplosionLogHelper private final boolean createFire; private final Explosion.BlockInteraction blockDestructionType; public final Vec3 pos; - public final Entity entity; private final float power; private boolean affectBlocks = false; private final Object2IntMap impactedEntities = new Object2IntOpenHashMap<>(); @@ -29,8 +28,7 @@ public class ExplosionLogHelper private static int explosionCountInCurretGT = 0; private static boolean newTick; - public ExplosionLogHelper(Entity entity, double x, double y, double z, float power, boolean createFire, Explosion.BlockInteraction blockDestructionType) { - this.entity = entity; + public ExplosionLogHelper(double x, double y, double z, float power, boolean createFire, Explosion.BlockInteraction blockDestructionType) { this.power = power; this.pos = new Vec3(x,y,z); this.createFire = createFire; diff --git a/src/main/java/carpet/mixins/Explosion_optimizedTntMixin.java b/src/main/java/carpet/mixins/Explosion_optimizedTntMixin.java index 97b81263..984f3f31 100644 --- a/src/main/java/carpet/mixins/Explosion_optimizedTntMixin.java +++ b/src/main/java/carpet/mixins/Explosion_optimizedTntMixin.java @@ -13,7 +13,6 @@ import org.spongepowered.asm.mixin.injection.Inject; import org.spongepowered.asm.mixin.injection.Redirect; import org.spongepowered.asm.mixin.injection.callback.CallbackInfo; -import java.util.List; import net.minecraft.core.BlockPos; import net.minecraft.world.damagesource.DamageSource; import net.minecraft.world.entity.Entity; @@ -81,7 +80,7 @@ public abstract class Explosion_optimizedTntMixin { if (LoggerRegistry.__explosions && ! world.isClientSide) { - eLogger = new ExplosionLogHelper(entity, x, y, z, power, createFire, destructionType); + eLogger = new ExplosionLogHelper(x, y, z, power, createFire, destructionType); } } diff --git a/src/main/java/carpet/mixins/ServerboundPlayerActionPacketMixin.java b/src/main/java/carpet/mixins/ServerboundPlayerActionPacketMixin.java deleted file mode 100644 index 0d1367d6..00000000 --- a/src/main/java/carpet/mixins/ServerboundPlayerActionPacketMixin.java +++ /dev/null @@ -1,20 +0,0 @@ -package carpet.mixins; - -import net.minecraft.core.BlockPos; -import net.minecraft.core.Direction; -import net.minecraft.network.protocol.game.ServerboundPlayerActionPacket; -import org.spongepowered.asm.mixin.Mixin; -import org.spongepowered.asm.mixin.gen.Accessor; - -@Mixin(ServerboundPlayerActionPacket.class) -public interface ServerboundPlayerActionPacketMixin -{ - @Accessor("pos") - void setPos(BlockPos pos); - - @Accessor("direction") - void setDirection(Direction direction); - - @Accessor("action") - void setAction(ServerboundPlayerActionPacket.Action action); -} diff --git a/src/main/java/carpet/utils/SpawnOverrides.java b/src/main/java/carpet/utils/SpawnOverrides.java index 391666cb..9e704c31 100644 --- a/src/main/java/carpet/utils/SpawnOverrides.java +++ b/src/main/java/carpet/utils/SpawnOverrides.java @@ -83,16 +83,6 @@ public class SpawnOverrides { return level.structureManager().getStructureAt(pos, fortressFeature).isValid(); } - public static boolean isStructureAtPosition(ServerLevel level, StructureType structure, BlockPos pos) - { - for(StructureStart structureStart : startsForFeature(level, SectionPos.of(pos), structure)) { - if (structureStart.getBoundingBox().isInside(pos) && structureStart.isValid()) { - return true; - } - } - return false; - } - public static List startsForFeature(ServerLevel level, SectionPos sectionPos, StructureType structure) { Map allrefs = level.getChunk(sectionPos.x(), sectionPos.z(), ChunkStatus.STRUCTURE_REFERENCES).getAllReferences(); List result = new ArrayList<>(); diff --git a/src/main/resources/carpet.mixins.json b/src/main/resources/carpet.mixins.json index 1acd19eb..04a31c1e 100644 --- a/src/main/resources/carpet.mixins.json +++ b/src/main/resources/carpet.mixins.json @@ -60,7 +60,6 @@ "MinecraftServer_scarpetMixin", "ExperienceOrb_xpNoCooldownMixin", "Player_xpNoCooldownMixin", - "ServerboundPlayerActionPacketMixin", "ServerPlayer_actionPackMixin", "PlayerList_coreMixin", "PlayerList_fakePlayersMixin",