1.18-pre1

This commit is contained in:
gnembon committed 2021-11-11 22:49:26 +01:00
1 parent 6468ac37c7
commit 5a6fc19bb0
10 files changed
+57 -24

No files matched your search

@@ -0,0 +1,21 @@
package carpet.mixins;
import carpet.fakes.PlacedFeatureInterface;
import net.minecraft.class_6796;
import net.minecraft.world.gen.feature.ConfiguredFeature;
import org.spongepowered.asm.mixin.Final;
import org.spongepowered.asm.mixin.Mixin;
import org.spongepowered.asm.mixin.Shadow;
import java.util.function.Supplier;
@Mixin(class_6796.class)
public class PlacedFeature_scarpetMixin implements PlacedFeatureInterface {
@Shadow @Final private Supplier<ConfiguredFeature<?, ?>> field_35732;
@Override
public ConfiguredFeature<?, ?> getRawFeature() {
return field_35732.get();
}
}
@@ -136,13 +136,10 @@ public abstract class ServerWorld_tickMixin extends World
if (TickSpeed.process_entities) worldBorder.tick();
}
@Redirect(method = "tick", at = @At(
value = "INVOKE",
target = "Lnet/minecraft/world/dimension/DimensionType;hasSkyLight()Z"
))
private boolean tickWorldBorder(DimensionType dimension)
@Inject(method = "method_39501", cancellable = true, at = @At("HEAD"))
private void tickWorldBorder(CallbackInfo ci)
{
return TickSpeed.process_entities && dimension.hasSkyLight();
if (!TickSpeed.process_entities) ci.cancel();
}
@Redirect(method = "tick", at = @At(
@@ -44,10 +44,12 @@ public abstract class StructureFeatureMixin<C extends FeatureConfig> implements
//@Shadow protected abstract boolean shouldStartAt(ChunkGenerator chunkGenerator, BiomeSource biomeSource, long worldSeed, ChunkRandom random, ChunkPos chunkPos, Biome biome, ChunkPos chunkPos2, C featureConfig, HeightLimitView heightLimitView);
@Shadow protected abstract boolean shouldStartAt(ChunkGenerator chunkGenerator, BiomeSource biomeSource, long worldSeed, ChunkRandom random, ChunkPos pos, ChunkPos chunkPos, C featureConfig, HeightLimitView heightLimitView);
//@Shadow protected abstract boolean shouldStartAt(ChunkGenerator chunkGenerator, BiomeSource biomeSource, long worldSeed, ChunkRandom random, ChunkPos pos, ChunkPos chunkPos, C featureConfig, HeightLimitView heightLimitView);
@Shadow protected abstract boolean shouldStartAt(ChunkGenerator chunkGenerator, BiomeSource biomeSource, long worldSeed, ChunkPos chunkPos, C featureConfig, HeightLimitView heightLimitView);
@Shadow @Final private class_6622<C> field_34929;
@Override
public boolean plopAnywhere(ServerWorld world, BlockPos pos, ChunkGenerator generator, boolean wireOnly, Biome biome, C config)
{
@@ -157,8 +159,8 @@ public abstract class StructureFeatureMixin<C extends FeatureConfig> implements
}
@Override
public boolean shouldStartPublicAt(ChunkGenerator chunkGenerator, BiomeSource biomeSource, long l, ChunkRandom chunkRandom, ChunkPos chpos, ChunkPos chunkPos, C featureConfig, HeightLimitView heightLimitView)
public boolean shouldStartPublicAt(ChunkGenerator chunkGenerator, BiomeSource biomeSource, long l, ChunkPos chunkPos, C featureConfig, HeightLimitView heightLimitView)
{
return shouldStartAt(chunkGenerator, biomeSource, l, chunkRandom, chpos, chunkPos, featureConfig, heightLimitView);
return shouldStartAt(chunkGenerator, biomeSource, l, chunkPos, featureConfig, heightLimitView);
}
}
@@ -16,11 +16,11 @@ import net.minecraft.world.Heightmap;
//import net.minecraft.world.TickScheduler;
import net.minecraft.world.World;
import net.minecraft.world.biome.Biome;
import net.minecraft.world.chunk.BlendingData;
import net.minecraft.world.chunk.Chunk;
import net.minecraft.world.chunk.ChunkSection;
import net.minecraft.world.chunk.UpgradeData;
import net.minecraft.world.chunk.WorldChunk;
import net.minecraft.world.gen.chunk.Blender;
import org.jetbrains.annotations.Nullable;
import org.spongepowered.asm.mixin.Final;
import org.spongepowered.asm.mixin.Mixin;
@@ -35,9 +35,8 @@ public abstract class WorldChunk_movableTEMixin extends Chunk implements WorldCh
@Final
World world;
public WorldChunk_movableTEMixin(ChunkPos chunkPos, UpgradeData upgradeData, HeightLimitView heightLimitView, Registry<Biome> registry, long l, @Nullable ChunkSection[] chunkSections, @Nullable BlendingData blendingData)
{
super(chunkPos, upgradeData, heightLimitView, registry, l, chunkSections, blendingData);
public WorldChunk_movableTEMixin(ChunkPos pos, UpgradeData upgradeData, HeightLimitView heightLimitView, Registry<Biome> biome, long inhabitedTime, @Nullable ChunkSection[] sectionArrayInitializer, @Nullable Blender blendingData) {
super(pos, upgradeData, heightLimitView, biome, inhabitedTime, sectionArrayInitializer, blendingData);
}
@Shadow