mappings
This commit is contained in:
1 parent
76080f1a59
commit
c1deda1b64
13 files changed
+28
-29
No files matched your search
@@ -42,7 +42,7 @@ public abstract class CommandManagerMixin
|
||||
CarpetSettings.impendingFillSkipUpdates = false;
|
||||
}
|
||||
|
||||
// warning expected
|
||||
@SuppressWarnings("UnresolvedMixinReference")
|
||||
@Redirect(method = "execute", at = @At(
|
||||
value = "INVOKE",
|
||||
target = "Lorg/apache/logging/log4j/Logger;isDebugEnabled()Z"
|
||||
|
||||
@@ -2,12 +2,12 @@ package carpet.mixins;
|
||||
|
||||
import carpet.CarpetSettings;
|
||||
import net.minecraft.block.Blocks;
|
||||
import net.minecraft.class_5138;
|
||||
import net.minecraft.entity.EntityCategory;
|
||||
import net.minecraft.util.math.BlockPos;
|
||||
import net.minecraft.world.IWorld;
|
||||
import net.minecraft.world.biome.Biome;
|
||||
import net.minecraft.world.biome.source.BiomeSource;
|
||||
import net.minecraft.world.gen.StructureAccessor;
|
||||
import net.minecraft.world.gen.chunk.ChunkGenerator;
|
||||
import net.minecraft.world.gen.chunk.FlatChunkGenerator;
|
||||
import net.minecraft.world.gen.chunk.FlatChunkGeneratorConfig;
|
||||
@@ -25,7 +25,7 @@ public abstract class FlatChunkGeneratorMixin extends ChunkGenerator<FlatChunkGe
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<Biome.SpawnEntry> getEntitySpawnList(class_5138 arg, EntityCategory category, BlockPos pos)
|
||||
public List<Biome.SpawnEntry> getEntitySpawnList(StructureAccessor arg, EntityCategory category, BlockPos pos)
|
||||
{
|
||||
if (CarpetSettings.flatWorldStructureSpawning)
|
||||
{
|
||||
|
||||
@@ -1,12 +1,12 @@
|
||||
package carpet.mixins;
|
||||
|
||||
import carpet.CarpetSettings;
|
||||
import net.minecraft.class_5138;
|
||||
import net.minecraft.entity.EntityCategory;
|
||||
import net.minecraft.util.math.BlockPos;
|
||||
import net.minecraft.world.IWorld;
|
||||
import net.minecraft.world.biome.Biome;
|
||||
import net.minecraft.world.biome.source.BiomeSource;
|
||||
import net.minecraft.world.gen.StructureAccessor;
|
||||
import net.minecraft.world.gen.chunk.FloatingIslandsChunkGenerator;
|
||||
import net.minecraft.world.gen.chunk.FloatingIslandsChunkGeneratorConfig;
|
||||
import net.minecraft.world.gen.chunk.SurfaceChunkGenerator;
|
||||
@@ -24,7 +24,7 @@ public abstract class FloatingIslandsChunkGeneratorMixin extends SurfaceChunkGen
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<Biome.SpawnEntry> getEntitySpawnList(class_5138 arg, EntityCategory category, BlockPos pos)
|
||||
public List<Biome.SpawnEntry> getEntitySpawnList(StructureAccessor arg, EntityCategory category, BlockPos pos)
|
||||
{
|
||||
if (CarpetSettings.shulkerSpawningInEndCities && EntityCategory.MONSTER == category)
|
||||
{
|
||||
|
||||
@@ -17,6 +17,6 @@ public class HuskEntityMixin
|
||||
private static boolean isSkylightOrTempleVisible(IWorld iWorld, BlockPos blockPos_1)
|
||||
{
|
||||
return iWorld.isSkyVisible(blockPos_1) ||
|
||||
(CarpetSettings.huskSpawningInTemples && Feature.DESERT_PYRAMID.isApproximatelyInsideStructure(iWorld, ((ServerWorld)iWorld).method_27056(), blockPos_1));
|
||||
(CarpetSettings.huskSpawningInTemples && Feature.DESERT_PYRAMID.isApproximatelyInsideStructure(iWorld, ((ServerWorld)iWorld).getStructureAccessor(), blockPos_1));
|
||||
}
|
||||
}
|
||||
@@ -1,12 +1,12 @@
|
||||
package carpet.mixins;
|
||||
|
||||
import carpet.CarpetSettings;
|
||||
import net.minecraft.class_5138;
|
||||
import net.minecraft.entity.EntityCategory;
|
||||
import net.minecraft.util.math.BlockPos;
|
||||
import net.minecraft.world.IWorld;
|
||||
import net.minecraft.world.biome.Biome;
|
||||
import net.minecraft.world.biome.source.BiomeSource;
|
||||
import net.minecraft.world.gen.StructureAccessor;
|
||||
import net.minecraft.world.gen.chunk.OverworldChunkGenerator;
|
||||
import net.minecraft.world.gen.chunk.OverworldChunkGeneratorConfig;
|
||||
import net.minecraft.world.gen.chunk.SurfaceChunkGenerator;
|
||||
@@ -27,9 +27,9 @@ public abstract class OverworldChunkGeneratorMixin extends SurfaceChunkGenerator
|
||||
}
|
||||
|
||||
@Inject(method = "getEntitySpawnList", at = @At(value = "INVOKE", ordinal = 1, shift = At.Shift.BEFORE,
|
||||
target = "Lnet/minecraft/world/gen/feature/StructureFeature;isApproximatelyInsideStructure(Lnet/minecraft/world/IWorld;Lnet/minecraft/class_5138;Lnet/minecraft/util/math/BlockPos;)Z"),
|
||||
target = "Lnet/minecraft/world/gen/feature/StructureFeature;isApproximatelyInsideStructure(Lnet/minecraft/world/IWorld;Lnet/minecraft/world/gen/StructureAccessor;Lnet/minecraft/util/math/BlockPos;)Z"),
|
||||
cancellable = true)
|
||||
private void onGetEntitySpawnList(class_5138 arg, EntityCategory entityCategory, BlockPos blockPos, CallbackInfoReturnable<List<Biome.SpawnEntry>> cir)
|
||||
private void onGetEntitySpawnList(StructureAccessor arg, EntityCategory entityCategory, BlockPos blockPos, CallbackInfoReturnable<List<Biome.SpawnEntry>> cir)
|
||||
{
|
||||
if (CarpetSettings.huskSpawningInTemples)
|
||||
{
|
||||
|
||||
@@ -20,7 +20,7 @@ public abstract class ServerPlayNetworkHandler_antiCheatDisabledMixin
|
||||
|
||||
@Shadow private int vehicleFloatingTicks;
|
||||
|
||||
@Shadow protected abstract boolean isServerOwner();
|
||||
@Shadow protected abstract boolean isHost();
|
||||
|
||||
@Inject(method = "tick", at = @At("HEAD"))
|
||||
private void restrictFloatingBits(CallbackInfo ci)
|
||||
@@ -35,11 +35,11 @@ public abstract class ServerPlayNetworkHandler_antiCheatDisabledMixin
|
||||
|
||||
@Redirect(method = "onVehicleMove", at = @At(
|
||||
value = "INVOKE",
|
||||
target = "Lnet/minecraft/server/network/ServerPlayNetworkHandler;isServerOwner()Z"
|
||||
target = "Lnet/minecraft/server/network/ServerPlayNetworkHandler;isHost()Z"
|
||||
))
|
||||
private boolean isServerTrusting(ServerPlayNetworkHandler serverPlayNetworkHandler)
|
||||
{
|
||||
return isServerOwner() || CarpetSettings.antiCheatDisabled;
|
||||
return isHost() || CarpetSettings.antiCheatDisabled;
|
||||
}
|
||||
|
||||
@Redirect(method = "onPlayerMove", at = @At(
|
||||
|
||||
@@ -14,18 +14,17 @@ import org.spongepowered.asm.mixin.injection.Redirect;
|
||||
@Mixin(ServerWorld.class)
|
||||
public abstract class ServerWorld_fakePlayersMixin
|
||||
{
|
||||
@Shadow
|
||||
boolean ticking;
|
||||
|
||||
@Shadow /*@Nonnull*/ public abstract MinecraftServer getServer();
|
||||
|
||||
@Shadow private boolean inEntityTick;
|
||||
|
||||
@Redirect( method = "removePlayer", at = @At(
|
||||
value = "INVOKE",
|
||||
target = "Lnet/minecraft/server/world/ServerWorld;removeEntity(Lnet/minecraft/entity/Entity;)V"
|
||||
))
|
||||
private void crashRemovePlayer(ServerWorld serverWorld, Entity entity_1, ServerPlayerEntity serverPlayerEntity_1)
|
||||
{
|
||||
if ( !(ticking && serverPlayerEntity_1 instanceof EntityPlayerMPFake) )
|
||||
if ( !(inEntityTick && serverPlayerEntity_1 instanceof EntityPlayerMPFake) )
|
||||
serverWorld.removeEntity(entity_1);
|
||||
else
|
||||
getServer().send(new ServerTask(getServer().getTicks(), () ->
|
||||
|
||||
@@ -68,7 +68,7 @@ public abstract class StructureFeatureMixin implements StructureFeatureInterface
|
||||
BlockBox box = structurestart.getBoundingBox();
|
||||
if (!wireOnly)
|
||||
{
|
||||
structurestart.generateStructure(world, world.method_27056(), generator, rand,
|
||||
structurestart.generateStructure(world, world.getStructureAccessor(), generator, rand,
|
||||
new BlockBox(
|
||||
pos.getX() - this.getRadius() * 16,
|
||||
pos.getZ() - this.getRadius() * 16,
|
||||
|
||||
Reference in new issue
Block a user