Accessors (update 8 of 20)
This commit is contained in:
parent
424993db2d
commit
78408baa69
6 changed files with 9 additions and 49 deletions
|
@ -11,7 +11,7 @@ import net.minecraft.world.gen.chunk.StructuresConfig;
|
||||||
@Mixin(ChunkGeneratorSettings.class)
|
@Mixin(ChunkGeneratorSettings.class)
|
||||||
public interface ChunkGeneratorSettingsAccessor {
|
public interface ChunkGeneratorSettingsAccessor {
|
||||||
@Invoker("<init>")
|
@Invoker("<init>")
|
||||||
static ChunkGeneratorSettings invokeInit(StructuresConfig structuresConfig, GenerationShapeConfig generationShapeConfig, BlockState defaultBlock, BlockState defaultFluid, int bedrockCeilingY, int bedrockFloorY, int seaLevel, boolean mobGenerationDisabled) {
|
static ChunkGeneratorSettings invokeInit(StructuresConfig structuresConfig, GenerationShapeConfig generationShapeConfig, BlockState defaultBlock, BlockState defaultFluid, int bedrockCeilingY, int bedrockFloorY, int seaLevel, boolean mobGenerationDisabled, boolean bl, boolean bl2) {
|
||||||
throw new AssertionError();
|
throw new AssertionError();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,17 +0,0 @@
|
||||||
package org.dimdev.dimdoors.mixin.accessor;
|
|
||||||
|
|
||||||
import java.util.OptionalLong;
|
|
||||||
|
|
||||||
import org.spongepowered.asm.mixin.Mixin;
|
|
||||||
import org.spongepowered.asm.mixin.gen.Invoker;
|
|
||||||
|
|
||||||
import net.minecraft.util.Identifier;
|
|
||||||
import net.minecraft.world.dimension.DimensionType;
|
|
||||||
|
|
||||||
@Mixin(DimensionType.class)
|
|
||||||
public interface DimensionTypeAccessor {
|
|
||||||
@Invoker("<init>")
|
|
||||||
static DimensionType invokeInit(OptionalLong fixedTime, boolean hasSkylight, boolean hasCeiling, boolean ultrawarm, boolean natural, double coordinateScale, boolean piglinSafe, boolean bedWorks, boolean respawnAnchorWorks, boolean hasRaids, int logicalHeight, Identifier infiniburn, Identifier skyProperties, float ambientLight) {
|
|
||||||
throw new AssertionError();
|
|
||||||
}
|
|
||||||
}
|
|
|
@ -1,17 +0,0 @@
|
||||||
package org.dimdev.dimdoors.mixin.accessor;
|
|
||||||
|
|
||||||
import java.util.List;
|
|
||||||
|
|
||||||
import org.spongepowered.asm.mixin.Mixin;
|
|
||||||
import org.spongepowered.asm.mixin.gen.Invoker;
|
|
||||||
|
|
||||||
import net.minecraft.nbt.ListTag;
|
|
||||||
import net.minecraft.nbt.Tag;
|
|
||||||
|
|
||||||
@Mixin(ListTag.class)
|
|
||||||
public interface ListTagAccessor {
|
|
||||||
@Invoker("<init>")
|
|
||||||
static ListTag of(List<Tag> list, byte type) {
|
|
||||||
throw new AssertionError();
|
|
||||||
}
|
|
||||||
}
|
|
|
@ -119,7 +119,9 @@ public final class ModDimensions {
|
||||||
-10,
|
-10,
|
||||||
5,
|
5,
|
||||||
8,
|
8,
|
||||||
false
|
false,
|
||||||
|
true,
|
||||||
|
true
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -11,10 +11,8 @@
|
||||||
"accessor.ChunkGeneratorAccessor",
|
"accessor.ChunkGeneratorAccessor",
|
||||||
"accessor.ChunkGeneratorSettingsAccessor",
|
"accessor.ChunkGeneratorSettingsAccessor",
|
||||||
"accessor.DefaultParticleTypeAccessor",
|
"accessor.DefaultParticleTypeAccessor",
|
||||||
"accessor.DimensionTypeAccessor",
|
|
||||||
"accessor.DirectionAccessor",
|
"accessor.DirectionAccessor",
|
||||||
"accessor.GenerationSettingsAccessor",
|
"accessor.GenerationSettingsAccessor",
|
||||||
"accessor.ListTagAccessor",
|
|
||||||
"accessor.RedstoneWireBlockAccessor",
|
"accessor.RedstoneWireBlockAccessor",
|
||||||
"accessor.StatsAccessor"
|
"accessor.StatsAccessor"
|
||||||
],
|
],
|
||||||
|
|
|
@ -2,17 +2,17 @@ package org.dimdev.dimdoors.util.schematic.v2;
|
||||||
|
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
import java.util.Objects;
|
import java.util.Objects;
|
||||||
|
import java.util.stream.Stream;
|
||||||
|
|
||||||
import com.google.common.collect.ImmutableList;
|
|
||||||
import org.apache.logging.log4j.LogManager;
|
import org.apache.logging.log4j.LogManager;
|
||||||
import org.apache.logging.log4j.Logger;
|
import org.apache.logging.log4j.Logger;
|
||||||
import org.dimdev.dimdoors.mixin.accessor.ListTagAccessor;
|
|
||||||
|
|
||||||
import net.minecraft.entity.Entity;
|
import net.minecraft.entity.Entity;
|
||||||
import net.minecraft.entity.EntityType;
|
import net.minecraft.entity.EntityType;
|
||||||
import net.minecraft.nbt.CompoundTag;
|
import net.minecraft.nbt.CompoundTag;
|
||||||
import net.minecraft.nbt.DoubleTag;
|
import net.minecraft.nbt.DoubleTag;
|
||||||
import net.minecraft.nbt.ListTag;
|
import net.minecraft.nbt.ListTag;
|
||||||
|
import net.minecraft.nbt.NbtOps;
|
||||||
import net.minecraft.util.math.BlockPos;
|
import net.minecraft.util.math.BlockPos;
|
||||||
import net.minecraft.world.StructureWorldAccess;
|
import net.minecraft.world.StructureWorldAccess;
|
||||||
|
|
||||||
|
@ -100,14 +100,8 @@ public final class SchematicPlacer {
|
||||||
double y = listTag.getDouble(1);
|
double y = listTag.getDouble(1);
|
||||||
double z = listTag.getDouble(2);
|
double z = listTag.getDouble(2);
|
||||||
tag.remove("Pos");
|
tag.remove("Pos");
|
||||||
tag.put("Pos", ListTagAccessor.of(
|
tag.put("Pos", NbtOps.INSTANCE.createList(Stream.of(DoubleTag.of(x + originX),
|
||||||
ImmutableList.of(
|
|
||||||
DoubleTag.of(x + originX),
|
|
||||||
DoubleTag.of(y + originY),
|
DoubleTag.of(y + originY),
|
||||||
DoubleTag.of(z + originZ)
|
DoubleTag.of(z + originZ))));
|
||||||
),
|
|
||||||
(byte) 6
|
|
||||||
)
|
|
||||||
);
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue