Update yarn

Changes to be committed:
	modified:   gradle.properties
	modified:   src/main/java/org/dimdev/dimcore/schematic/v2/Schematic.java
	modified:   src/main/java/org/dimdev/dimdoors/client/ModRendering.java
	modified:   src/main/java/org/dimdev/dimdoors/command/arguments/GroupArugmentType.java
	modified:   src/main/java/org/dimdev/dimdoors/command/arguments/NameArugmentType.java
	modified:   src/main/java/org/dimdev/dimdoors/command/arguments/SchematicNamespaceArgumentType.java
	modified:   src/main/java/org/dimdev/dimdoors/rift/registry/PlayerRiftPointer.java
	modified:   src/main/java/org/dimdev/dimdoors/rift/registry/PocketEntrancePointer.java
	modified:   src/main/java/org/dimdev/dimdoors/rift/registry/Rift.java
	modified:   src/main/java/org/dimdev/dimdoors/rift/registry/RiftPlaceholder.java
	modified:   src/main/java/org/dimdev/dimdoors/rift/targets/RelativeReference.java
	modified:   src/main/java/org/dimdev/dimdoors/world/ModBiomes.java
	modified:   src/main/java/org/dimdev/dimdoors/world/pocket/PrivatePocketData.java
This commit is contained in:
SD 2020-10-03 10:21:28 +05:30
parent 6fc1a174a3
commit cadea89b76
No known key found for this signature in database
GPG key ID: E36B57EE08544BC5
13 changed files with 24 additions and 24 deletions

View file

@ -1,5 +1,5 @@
minecraft_version=1.16.3
yarn_mappings=1.16.3+build.1
yarn_mappings=1.16.3+build.26
loader_version=0.9.3+build.207
fabric_version=0.21.0+build.407-1.16

View file

@ -31,7 +31,7 @@ public class Schematic {
Codec.SHORT.fieldOf("Width").forGetter(Schematic::getWidth),
Codec.SHORT.fieldOf("Height").forGetter(Schematic::getHeight),
Codec.SHORT.fieldOf("Length").forGetter(Schematic::getLength),
Vec3i.field_25123.fieldOf("Offset").forGetter(Schematic::getOffset),
Vec3i.CODEC.fieldOf("Offset").forGetter(Schematic::getOffset),
Codec.INT.fieldOf("PaletteMax").forGetter(Schematic::getPaletteMax),
SchematicBlockPalette.CODEC.fieldOf("Palette").forGetter(Schematic::getBlockPalette),
Codec.BYTE_BUFFER.fieldOf("BlockData").forGetter(Schematic::getBlockData),

View file

@ -65,7 +65,7 @@ public class ModRendering {
*/
@Override
public void apply(ResourceManager resourceManager) {
final Function<Identifier, Sprite> atlas = MinecraftClient.getInstance().getSpriteAtlas(SpriteAtlasTexture.BLOCK_ATLAS_TEX);
final Function<Identifier, Sprite> atlas = MinecraftClient.getInstance().getSpriteAtlas(PlayerScreenHandler.BLOCK_ATLAS_TEXTURE);
fluidSprites[0] = atlas.apply(stillSpriteId);
fluidSprites[1] = atlas.apply(flowingSpriteId);
}

View file

@ -11,7 +11,7 @@ import com.mojang.brigadier.exceptions.CommandSyntaxException;
import com.mojang.brigadier.suggestion.Suggestions;
import com.mojang.brigadier.suggestion.SuggestionsBuilder;
import net.minecraft.server.command.CommandSource;
import net.minecraft.command.CommandSource;
public class GroupArugmentType implements ArgumentType<String> {
@Override

View file

@ -10,7 +10,7 @@ import com.mojang.brigadier.exceptions.CommandSyntaxException;
import com.mojang.brigadier.suggestion.Suggestions;
import com.mojang.brigadier.suggestion.SuggestionsBuilder;
import net.minecraft.server.command.CommandSource;
import net.minecraft.command.CommandSource;
public class NameArugmentType implements ArgumentType<String> {
@Override

View file

@ -13,7 +13,7 @@ import com.mojang.brigadier.exceptions.SimpleCommandExceptionType;
import com.mojang.brigadier.suggestion.Suggestions;
import com.mojang.brigadier.suggestion.SuggestionsBuilder;
import net.minecraft.server.command.CommandSource;
import net.minecraft.command.CommandSource;
import net.minecraft.text.TranslatableText;
public class SchematicNamespaceArgumentType implements ArgumentType<String> {

View file

@ -10,8 +10,8 @@ import net.minecraft.util.dynamic.DynamicSerializableUuid;
public class PlayerRiftPointer extends RegistryVertex {
public static final Codec<PlayerRiftPointer> CODEC = RecordCodecBuilder.create(instance -> {
return instance.group(
DynamicSerializableUuid.field_25122.fieldOf("id").forGetter(a -> a.id),
DynamicSerializableUuid.field_25122.fieldOf("player").forGetter(a -> a.player)
DynamicSerializableUuid.CODEC.fieldOf("id").forGetter(a -> a.id),
DynamicSerializableUuid.CODEC.fieldOf("player").forGetter(a -> a.player)
).apply(instance, (id, player) -> {
PlayerRiftPointer pointer = new PlayerRiftPointer(player);
pointer.id = id;

View file

@ -10,7 +10,7 @@ import net.minecraft.world.World;
public class PocketEntrancePointer extends RegistryVertex { // TODO: PocketRiftPointer superclass?
public static final Codec<PocketEntrancePointer> CODEC = RecordCodecBuilder.create(instance -> {
return instance.group(
DynamicSerializableUuid.field_25122.fieldOf("id").forGetter(a -> a.id),
DynamicSerializableUuid.CODEC.fieldOf("id").forGetter(a -> a.id),
World.CODEC.fieldOf("pocketDim").forGetter(a -> a.pocketDim),
Codec.INT.fieldOf("pocketId").forGetter(a -> a.pocketId)
).apply(instance, (id, pocketDim, pocketId) -> {

View file

@ -14,7 +14,7 @@ import net.minecraft.util.dynamic.DynamicSerializableUuid;
public class Rift extends RegistryVertex {
public static final Codec<Rift> CODEC = RecordCodecBuilder.create(instance -> {
return instance.group(
DynamicSerializableUuid.field_25122.fieldOf("id").forGetter(a -> a.id),
DynamicSerializableUuid.CODEC.fieldOf("id").forGetter(a -> a.id),
Location.CODEC.fieldOf("location").forGetter(a -> a.location),
Codec.BOOL.fieldOf("isDetached").forGetter(a -> a.isDetached),
LinkProperties.CODEC.fieldOf("properties").forGetter(a -> a.properties)

View file

@ -9,7 +9,7 @@ import net.minecraft.util.dynamic.DynamicSerializableUuid;
public class RiftPlaceholder extends Rift { // TODO: don't extend rift
private static final Logger LOGGER = LogManager.getLogger();
public static Codec<RiftPlaceholder> CODEC = DynamicSerializableUuid.field_25122.xmap(a -> {
public static Codec<RiftPlaceholder> CODEC = DynamicSerializableUuid.CODEC.xmap(a -> {
RiftPlaceholder placeholder = new RiftPlaceholder();
placeholder.id = a;
return placeholder;

View file

@ -7,9 +7,9 @@ import net.minecraft.util.math.Vec3i;
public class RelativeReference extends RiftReference {
private Vec3i offset;
private final Vec3i offset;
public static Codec<RelativeReference> CODEC = Vec3i.field_25123.xmap(RelativeReference::new, RelativeReference::getOffset).fieldOf("offset").codec();
public static Codec<RelativeReference> CODEC = Vec3i.CODEC.xmap(RelativeReference::new, RelativeReference::getOffset).fieldOf("offset").codec();
public RelativeReference(Vec3i offset) {
this.offset = offset;
@ -17,11 +17,11 @@ public class RelativeReference extends RiftReference {
@Override
public Location getReferencedLocation() {
return new Location(location.world, location.pos.add(offset));
return new Location(this.location.world, this.location.pos.add(this.offset));
}
public Vec3i getOffset() {
return offset;
return this.offset;
}
@Override

View file

@ -56,7 +56,7 @@ public final class ModBiomes {
}
static {
Biome.Builder voidBiomeBuilder = new Biome.Builder().category(Biome.Category.NONE).depth(0).downfall(0).generationSettings(new GenerationSettings.Builder().surfaceBuilder(SurfaceBuilder.DEFAULT.method_30478(new TernarySurfaceConfig(Blocks.AIR.getDefaultState(), Blocks.AIR.getDefaultState(), Blocks.VOID_AIR.getDefaultState()))).build()).precipitation(Biome.Precipitation.NONE).scale(0).spawnSettings(new SpawnSettings.Builder().build()).temperature(0.8f).temperatureModifier(Biome.TemperatureModifier.NONE);
Biome.Builder voidBiomeBuilder = new Biome.Builder().category(Biome.Category.NONE).depth(0).downfall(0).generationSettings(new GenerationSettings.Builder().surfaceBuilder(SurfaceBuilder.DEFAULT.withConfig(new TernarySurfaceConfig(Blocks.AIR.getDefaultState(), Blocks.AIR.getDefaultState(), Blocks.VOID_AIR.getDefaultState()))).build()).precipitation(Biome.Precipitation.NONE).scale(0).spawnSettings(new SpawnSettings.Builder().build()).temperature(0.8f).temperatureModifier(Biome.TemperatureModifier.NONE);
PERSONAL_WHITE_VOID_KEY = RegistryKey.of(Registry.BIOME_KEY, new Identifier("dimdoors:white_void"));
PUBLIC_BLACK_VOID_KEY = RegistryKey.of(Registry.BIOME_KEY, new Identifier("dimdoors:black_void"));
DUNGEON_DANGEROUS_BLACK_VOID_KEY = RegistryKey.of(Registry.BIOME_KEY, new Identifier("dimdoors:dangerous_black_void"));
@ -81,7 +81,7 @@ public final class ModBiomes {
.generationSettings(new GenerationSettings.Builder()
.feature(GenerationStep.Feature.SURFACE_STRUCTURES, ModFeatures.LIMBO_GATEWAY_CONFIGURED_FEATURE)
.feature(GenerationStep.Feature.LAKES, ModFeatures.ETERNAL_FLUID_LAKE)
.surfaceBuilder(SurfaceBuilder.NETHER.method_30478(new TernarySurfaceConfig(ModBlocks.UNRAVELLED_FABRIC.getDefaultState(), ModBlocks.UNRAVELLED_FABRIC.getDefaultState(), ModBlocks.ETERNAL_FLUID.getDefaultState())))
.surfaceBuilder(SurfaceBuilder.NETHER.withConfig(new TernarySurfaceConfig(ModBlocks.UNRAVELLED_FABRIC.getDefaultState(), ModBlocks.UNRAVELLED_FABRIC.getDefaultState(), ModBlocks.ETERNAL_FLUID.getDefaultState())))
.build())
.precipitation(Biome.Precipitation.NONE)
.scale(2F)

View file

@ -35,7 +35,7 @@ public class PrivatePocketData extends PersistentState {
}
}
public static final Codec<BiMap<UUID, PocketInfo>> CODEC = Codec.unboundedMap(DynamicSerializableUuid.field_25122, PocketInfo.CODEC).xmap(HashBiMap::create, a -> a);
public static final Codec<BiMap<UUID, PocketInfo>> CODEC = Codec.unboundedMap(DynamicSerializableUuid.CODEC, PocketInfo.CODEC).xmap(HashBiMap::create, a -> a);
private static final String DATA_NAME = "dimdoors_private_pockets";
@ -55,27 +55,27 @@ public class PrivatePocketData extends PersistentState {
@Override
public void fromTag(CompoundTag nbt) {
privatePocketMap = NbtUtil.deserialize(nbt.get("privatePocketMap"), CODEC);
this.privatePocketMap = NbtUtil.deserialize(nbt.get("privatePocketMap"), CODEC);
}
@Override
public CompoundTag toTag(CompoundTag nbt) {
nbt.put("privatePocketMap", NbtUtil.serialize(privatePocketMap, CODEC));
nbt.put("privatePocketMap", NbtUtil.serialize(this.privatePocketMap, CODEC));
return nbt;
}
public Pocket getPrivatePocket(UUID playerUUID) {
PocketInfo pocket = privatePocketMap.get(playerUUID);
PocketInfo pocket = this.privatePocketMap.get(playerUUID);
if (pocket == null) return null;
return PocketRegistry.getInstance(pocket.world).getPocket(pocket.id);
}
public void setPrivatePocketID(UUID playerUUID, Pocket pocket) {
privatePocketMap.put(playerUUID, new PocketInfo(pocket.world, pocket.id));
markDirty();
this.privatePocketMap.put(playerUUID, new PocketInfo(pocket.world, pocket.id));
this.markDirty();
}
public UUID getPrivatePocketOwner(Pocket pocket) {
return privatePocketMap.inverse().get(new PocketInfo(pocket.world, pocket.id));
return this.privatePocketMap.inverse().get(new PocketInfo(pocket.world, pocket.id));
}
}