Remove some unused code (#1521)
This commit is contained in:
1 parent
94a729bae6
commit
1734930f7e
8 files changed
+2
-69
No files matched your search
@@ -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);
|
||||
}
|
||||
@@ -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
|
||||
{
|
||||
|
||||
@@ -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;
|
||||
}
|
||||
}
|
||||
@@ -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<EntityChangedStatusWithCount> 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;
|
||||
|
||||
@@ -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);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -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);
|
||||
}
|
||||
@@ -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<StructureStart> startsForFeature(ServerLevel level, SectionPos sectionPos, StructureType<?> structure) {
|
||||
Map<Structure, LongSet> allrefs = level.getChunk(sectionPos.x(), sectionPos.z(), ChunkStatus.STRUCTURE_REFERENCES).getAllReferences();
|
||||
List<StructureStart> result = new ArrayList<>();
|
||||
|
||||
@@ -60,7 +60,6 @@
|
||||
"MinecraftServer_scarpetMixin",
|
||||
"ExperienceOrb_xpNoCooldownMixin",
|
||||
"Player_xpNoCooldownMixin",
|
||||
"ServerboundPlayerActionPacketMixin",
|
||||
"ServerPlayer_actionPackMixin",
|
||||
"PlayerList_coreMixin",
|
||||
"PlayerList_fakePlayersMixin",
|
||||
|
||||
Reference in new issue
Block a user