mirror of
https://github.com/architectury/architectury-api.git
synced 2026-04-02 21:47:40 -05:00
Port to 1.21.11 (#685)
* feat: Port to 1.21.11 * style: remove some unused import * fix: fix the wrong workflow * chore: only setup gradle once * fix: fix validate access wideners error * fix: fix testmod not working * fix: fix game rule test error * fix: add missing part * fix: fix neoforge grass color override
This commit is contained in:
@@ -22,7 +22,7 @@ package dev.architectury.core.fluid;
|
||||
import dev.architectury.fluid.FluidStack;
|
||||
import net.minecraft.core.BlockPos;
|
||||
import net.minecraft.network.chat.Component;
|
||||
import net.minecraft.resources.ResourceLocation;
|
||||
import net.minecraft.resources.Identifier;
|
||||
import net.minecraft.sounds.SoundEvent;
|
||||
import net.minecraft.world.item.Item;
|
||||
import net.minecraft.world.item.Rarity;
|
||||
@@ -202,7 +202,7 @@ public interface ArchitecturyFluidAttributes {
|
||||
* or {@link #getSourceTexture(FluidStack)} instead, this method will be removed in a future version.
|
||||
*/
|
||||
@Deprecated(forRemoval = true)
|
||||
ResourceLocation getSourceTexture(@Nullable FluidStack stack, @Nullable BlockAndTintGetter level, @Nullable BlockPos pos);
|
||||
Identifier getSourceTexture(@Nullable FluidStack stack, @Nullable BlockAndTintGetter level, @Nullable BlockPos pos);
|
||||
|
||||
/**
|
||||
* Returns the texture location of this fluid in its source form.
|
||||
@@ -214,7 +214,7 @@ public interface ArchitecturyFluidAttributes {
|
||||
* @param pos the position, can be {@code null}
|
||||
* @return the texture location
|
||||
*/
|
||||
default ResourceLocation getSourceTexture(@Nullable FluidState state, @Nullable BlockAndTintGetter level, @Nullable BlockPos pos) {
|
||||
default Identifier getSourceTexture(@Nullable FluidState state, @Nullable BlockAndTintGetter level, @Nullable BlockPos pos) {
|
||||
return getSourceTexture(state == null ? null : FluidStack.create(state.getType(), FluidStack.bucketAmount()), level, pos);
|
||||
}
|
||||
|
||||
@@ -226,7 +226,7 @@ public interface ArchitecturyFluidAttributes {
|
||||
* @param stack the fluid stack, can be {@code null}
|
||||
* @return the texture location
|
||||
*/
|
||||
default ResourceLocation getSourceTexture(@Nullable FluidStack stack) {
|
||||
default Identifier getSourceTexture(@Nullable FluidStack stack) {
|
||||
return getSourceTexture(stack, null, null);
|
||||
}
|
||||
|
||||
@@ -237,7 +237,7 @@ public interface ArchitecturyFluidAttributes {
|
||||
*
|
||||
* @return the texture location
|
||||
*/
|
||||
default ResourceLocation getSourceTexture() {
|
||||
default Identifier getSourceTexture() {
|
||||
return getSourceTexture(null);
|
||||
}
|
||||
|
||||
@@ -254,7 +254,7 @@ public interface ArchitecturyFluidAttributes {
|
||||
* or {@link #getFlowingTexture(FluidStack)} instead, this method will be removed in a future version.
|
||||
*/
|
||||
@Deprecated(forRemoval = true)
|
||||
ResourceLocation getFlowingTexture(@Nullable FluidStack stack, @Nullable BlockAndTintGetter level, @Nullable BlockPos pos);
|
||||
Identifier getFlowingTexture(@Nullable FluidStack stack, @Nullable BlockAndTintGetter level, @Nullable BlockPos pos);
|
||||
|
||||
/**
|
||||
* Returns the texture location of this fluid in its flowing form.
|
||||
@@ -266,7 +266,7 @@ public interface ArchitecturyFluidAttributes {
|
||||
* @param pos the position, can be {@code null}
|
||||
* @return the texture location
|
||||
*/
|
||||
default ResourceLocation getFlowingTexture(@Nullable FluidState state, @Nullable BlockAndTintGetter level, @Nullable BlockPos pos) {
|
||||
default Identifier getFlowingTexture(@Nullable FluidState state, @Nullable BlockAndTintGetter level, @Nullable BlockPos pos) {
|
||||
return getFlowingTexture(state == null ? null : FluidStack.create(state.getType(), FluidStack.bucketAmount()), level, pos);
|
||||
}
|
||||
|
||||
@@ -278,7 +278,7 @@ public interface ArchitecturyFluidAttributes {
|
||||
* @param stack the fluid stack, can be {@code null}
|
||||
* @return the texture location
|
||||
*/
|
||||
default ResourceLocation getFlowingTexture(@Nullable FluidStack stack) {
|
||||
default Identifier getFlowingTexture(@Nullable FluidStack stack) {
|
||||
return getFlowingTexture(stack, null, null);
|
||||
}
|
||||
|
||||
@@ -289,7 +289,7 @@ public interface ArchitecturyFluidAttributes {
|
||||
*
|
||||
* @return the texture location
|
||||
*/
|
||||
default ResourceLocation getFlowingTexture() {
|
||||
default Identifier getFlowingTexture() {
|
||||
return getFlowingTexture(null);
|
||||
}
|
||||
|
||||
@@ -304,7 +304,7 @@ public interface ArchitecturyFluidAttributes {
|
||||
* @return the texture location, can be {@code null}
|
||||
*/
|
||||
@Nullable
|
||||
default ResourceLocation getOverlayTexture(@Nullable FluidState state, @Nullable BlockAndTintGetter level, @Nullable BlockPos pos) {
|
||||
default Identifier getOverlayTexture(@Nullable FluidState state, @Nullable BlockAndTintGetter level, @Nullable BlockPos pos) {
|
||||
return null;
|
||||
}
|
||||
|
||||
@@ -317,7 +317,7 @@ public interface ArchitecturyFluidAttributes {
|
||||
* @return the texture location, can be {@code null}
|
||||
*/
|
||||
@Nullable
|
||||
default ResourceLocation getOverlayTexture(@Nullable FluidStack stack) {
|
||||
default Identifier getOverlayTexture(@Nullable FluidStack stack) {
|
||||
return null;
|
||||
}
|
||||
|
||||
@@ -329,7 +329,7 @@ public interface ArchitecturyFluidAttributes {
|
||||
* @return the texture location, can be {@code null}
|
||||
*/
|
||||
@Nullable
|
||||
default ResourceLocation getOverlayTexture() {
|
||||
default Identifier getOverlayTexture() {
|
||||
return getOverlayTexture(null);
|
||||
}
|
||||
|
||||
|
||||
@@ -22,9 +22,9 @@ package dev.architectury.core.fluid;
|
||||
import com.google.common.base.Suppliers;
|
||||
import dev.architectury.fluid.FluidStack;
|
||||
import dev.architectury.registry.registries.RegistrySupplier;
|
||||
import net.minecraft.Util;
|
||||
import net.minecraft.util.Util;
|
||||
import net.minecraft.core.BlockPos;
|
||||
import net.minecraft.resources.ResourceLocation;
|
||||
import net.minecraft.resources.Identifier;
|
||||
import net.minecraft.sounds.SoundEvent;
|
||||
import net.minecraft.sounds.SoundEvents;
|
||||
import net.minecraft.world.item.Item;
|
||||
@@ -51,11 +51,11 @@ public class SimpleArchitecturyFluidAttributes implements ArchitecturyFluidAttri
|
||||
private float explosionResistance = 100.0F;
|
||||
private Supplier<? extends Optional<? extends LiquidBlock>> block = Optional::empty;
|
||||
@Nullable
|
||||
private ResourceLocation sourceTexture;
|
||||
private Identifier sourceTexture;
|
||||
@Nullable
|
||||
private ResourceLocation flowingTexture;
|
||||
private Identifier flowingTexture;
|
||||
@Nullable
|
||||
private ResourceLocation overlayTexture;
|
||||
private Identifier overlayTexture;
|
||||
private int color = 0xffffff;
|
||||
private int luminosity = 0;
|
||||
private int density = 1000;
|
||||
@@ -170,7 +170,7 @@ public class SimpleArchitecturyFluidAttributes implements ArchitecturyFluidAttri
|
||||
/**
|
||||
* @see ArchitecturyFluidAttributes#getSourceTexture(FluidState, BlockAndTintGetter, BlockPos)
|
||||
*/
|
||||
public SimpleArchitecturyFluidAttributes sourceTexture(ResourceLocation sourceTexture) {
|
||||
public SimpleArchitecturyFluidAttributes sourceTexture(Identifier sourceTexture) {
|
||||
this.sourceTexture = sourceTexture;
|
||||
return this;
|
||||
}
|
||||
@@ -178,7 +178,7 @@ public class SimpleArchitecturyFluidAttributes implements ArchitecturyFluidAttri
|
||||
/**
|
||||
* @see ArchitecturyFluidAttributes#getFlowingTexture(FluidState, BlockAndTintGetter, BlockPos)
|
||||
*/
|
||||
public SimpleArchitecturyFluidAttributes flowingTexture(ResourceLocation flowingTexture) {
|
||||
public SimpleArchitecturyFluidAttributes flowingTexture(Identifier flowingTexture) {
|
||||
this.flowingTexture = flowingTexture;
|
||||
return this;
|
||||
}
|
||||
@@ -186,7 +186,7 @@ public class SimpleArchitecturyFluidAttributes implements ArchitecturyFluidAttri
|
||||
/**
|
||||
* @see ArchitecturyFluidAttributes#getFlowingTexture(FluidState, BlockAndTintGetter, BlockPos)
|
||||
*/
|
||||
public SimpleArchitecturyFluidAttributes overlayTexture(ResourceLocation overlayTexture) {
|
||||
public SimpleArchitecturyFluidAttributes overlayTexture(Identifier overlayTexture) {
|
||||
this.overlayTexture = overlayTexture;
|
||||
return this;
|
||||
}
|
||||
@@ -317,17 +317,17 @@ public class SimpleArchitecturyFluidAttributes implements ArchitecturyFluidAttri
|
||||
}
|
||||
|
||||
@Override
|
||||
public ResourceLocation getSourceTexture(@Nullable FluidStack stack, @Nullable BlockAndTintGetter level, @Nullable BlockPos pos) {
|
||||
public Identifier getSourceTexture(@Nullable FluidStack stack, @Nullable BlockAndTintGetter level, @Nullable BlockPos pos) {
|
||||
return sourceTexture;
|
||||
}
|
||||
|
||||
@Override
|
||||
public ResourceLocation getFlowingTexture(@Nullable FluidStack stack, @Nullable BlockAndTintGetter level, @Nullable BlockPos pos) {
|
||||
public Identifier getFlowingTexture(@Nullable FluidStack stack, @Nullable BlockAndTintGetter level, @Nullable BlockPos pos) {
|
||||
return flowingTexture;
|
||||
}
|
||||
|
||||
@Override
|
||||
public ResourceLocation getOverlayTexture(@Nullable FluidState state, @Nullable BlockAndTintGetter level, @Nullable BlockPos pos) {
|
||||
public Identifier getOverlayTexture(@Nullable FluidState state, @Nullable BlockAndTintGetter level, @Nullable BlockPos pos) {
|
||||
return overlayTexture;
|
||||
}
|
||||
|
||||
|
||||
@@ -21,14 +21,14 @@ package dev.architectury.extensions.injected;
|
||||
|
||||
import net.minecraft.core.Holder;
|
||||
import net.minecraft.resources.ResourceKey;
|
||||
import net.minecraft.resources.ResourceLocation;
|
||||
import net.minecraft.resources.Identifier;
|
||||
import org.jetbrains.annotations.Nullable;
|
||||
|
||||
public interface InjectedRegistryEntryExtension<T> {
|
||||
Holder<T> arch$holder();
|
||||
|
||||
@Nullable
|
||||
default ResourceLocation arch$registryName() {
|
||||
return arch$holder().unwrapKey().map(ResourceKey::location).orElse(null);
|
||||
default Identifier arch$registryName() {
|
||||
return arch$holder().unwrapKey().map(ResourceKey::identifier).orElse(null);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -21,19 +21,14 @@ package dev.architectury.hooks.fluid;
|
||||
|
||||
import dev.architectury.fluid.FluidStack;
|
||||
import dev.architectury.injectables.annotations.ExpectPlatform;
|
||||
import net.fabricmc.api.EnvType;
|
||||
import net.fabricmc.api.Environment;
|
||||
import net.minecraft.client.renderer.texture.TextureAtlasSprite;
|
||||
import net.minecraft.core.BlockPos;
|
||||
import net.minecraft.core.HolderLookup;
|
||||
import net.minecraft.nbt.CompoundTag;
|
||||
import net.minecraft.nbt.Tag;
|
||||
import net.minecraft.network.RegistryFriendlyByteBuf;
|
||||
import net.minecraft.network.chat.Component;
|
||||
import net.minecraft.world.level.BlockAndTintGetter;
|
||||
import net.minecraft.world.level.Level;
|
||||
import net.minecraft.world.level.material.Fluid;
|
||||
import net.minecraft.world.level.material.FluidState;
|
||||
import org.jetbrains.annotations.Nullable;
|
||||
|
||||
import java.util.Optional;
|
||||
|
||||
@@ -21,13 +21,14 @@ package dev.architectury.hooks.level.biome;
|
||||
|
||||
import dev.architectury.injectables.annotations.ExpectPlatform;
|
||||
import net.minecraft.core.Holder;
|
||||
import net.minecraft.sounds.Music;
|
||||
import net.minecraft.sounds.SoundEvent;
|
||||
import net.minecraft.util.random.WeightedList;
|
||||
import net.minecraft.world.entity.EntityType;
|
||||
import net.minecraft.world.entity.MobCategory;
|
||||
import net.minecraft.world.level.biome.*;
|
||||
import net.minecraft.world.level.biome.Biome;
|
||||
import net.minecraft.world.level.biome.BiomeGenerationSettings;
|
||||
import net.minecraft.world.level.biome.BiomeSpecialEffects;
|
||||
import net.minecraft.world.level.biome.BiomeSpecialEffects.GrassColorModifier;
|
||||
import net.minecraft.world.level.biome.MobSpawnSettings;
|
||||
import net.minecraft.world.level.levelgen.GenerationStep;
|
||||
import net.minecraft.world.level.levelgen.carver.ConfiguredWorldCarver;
|
||||
import net.minecraft.world.level.levelgen.placement.PlacedFeature;
|
||||
@@ -205,36 +206,24 @@ public final class BiomeHooks {
|
||||
this.effects = effects;
|
||||
}
|
||||
|
||||
@Override
|
||||
public EffectsProperties.Mutable setFogColor(int color) {
|
||||
effects.fogColor = color;
|
||||
return this;
|
||||
}
|
||||
|
||||
@Override
|
||||
public EffectsProperties.Mutable setWaterColor(int color) {
|
||||
effects.waterColor = color;
|
||||
return this;
|
||||
}
|
||||
|
||||
@Override
|
||||
public EffectsProperties.Mutable setWaterFogColor(int color) {
|
||||
effects.waterFogColor = color;
|
||||
return this;
|
||||
}
|
||||
|
||||
@Override
|
||||
public EffectsProperties.Mutable setSkyColor(int color) {
|
||||
effects.skyColor = color;
|
||||
return this;
|
||||
}
|
||||
|
||||
@Override
|
||||
public EffectsProperties.Mutable setFoliageColorOverride(@Nullable Integer colorOverride) {
|
||||
effects.foliageColorOverride = Optional.ofNullable(colorOverride);
|
||||
return this;
|
||||
}
|
||||
|
||||
@Override
|
||||
public EffectsProperties.Mutable setDryFoliageColorOverride(@Nullable Integer colorOverride) {
|
||||
effects.dryFoliageColorOverride = Optional.ofNullable(colorOverride);
|
||||
return this;
|
||||
}
|
||||
|
||||
@Override
|
||||
public EffectsProperties.Mutable setGrassColorOverride(@Nullable Integer colorOverride) {
|
||||
effects.grassColorOverride = Optional.ofNullable(colorOverride);
|
||||
@@ -247,61 +236,21 @@ public final class BiomeHooks {
|
||||
return this;
|
||||
}
|
||||
|
||||
@Override
|
||||
public EffectsProperties.Mutable setAmbientParticle(@Nullable AmbientParticleSettings settings) {
|
||||
effects.ambientParticleSettings = Optional.ofNullable(settings);
|
||||
return this;
|
||||
}
|
||||
|
||||
@Override
|
||||
public EffectsProperties.Mutable setAmbientLoopSound(@Nullable Holder<SoundEvent> sound) {
|
||||
effects.ambientLoopSoundEvent = Optional.ofNullable(sound);
|
||||
return this;
|
||||
}
|
||||
|
||||
@Override
|
||||
public EffectsProperties.Mutable setAmbientMoodSound(@Nullable AmbientMoodSettings settings) {
|
||||
effects.ambientMoodSettings = Optional.ofNullable(settings);
|
||||
return this;
|
||||
}
|
||||
|
||||
@Override
|
||||
public EffectsProperties.Mutable setAmbientAdditionsSound(@Nullable AmbientAdditionsSettings settings) {
|
||||
effects.ambientAdditionsSettings = Optional.ofNullable(settings);
|
||||
return this;
|
||||
}
|
||||
|
||||
@Override
|
||||
public EffectsProperties.Mutable setBackgroundMusic(@Nullable WeightedList<Music> music) {
|
||||
effects.backgroundMusic = Optional.ofNullable(music);
|
||||
return this;
|
||||
}
|
||||
|
||||
@Override
|
||||
public int getFogColor() {
|
||||
return effects.fogColor;
|
||||
}
|
||||
|
||||
@Override
|
||||
public int getWaterColor() {
|
||||
return effects.waterColor;
|
||||
}
|
||||
|
||||
@Override
|
||||
public int getWaterFogColor() {
|
||||
return effects.waterFogColor;
|
||||
}
|
||||
|
||||
@Override
|
||||
public int getSkyColor() {
|
||||
return effects.skyColor;
|
||||
}
|
||||
|
||||
@Override
|
||||
public OptionalInt getFoliageColorOverride() {
|
||||
return effects.foliageColorOverride.map(OptionalInt::of).orElseGet(OptionalInt::empty);
|
||||
}
|
||||
|
||||
@Override
|
||||
public OptionalInt getDryFoliageColorOverride() {
|
||||
return effects.dryFoliageColorOverride.map(OptionalInt::of).orElseGet(OptionalInt::empty);
|
||||
}
|
||||
|
||||
@Override
|
||||
public OptionalInt getGrassColorOverride() {
|
||||
return effects.grassColorOverride.map(OptionalInt::of).orElseGet(OptionalInt::empty);
|
||||
@@ -311,31 +260,6 @@ public final class BiomeHooks {
|
||||
public GrassColorModifier getGrassColorModifier() {
|
||||
return effects.grassColorModifier;
|
||||
}
|
||||
|
||||
@Override
|
||||
public Optional<AmbientParticleSettings> getAmbientParticle() {
|
||||
return effects.ambientParticleSettings;
|
||||
}
|
||||
|
||||
@Override
|
||||
public Optional<Holder<SoundEvent>> getAmbientLoopSound() {
|
||||
return effects.ambientLoopSoundEvent;
|
||||
}
|
||||
|
||||
@Override
|
||||
public Optional<AmbientMoodSettings> getAmbientMoodSound() {
|
||||
return effects.ambientMoodSettings;
|
||||
}
|
||||
|
||||
@Override
|
||||
public Optional<AmbientAdditionsSettings> getAmbientAdditionsSound() {
|
||||
return effects.ambientAdditionsSettings;
|
||||
}
|
||||
|
||||
@Override
|
||||
public Optional<WeightedList<Music>> getBackgroundMusic() {
|
||||
return effects.backgroundMusic;
|
||||
}
|
||||
}
|
||||
|
||||
public static class GenerationSettingsWrapped implements GenerationProperties {
|
||||
|
||||
@@ -19,67 +19,31 @@
|
||||
|
||||
package dev.architectury.hooks.level.biome;
|
||||
|
||||
import net.minecraft.core.Holder;
|
||||
import net.minecraft.sounds.Music;
|
||||
import net.minecraft.sounds.SoundEvent;
|
||||
import net.minecraft.util.random.WeightedList;
|
||||
import net.minecraft.world.level.biome.AmbientAdditionsSettings;
|
||||
import net.minecraft.world.level.biome.AmbientMoodSettings;
|
||||
import net.minecraft.world.level.biome.AmbientParticleSettings;
|
||||
import net.minecraft.world.level.biome.BiomeSpecialEffects.GrassColorModifier;
|
||||
import org.jetbrains.annotations.Nullable;
|
||||
|
||||
import java.util.Optional;
|
||||
import java.util.OptionalInt;
|
||||
|
||||
public interface EffectsProperties {
|
||||
int getFogColor();
|
||||
|
||||
int getWaterColor();
|
||||
|
||||
int getWaterFogColor();
|
||||
|
||||
int getSkyColor();
|
||||
|
||||
OptionalInt getFoliageColorOverride();
|
||||
|
||||
OptionalInt getDryFoliageColorOverride();
|
||||
|
||||
OptionalInt getGrassColorOverride();
|
||||
|
||||
GrassColorModifier getGrassColorModifier();
|
||||
|
||||
Optional<AmbientParticleSettings> getAmbientParticle();
|
||||
|
||||
Optional<Holder<SoundEvent>> getAmbientLoopSound();
|
||||
|
||||
Optional<AmbientMoodSettings> getAmbientMoodSound();
|
||||
|
||||
Optional<AmbientAdditionsSettings> getAmbientAdditionsSound();
|
||||
|
||||
Optional<WeightedList<Music>> getBackgroundMusic();
|
||||
|
||||
interface Mutable extends EffectsProperties {
|
||||
EffectsProperties.Mutable setFogColor(int color);
|
||||
|
||||
EffectsProperties.Mutable setWaterColor(int color);
|
||||
|
||||
EffectsProperties.Mutable setWaterFogColor(int color);
|
||||
|
||||
EffectsProperties.Mutable setSkyColor(int color);
|
||||
|
||||
EffectsProperties.Mutable setFoliageColorOverride(@Nullable Integer colorOverride);
|
||||
|
||||
EffectsProperties.Mutable setDryFoliageColorOverride(@Nullable Integer colorOverride);
|
||||
|
||||
EffectsProperties.Mutable setGrassColorOverride(@Nullable Integer colorOverride);
|
||||
|
||||
EffectsProperties.Mutable setGrassColorModifier(GrassColorModifier modifier);
|
||||
|
||||
EffectsProperties.Mutable setAmbientParticle(@Nullable AmbientParticleSettings settings);
|
||||
|
||||
EffectsProperties.Mutable setAmbientLoopSound(@Nullable Holder<SoundEvent> sound);
|
||||
|
||||
EffectsProperties.Mutable setAmbientMoodSound(@Nullable AmbientMoodSettings settings);
|
||||
|
||||
EffectsProperties.Mutable setAmbientAdditionsSound(@Nullable AmbientAdditionsSettings settings);
|
||||
|
||||
EffectsProperties.Mutable setBackgroundMusic(@Nullable WeightedList<Music> music);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -32,7 +32,7 @@ import net.minecraft.network.codec.ByteBufCodecs;
|
||||
import net.minecraft.network.codec.StreamCodec;
|
||||
import net.minecraft.network.protocol.Packet;
|
||||
import net.minecraft.network.protocol.common.custom.CustomPacketPayload;
|
||||
import net.minecraft.resources.ResourceLocation;
|
||||
import net.minecraft.resources.Identifier;
|
||||
import org.jetbrains.annotations.ApiStatus;
|
||||
|
||||
import java.lang.reflect.Method;
|
||||
@@ -53,16 +53,16 @@ public class NetworkAggregator {
|
||||
throw new RuntimeException(throwable);
|
||||
}
|
||||
});
|
||||
public static final Map<ResourceLocation, CustomPacketPayload.Type<BufCustomPacketPayload>> C2S_TYPE = new HashMap<>();
|
||||
public static final Map<ResourceLocation, CustomPacketPayload.Type<BufCustomPacketPayload>> S2C_TYPE = new HashMap<>();
|
||||
public static final Map<ResourceLocation, NetworkManager.NetworkReceiver<?>> C2S_RECEIVER = new HashMap<>();
|
||||
public static final Map<ResourceLocation, NetworkManager.NetworkReceiver<?>> S2C_RECEIVER = new HashMap<>();
|
||||
public static final Map<ResourceLocation, StreamCodec<ByteBuf, ?>> C2S_CODECS = new HashMap<>();
|
||||
public static final Map<ResourceLocation, StreamCodec<ByteBuf, ?>> S2C_CODECS = new HashMap<>();
|
||||
public static final Map<ResourceLocation, PacketTransformer> C2S_TRANSFORMERS = new HashMap<>();
|
||||
public static final Map<ResourceLocation, PacketTransformer> S2C_TRANSFORMERS = new HashMap<>();
|
||||
public static final Map<Identifier, CustomPacketPayload.Type<BufCustomPacketPayload>> C2S_TYPE = new HashMap<>();
|
||||
public static final Map<Identifier, CustomPacketPayload.Type<BufCustomPacketPayload>> S2C_TYPE = new HashMap<>();
|
||||
public static final Map<Identifier, NetworkManager.NetworkReceiver<?>> C2S_RECEIVER = new HashMap<>();
|
||||
public static final Map<Identifier, NetworkManager.NetworkReceiver<?>> S2C_RECEIVER = new HashMap<>();
|
||||
public static final Map<Identifier, StreamCodec<ByteBuf, ?>> C2S_CODECS = new HashMap<>();
|
||||
public static final Map<Identifier, StreamCodec<ByteBuf, ?>> S2C_CODECS = new HashMap<>();
|
||||
public static final Map<Identifier, PacketTransformer> C2S_TRANSFORMERS = new HashMap<>();
|
||||
public static final Map<Identifier, PacketTransformer> S2C_TRANSFORMERS = new HashMap<>();
|
||||
|
||||
public static void registerReceiver(NetworkManager.Side side, ResourceLocation id, List<PacketTransformer> packetTransformers, NetworkManager.NetworkReceiver<RegistryFriendlyByteBuf> receiver) {
|
||||
public static void registerReceiver(NetworkManager.Side side, Identifier id, List<PacketTransformer> packetTransformers, NetworkManager.NetworkReceiver<RegistryFriendlyByteBuf> receiver) {
|
||||
CustomPacketPayload.Type<BufCustomPacketPayload> type = new CustomPacketPayload.Type<>(id);
|
||||
if (side == NetworkManager.Side.C2S) {
|
||||
C2S_TYPE.put(id, type);
|
||||
@@ -130,7 +130,7 @@ public class NetworkAggregator {
|
||||
});
|
||||
}
|
||||
|
||||
public static void collectPackets(PacketSink sink, NetworkManager.Side side, ResourceLocation id, RegistryFriendlyByteBuf buf) {
|
||||
public static void collectPackets(PacketSink sink, NetworkManager.Side side, Identifier id, RegistryFriendlyByteBuf buf) {
|
||||
if (side == NetworkManager.Side.C2S) {
|
||||
collectPackets(sink, side, new BufCustomPacketPayload(C2S_TYPE.get(id), ByteBufUtil.getBytes(buf)), buf.registryAccess());
|
||||
} else {
|
||||
@@ -171,7 +171,7 @@ public class NetworkAggregator {
|
||||
throw new IllegalArgumentException("Invalid side: " + side);
|
||||
}
|
||||
|
||||
public static void registerS2CType(ResourceLocation id, List<PacketTransformer> packetTransformers) {
|
||||
public static void registerS2CType(Identifier id, List<PacketTransformer> packetTransformers) {
|
||||
CustomPacketPayload.Type<BufCustomPacketPayload> type = new CustomPacketPayload.Type<>(id);
|
||||
S2C_TYPE.put(id, type);
|
||||
registerS2CType(type, BufCustomPacketPayload.streamCodec(type), packetTransformers);
|
||||
|
||||
@@ -24,7 +24,7 @@ import dev.architectury.registry.registries.RegistrySupplier;
|
||||
import net.minecraft.core.Holder;
|
||||
import net.minecraft.core.HolderOwner;
|
||||
import net.minecraft.resources.ResourceKey;
|
||||
import net.minecraft.resources.ResourceLocation;
|
||||
import net.minecraft.resources.Identifier;
|
||||
import net.minecraft.tags.TagKey;
|
||||
import org.jetbrains.annotations.ApiStatus;
|
||||
import org.jetbrains.annotations.Nullable;
|
||||
@@ -49,7 +49,7 @@ public interface RegistrySupplierImpl<T> extends RegistrySupplier<T> {
|
||||
}
|
||||
|
||||
@Override
|
||||
default boolean is(ResourceLocation resourceLocation) {
|
||||
default boolean is(Identifier resourceLocation) {
|
||||
return getId().equals(resourceLocation);
|
||||
}
|
||||
|
||||
|
||||
@@ -33,7 +33,7 @@ import net.minecraft.network.codec.StreamCodec;
|
||||
import net.minecraft.network.protocol.Packet;
|
||||
import net.minecraft.network.protocol.common.custom.CustomPacketPayload;
|
||||
import net.minecraft.network.protocol.game.ClientGamePacketListener;
|
||||
import net.minecraft.resources.ResourceLocation;
|
||||
import net.minecraft.resources.Identifier;
|
||||
import net.minecraft.server.level.ServerEntity;
|
||||
import net.minecraft.server.level.ServerPlayer;
|
||||
import net.minecraft.world.entity.Entity;
|
||||
@@ -50,7 +50,7 @@ public final class NetworkManager {
|
||||
* while {@link #registerS2CPayloadType} should be called on the server side.
|
||||
*/
|
||||
@Deprecated(forRemoval = true)
|
||||
public static void registerS2CPayloadType(ResourceLocation id) {
|
||||
public static void registerS2CPayloadType(Identifier id) {
|
||||
NetworkAggregator.registerS2CType(id, List.of());
|
||||
}
|
||||
|
||||
@@ -67,7 +67,7 @@ public final class NetworkManager {
|
||||
* while {@link #registerS2CPayloadType} should be called on the server side.
|
||||
*/
|
||||
@Deprecated(forRemoval = true)
|
||||
public static void registerS2CPayloadType(ResourceLocation id, List<PacketTransformer> packetTransformers) {
|
||||
public static void registerS2CPayloadType(Identifier id, List<PacketTransformer> packetTransformers) {
|
||||
NetworkAggregator.registerS2CType(id, packetTransformers);
|
||||
}
|
||||
|
||||
@@ -80,13 +80,13 @@ public final class NetworkManager {
|
||||
}
|
||||
|
||||
@Deprecated(forRemoval = true)
|
||||
public static void registerReceiver(Side side, ResourceLocation id, NetworkReceiver<RegistryFriendlyByteBuf> receiver) {
|
||||
public static void registerReceiver(Side side, Identifier id, NetworkReceiver<RegistryFriendlyByteBuf> receiver) {
|
||||
registerReceiver(side, id, Collections.emptyList(), receiver);
|
||||
}
|
||||
|
||||
@ApiStatus.Experimental
|
||||
@Deprecated(forRemoval = true)
|
||||
public static void registerReceiver(Side side, ResourceLocation id, List<PacketTransformer> packetTransformers, NetworkReceiver<RegistryFriendlyByteBuf> receiver) {
|
||||
public static void registerReceiver(Side side, Identifier id, List<PacketTransformer> packetTransformers, NetworkReceiver<RegistryFriendlyByteBuf> receiver) {
|
||||
NetworkAggregator.registerReceiver(side, id, packetTransformers, receiver);
|
||||
}
|
||||
|
||||
@@ -100,14 +100,14 @@ public final class NetworkManager {
|
||||
}
|
||||
|
||||
@Deprecated(forRemoval = true)
|
||||
public static Packet<?> toPacket(Side side, ResourceLocation id, RegistryFriendlyByteBuf buf) {
|
||||
public static Packet<?> toPacket(Side side, Identifier id, RegistryFriendlyByteBuf buf) {
|
||||
SinglePacketCollector sink = new SinglePacketCollector(null);
|
||||
collectPackets(sink, side, id, buf);
|
||||
return sink.getPacket();
|
||||
}
|
||||
|
||||
@Deprecated(forRemoval = true)
|
||||
public static List<Packet<?>> toPackets(Side side, ResourceLocation id, RegistryFriendlyByteBuf buf) {
|
||||
public static List<Packet<?>> toPackets(Side side, Identifier id, RegistryFriendlyByteBuf buf) {
|
||||
PacketCollector sink = new PacketCollector(null);
|
||||
collectPackets(sink, side, id, buf);
|
||||
return sink.collect();
|
||||
@@ -126,7 +126,7 @@ public final class NetworkManager {
|
||||
}
|
||||
|
||||
@Deprecated(forRemoval = true)
|
||||
public static void collectPackets(PacketSink sink, Side side, ResourceLocation id, RegistryFriendlyByteBuf buf) {
|
||||
public static void collectPackets(PacketSink sink, Side side, Identifier id, RegistryFriendlyByteBuf buf) {
|
||||
NetworkAggregator.collectPackets(sink, side, id, buf);
|
||||
}
|
||||
|
||||
@@ -135,17 +135,17 @@ public final class NetworkManager {
|
||||
}
|
||||
|
||||
@Deprecated(forRemoval = true)
|
||||
public static void sendToPlayer(ServerPlayer player, ResourceLocation id, RegistryFriendlyByteBuf buf) {
|
||||
public static void sendToPlayer(ServerPlayer player, Identifier id, RegistryFriendlyByteBuf buf) {
|
||||
collectPackets(PacketSink.ofPlayer(player), serverToClient(), id, buf);
|
||||
}
|
||||
|
||||
@Deprecated(forRemoval = true)
|
||||
public static void sendToPlayers(Iterable<ServerPlayer> players, ResourceLocation id, RegistryFriendlyByteBuf buf) {
|
||||
public static void sendToPlayers(Iterable<ServerPlayer> players, Identifier id, RegistryFriendlyByteBuf buf) {
|
||||
collectPackets(PacketSink.ofPlayers(players), serverToClient(), id, buf);
|
||||
}
|
||||
|
||||
@Deprecated(forRemoval = true)
|
||||
public static void sendToServer(ResourceLocation id, RegistryFriendlyByteBuf buf) {
|
||||
public static void sendToServer(Identifier id, RegistryFriendlyByteBuf buf) {
|
||||
collectPackets(PacketSink.client(), clientToServer(), id, buf);
|
||||
}
|
||||
|
||||
@@ -165,12 +165,12 @@ public final class NetworkManager {
|
||||
}
|
||||
|
||||
@ExpectPlatform
|
||||
public static boolean canServerReceive(ResourceLocation id) {
|
||||
public static boolean canServerReceive(Identifier id) {
|
||||
throw new AssertionError();
|
||||
}
|
||||
|
||||
@ExpectPlatform
|
||||
public static boolean canPlayerReceive(ServerPlayer player, ResourceLocation id) {
|
||||
public static boolean canPlayerReceive(ServerPlayer player, Identifier id) {
|
||||
throw new AssertionError();
|
||||
}
|
||||
|
||||
|
||||
@@ -31,7 +31,7 @@ import net.minecraft.network.codec.StreamCodec;
|
||||
import net.minecraft.network.protocol.Packet;
|
||||
import net.minecraft.network.protocol.common.custom.CustomPacketPayload;
|
||||
import net.minecraft.network.protocol.game.ClientGamePacketListener;
|
||||
import net.minecraft.resources.ResourceLocation;
|
||||
import net.minecraft.resources.Identifier;
|
||||
import net.minecraft.server.level.ServerEntity;
|
||||
import net.minecraft.world.entity.Entity;
|
||||
import net.minecraft.world.entity.EntityType;
|
||||
@@ -42,7 +42,7 @@ import java.util.UUID;
|
||||
* @see net.minecraft.network.protocol.game.ClientboundAddEntityPacket
|
||||
*/
|
||||
public class SpawnEntityPacket {
|
||||
static final ResourceLocation PACKET_ID = ResourceLocation.fromNamespaceAndPath("architectury", "spawn_entity_packet");
|
||||
static final Identifier PACKET_ID = Identifier.fromNamespaceAndPath("architectury", "spawn_entity_packet");
|
||||
static final CustomPacketPayload.Type<PacketPayload> PACKET_TYPE = new CustomPacketPayload.Type<>(PACKET_ID);
|
||||
static final StreamCodec<RegistryFriendlyByteBuf, PacketPayload> PACKET_CODEC = CustomPacketPayload.codec(PacketPayload::write, PacketPayload::new);
|
||||
|
||||
|
||||
@@ -21,7 +21,7 @@ package dev.architectury.networking.transformers;
|
||||
|
||||
import dev.architectury.networking.NetworkManager;
|
||||
import net.minecraft.network.RegistryFriendlyByteBuf;
|
||||
import net.minecraft.resources.ResourceLocation;
|
||||
import net.minecraft.resources.Identifier;
|
||||
import org.jetbrains.annotations.ApiStatus;
|
||||
import org.jetbrains.annotations.Nullable;
|
||||
|
||||
@@ -31,24 +31,24 @@ import java.util.List;
|
||||
|
||||
@ApiStatus.Experimental
|
||||
public interface PacketTransformer {
|
||||
void inbound(NetworkManager.Side side, ResourceLocation id, RegistryFriendlyByteBuf buf, NetworkManager.PacketContext context, TransformationSink sink);
|
||||
void inbound(NetworkManager.Side side, Identifier id, RegistryFriendlyByteBuf buf, NetworkManager.PacketContext context, TransformationSink sink);
|
||||
|
||||
void outbound(NetworkManager.Side side, ResourceLocation id, RegistryFriendlyByteBuf buf, TransformationSink sink);
|
||||
void outbound(NetworkManager.Side side, Identifier id, RegistryFriendlyByteBuf buf, TransformationSink sink);
|
||||
|
||||
@FunctionalInterface
|
||||
interface TransformationSink {
|
||||
void accept(NetworkManager.Side side, ResourceLocation id, RegistryFriendlyByteBuf buf);
|
||||
void accept(NetworkManager.Side side, Identifier id, RegistryFriendlyByteBuf buf);
|
||||
}
|
||||
|
||||
static PacketTransformer none() {
|
||||
return new PacketTransformer() {
|
||||
@Override
|
||||
public void inbound(NetworkManager.Side side, ResourceLocation id, RegistryFriendlyByteBuf buf, NetworkManager.PacketContext context, TransformationSink sink) {
|
||||
public void inbound(NetworkManager.Side side, Identifier id, RegistryFriendlyByteBuf buf, NetworkManager.PacketContext context, TransformationSink sink) {
|
||||
sink.accept(side, id, buf);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void outbound(NetworkManager.Side side, ResourceLocation id, RegistryFriendlyByteBuf buf, TransformationSink sink) {
|
||||
public void outbound(NetworkManager.Side side, Identifier id, RegistryFriendlyByteBuf buf, TransformationSink sink) {
|
||||
sink.accept(side, id, buf);
|
||||
}
|
||||
};
|
||||
@@ -62,16 +62,16 @@ public interface PacketTransformer {
|
||||
}
|
||||
return new PacketTransformer() {
|
||||
@Override
|
||||
public void inbound(NetworkManager.Side side, ResourceLocation id, RegistryFriendlyByteBuf buf, NetworkManager.PacketContext context, TransformationSink sink) {
|
||||
public void inbound(NetworkManager.Side side, Identifier id, RegistryFriendlyByteBuf buf, NetworkManager.PacketContext context, TransformationSink sink) {
|
||||
traverse(side, id, buf, context, sink, true, 0);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void outbound(NetworkManager.Side side, ResourceLocation id, RegistryFriendlyByteBuf buf, TransformationSink sink) {
|
||||
public void outbound(NetworkManager.Side side, Identifier id, RegistryFriendlyByteBuf buf, TransformationSink sink) {
|
||||
traverse(side, id, buf, null, sink, false, 0);
|
||||
}
|
||||
|
||||
private void traverse(NetworkManager.Side side, ResourceLocation id, RegistryFriendlyByteBuf buf, @Nullable NetworkManager.PacketContext context, TransformationSink outerSink, boolean inbound, int index) {
|
||||
private void traverse(NetworkManager.Side side, Identifier id, RegistryFriendlyByteBuf buf, @Nullable NetworkManager.PacketContext context, TransformationSink outerSink, boolean inbound, int index) {
|
||||
if (transformers instanceof List) {
|
||||
if (((List<? extends PacketTransformer>) transformers).size() > index) {
|
||||
PacketTransformer transformer = ((List<? extends PacketTransformer>) transformers).get(index);
|
||||
|
||||
@@ -27,7 +27,7 @@ import dev.architectury.utils.EnvExecutor;
|
||||
import io.netty.buffer.ByteBuf;
|
||||
import io.netty.buffer.Unpooled;
|
||||
import net.minecraft.network.RegistryFriendlyByteBuf;
|
||||
import net.minecraft.resources.ResourceLocation;
|
||||
import net.minecraft.resources.Identifier;
|
||||
import org.apache.logging.log4j.LogManager;
|
||||
import org.apache.logging.log4j.Logger;
|
||||
import org.jetbrains.annotations.ApiStatus;
|
||||
@@ -49,11 +49,11 @@ public class SplitPacketTransformer implements PacketTransformer {
|
||||
}
|
||||
|
||||
public record PartData(
|
||||
ResourceLocation id,
|
||||
Identifier id,
|
||||
int partsExpected,
|
||||
List<RegistryFriendlyByteBuf> parts
|
||||
) {
|
||||
private PartData(ResourceLocation id, int partsExpected) {
|
||||
private PartData(Identifier id, int partsExpected) {
|
||||
this(id, partsExpected, new ArrayList<>());
|
||||
}
|
||||
}
|
||||
@@ -68,7 +68,7 @@ public class SplitPacketTransformer implements PacketTransformer {
|
||||
}
|
||||
|
||||
@Override
|
||||
public void inbound(NetworkManager.Side side, ResourceLocation id, RegistryFriendlyByteBuf buf, NetworkManager.PacketContext context, TransformationSink sink) {
|
||||
public void inbound(NetworkManager.Side side, Identifier id, RegistryFriendlyByteBuf buf, NetworkManager.PacketContext context, TransformationSink sink) {
|
||||
PartKey key = side == NetworkManager.Side.S2C ? new PartKey(side, null) : new PartKey(side, context.getPlayer().getUUID());
|
||||
PartData data;
|
||||
switch (buf.readByte()) {
|
||||
@@ -138,7 +138,7 @@ public class SplitPacketTransformer implements PacketTransformer {
|
||||
}
|
||||
|
||||
@Override
|
||||
public void outbound(NetworkManager.Side side, ResourceLocation id, RegistryFriendlyByteBuf buf, TransformationSink sink) {
|
||||
public void outbound(NetworkManager.Side side, Identifier id, RegistryFriendlyByteBuf buf, TransformationSink sink) {
|
||||
int maxSize = (side == NetworkManager.Side.C2S ? 32767 : 1048576) - 1 - 20 - id.toString().getBytes(StandardCharsets.UTF_8).length;
|
||||
if (buf.readableBytes() <= maxSize) {
|
||||
ByteBuf stateBuf = Unpooled.buffer(1);
|
||||
|
||||
@@ -24,7 +24,7 @@ import dev.architectury.injectables.annotations.ExpectPlatform;
|
||||
import dev.architectury.registry.registries.DeferredSupplier;
|
||||
import net.minecraft.network.chat.Component;
|
||||
import net.minecraft.resources.ResourceKey;
|
||||
import net.minecraft.resources.ResourceLocation;
|
||||
import net.minecraft.resources.Identifier;
|
||||
import net.minecraft.world.flag.FeatureFlagSet;
|
||||
import net.minecraft.world.item.CreativeModeTab;
|
||||
import net.minecraft.world.item.ItemStack;
|
||||
@@ -93,7 +93,7 @@ public final class CreativeTabRegistry {
|
||||
*/
|
||||
@ExpectPlatform
|
||||
@ApiStatus.Experimental
|
||||
public static DeferredSupplier<CreativeModeTab> defer(ResourceLocation name) {
|
||||
public static DeferredSupplier<CreativeModeTab> defer(Identifier name) {
|
||||
throw new AssertionError();
|
||||
}
|
||||
|
||||
@@ -105,7 +105,7 @@ public final class CreativeTabRegistry {
|
||||
*/
|
||||
@ApiStatus.Experimental
|
||||
public static DeferredSupplier<CreativeModeTab> defer(ResourceKey<CreativeModeTab> name) {
|
||||
return defer(name.location());
|
||||
return defer(name.identifier());
|
||||
}
|
||||
|
||||
@ApiStatus.Experimental
|
||||
|
||||
@@ -20,10 +20,9 @@
|
||||
package dev.architectury.registry;
|
||||
|
||||
import dev.architectury.injectables.annotations.ExpectPlatform;
|
||||
import net.minecraft.resources.ResourceLocation;
|
||||
import net.minecraft.resources.Identifier;
|
||||
import net.minecraft.server.packs.PackType;
|
||||
import net.minecraft.server.packs.resources.PreparableReloadListener;
|
||||
import org.jetbrains.annotations.Nullable;
|
||||
|
||||
import java.util.Collection;
|
||||
import java.util.List;
|
||||
@@ -32,12 +31,12 @@ public final class ReloadListenerRegistry {
|
||||
private ReloadListenerRegistry() {
|
||||
}
|
||||
|
||||
public static void register(PackType type, PreparableReloadListener listener, ResourceLocation listenerId) {
|
||||
public static void register(PackType type, PreparableReloadListener listener, Identifier listenerId) {
|
||||
register(type, listener, listenerId, List.of());
|
||||
}
|
||||
|
||||
@ExpectPlatform
|
||||
public static void register(PackType type, PreparableReloadListener listener, ResourceLocation listenerId, Collection<ResourceLocation> dependencies) {
|
||||
public static void register(PackType type, PreparableReloadListener listener, Identifier listenerId, Collection<Identifier> dependencies) {
|
||||
throw new AssertionError();
|
||||
}
|
||||
}
|
||||
|
||||
@@ -22,7 +22,7 @@ package dev.architectury.registry.level.biome;
|
||||
import com.google.common.base.Predicates;
|
||||
import dev.architectury.hooks.level.biome.BiomeProperties;
|
||||
import dev.architectury.injectables.annotations.ExpectPlatform;
|
||||
import net.minecraft.resources.ResourceLocation;
|
||||
import net.minecraft.resources.Identifier;
|
||||
import net.minecraft.tags.TagKey;
|
||||
import net.minecraft.world.level.biome.Biome;
|
||||
|
||||
@@ -89,7 +89,7 @@ public final class BiomeModifications {
|
||||
}
|
||||
|
||||
public interface BiomeContext {
|
||||
Optional<ResourceLocation> getKey();
|
||||
Optional<Identifier> getKey();
|
||||
|
||||
BiomeProperties getProperties();
|
||||
|
||||
|
||||
@@ -19,9 +19,10 @@
|
||||
|
||||
package dev.architectury.registry.level.entity.trade;
|
||||
|
||||
import net.minecraft.server.level.ServerLevel;
|
||||
import net.minecraft.util.RandomSource;
|
||||
import net.minecraft.world.entity.Entity;
|
||||
import net.minecraft.world.entity.npc.VillagerTrades;
|
||||
import net.minecraft.world.entity.npc.villager.VillagerTrades;
|
||||
import net.minecraft.world.item.ItemStack;
|
||||
import net.minecraft.world.item.trading.ItemCost;
|
||||
import net.minecraft.world.item.trading.MerchantOffer;
|
||||
@@ -58,7 +59,7 @@ public record SimpleTrade(ItemCost primaryPrice, Optional<ItemCost> secondaryPri
|
||||
|
||||
@Nullable
|
||||
@Override
|
||||
public MerchantOffer getOffer(Entity entity, RandomSource random) {
|
||||
public MerchantOffer getOffer(ServerLevel level, Entity entity, RandomSource random) {
|
||||
return new MerchantOffer(this.primaryPrice, this.secondaryPrice, this.sale, this.maxTrades, this.experiencePoints, this.priceMultiplier);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -21,8 +21,8 @@ package dev.architectury.registry.level.entity.trade;
|
||||
|
||||
import dev.architectury.injectables.annotations.ExpectPlatform;
|
||||
import net.minecraft.resources.ResourceKey;
|
||||
import net.minecraft.world.entity.npc.VillagerProfession;
|
||||
import net.minecraft.world.entity.npc.VillagerTrades;
|
||||
import net.minecraft.world.entity.npc.villager.VillagerProfession;
|
||||
import net.minecraft.world.entity.npc.villager.VillagerTrades;
|
||||
|
||||
public class TradeRegistry {
|
||||
private TradeRegistry() {
|
||||
|
||||
@@ -24,7 +24,7 @@ import dev.architectury.impl.RegistrySupplierImpl;
|
||||
import net.minecraft.core.Holder;
|
||||
import net.minecraft.core.Registry;
|
||||
import net.minecraft.resources.ResourceKey;
|
||||
import net.minecraft.resources.ResourceLocation;
|
||||
import net.minecraft.resources.Identifier;
|
||||
import org.jetbrains.annotations.Nullable;
|
||||
|
||||
import java.util.*;
|
||||
@@ -55,10 +55,10 @@ public class DeferredRegister<T> implements Iterable<RegistrySupplier<T>> {
|
||||
throw new NullPointerException("You must create the deferred register with a mod id to register entries without the namespace!");
|
||||
}
|
||||
|
||||
return register(ResourceLocation.fromNamespaceAndPath(modId, id), supplier);
|
||||
return register(Identifier.fromNamespaceAndPath(modId, id), supplier);
|
||||
}
|
||||
|
||||
public <R extends T> RegistrySupplier<R> register(ResourceLocation id, Supplier<? extends R> supplier) {
|
||||
public <R extends T> RegistrySupplier<R> register(Identifier id, Supplier<? extends R> supplier) {
|
||||
var entry = new Entry<T>(id, (Supplier<T>) supplier);
|
||||
this.entries.add(entry);
|
||||
if (registered) {
|
||||
@@ -93,13 +93,13 @@ public class DeferredRegister<T> implements Iterable<RegistrySupplier<T>> {
|
||||
}
|
||||
|
||||
private class Entry<R> implements RegistrySupplierImpl<R> {
|
||||
private final ResourceLocation id;
|
||||
private final Identifier id;
|
||||
private final Supplier<R> supplier;
|
||||
private RegistrySupplier<R> value;
|
||||
@Nullable
|
||||
private Holder<R> holder = null;
|
||||
|
||||
public Entry(ResourceLocation id, Supplier<R> supplier) {
|
||||
public Entry(Identifier id, Supplier<R> supplier) {
|
||||
this.id = id;
|
||||
this.supplier = supplier;
|
||||
}
|
||||
@@ -127,12 +127,12 @@ public class DeferredRegister<T> implements Iterable<RegistrySupplier<T>> {
|
||||
}
|
||||
|
||||
@Override
|
||||
public ResourceLocation getRegistryId() {
|
||||
return key.location();
|
||||
public Identifier getRegistryId() {
|
||||
return key.identifier();
|
||||
}
|
||||
|
||||
@Override
|
||||
public ResourceLocation getId() {
|
||||
public Identifier getId() {
|
||||
return id;
|
||||
}
|
||||
|
||||
|
||||
@@ -22,13 +22,13 @@ package dev.architectury.registry.registries;
|
||||
import dev.architectury.utils.OptionalSupplier;
|
||||
import net.minecraft.core.Registry;
|
||||
import net.minecraft.resources.ResourceKey;
|
||||
import net.minecraft.resources.ResourceLocation;
|
||||
import net.minecraft.resources.Identifier;
|
||||
|
||||
public interface DeferredSupplier<T> extends OptionalSupplier<T> {
|
||||
/**
|
||||
* @return the identifier of the registry
|
||||
*/
|
||||
ResourceLocation getRegistryId();
|
||||
Identifier getRegistryId();
|
||||
|
||||
/**
|
||||
* @return the identifier of the registry
|
||||
@@ -40,7 +40,7 @@ public interface DeferredSupplier<T> extends OptionalSupplier<T> {
|
||||
/**
|
||||
* @return the identifier of the entry
|
||||
*/
|
||||
ResourceLocation getId();
|
||||
Identifier getId();
|
||||
|
||||
/**
|
||||
* Returns the registry key of the creative tab.
|
||||
|
||||
@@ -22,7 +22,7 @@ package dev.architectury.registry.registries;
|
||||
import net.minecraft.core.Holder;
|
||||
import net.minecraft.core.Registry;
|
||||
import net.minecraft.resources.ResourceKey;
|
||||
import net.minecraft.resources.ResourceLocation;
|
||||
import net.minecraft.resources.Identifier;
|
||||
import org.jetbrains.annotations.Nullable;
|
||||
|
||||
import java.util.Map;
|
||||
@@ -32,10 +32,10 @@ import java.util.function.Consumer;
|
||||
import java.util.function.Supplier;
|
||||
|
||||
public interface Registrar<T> extends Iterable<T> {
|
||||
RegistrySupplier<T> delegate(ResourceLocation id);
|
||||
RegistrySupplier<T> delegate(Identifier id);
|
||||
|
||||
default <R extends T> RegistrySupplier<R> wrap(R obj) {
|
||||
ResourceLocation id = getId(obj);
|
||||
Identifier id = getId(obj);
|
||||
|
||||
if (id == null) {
|
||||
throw new IllegalArgumentException("Cannot wrap an object without an id: " + obj);
|
||||
@@ -44,26 +44,26 @@ public interface Registrar<T> extends Iterable<T> {
|
||||
}
|
||||
}
|
||||
|
||||
<E extends T> RegistrySupplier<E> register(ResourceLocation id, Supplier<E> supplier);
|
||||
<E extends T> RegistrySupplier<E> register(Identifier id, Supplier<E> supplier);
|
||||
|
||||
@Nullable
|
||||
ResourceLocation getId(T obj);
|
||||
Identifier getId(T obj);
|
||||
|
||||
int getRawId(T obj);
|
||||
|
||||
Optional<ResourceKey<T>> getKey(T obj);
|
||||
|
||||
@Nullable
|
||||
T get(ResourceLocation id);
|
||||
T get(Identifier id);
|
||||
|
||||
@Nullable
|
||||
T byRawId(int rawId);
|
||||
|
||||
boolean contains(ResourceLocation id);
|
||||
boolean contains(Identifier id);
|
||||
|
||||
boolean containsValue(T obj);
|
||||
|
||||
Set<ResourceLocation> getIds();
|
||||
Set<Identifier> getIds();
|
||||
|
||||
Set<Map.Entry<ResourceKey<T>, T>> entrySet();
|
||||
|
||||
@@ -73,7 +73,7 @@ public interface Registrar<T> extends Iterable<T> {
|
||||
Holder<T> getHolder(ResourceKey<T> key);
|
||||
|
||||
@Nullable
|
||||
default Holder<T> getHolder(ResourceLocation id) {
|
||||
default Holder<T> getHolder(Identifier id) {
|
||||
return getHolder(ResourceKey.create(key(), id));
|
||||
}
|
||||
|
||||
@@ -103,5 +103,5 @@ public interface Registrar<T> extends Iterable<T> {
|
||||
* @param id the entry to listen to
|
||||
* @param callback the action to call when the registry entry is registered
|
||||
*/
|
||||
void listen(ResourceLocation id, Consumer<T> callback);
|
||||
void listen(Identifier id, Consumer<T> callback);
|
||||
}
|
||||
|
||||
@@ -23,7 +23,7 @@ import dev.architectury.injectables.annotations.ExpectPlatform;
|
||||
import net.minecraft.core.Registry;
|
||||
import net.minecraft.core.registries.BuiltInRegistries;
|
||||
import net.minecraft.resources.ResourceKey;
|
||||
import net.minecraft.resources.ResourceLocation;
|
||||
import net.minecraft.resources.Identifier;
|
||||
import org.jetbrains.annotations.ApiStatus;
|
||||
import org.jetbrains.annotations.Nullable;
|
||||
|
||||
@@ -71,7 +71,7 @@ public final class RegistrarManager {
|
||||
}
|
||||
|
||||
@SafeVarargs
|
||||
public final <T> RegistrarBuilder<T> builder(ResourceLocation registryId, T... typeGetter) {
|
||||
public final <T> RegistrarBuilder<T> builder(Identifier registryId, T... typeGetter) {
|
||||
if (typeGetter.length != 0) throw new IllegalStateException("array must be empty!");
|
||||
return this.provider.builder((Class<T>) typeGetter.getClass().getComponentType(), registryId);
|
||||
}
|
||||
@@ -81,10 +81,10 @@ public final class RegistrarManager {
|
||||
* Fabric: Use registry
|
||||
*/
|
||||
@Nullable
|
||||
public static <T> ResourceLocation getId(T object, @Nullable ResourceKey<Registry<T>> fallback) {
|
||||
public static <T> Identifier getId(T object, @Nullable ResourceKey<Registry<T>> fallback) {
|
||||
if (fallback == null)
|
||||
return null;
|
||||
return getId(object, (Registry<T>) BuiltInRegistries.REGISTRY.getValue(fallback.location()));
|
||||
return getId(object, (Registry<T>) BuiltInRegistries.REGISTRY.getValue(fallback.identifier()));
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -93,7 +93,7 @@ public final class RegistrarManager {
|
||||
*/
|
||||
@Nullable
|
||||
@Deprecated
|
||||
public static <T> ResourceLocation getId(T object, @Nullable Registry<T> fallback) {
|
||||
public static <T> Identifier getId(T object, @Nullable Registry<T> fallback) {
|
||||
if (fallback == null)
|
||||
return null;
|
||||
return fallback.getKey(object);
|
||||
@@ -117,6 +117,6 @@ public final class RegistrarManager {
|
||||
|
||||
<T> void forRegistry(ResourceKey<Registry<T>> key, Consumer<Registrar<T>> consumer);
|
||||
|
||||
<T> RegistrarBuilder<T> builder(Class<T> type, ResourceLocation registryId);
|
||||
<T> RegistrarBuilder<T> builder(Class<T> type, Identifier registryId);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -19,7 +19,7 @@
|
||||
|
||||
package dev.architectury.registry.registries.options;
|
||||
|
||||
import net.minecraft.resources.ResourceLocation;
|
||||
import net.minecraft.resources.Identifier;
|
||||
|
||||
public record DefaultIdRegistrarOption(ResourceLocation defaultId) implements RegistrarOption {
|
||||
public record DefaultIdRegistrarOption(Identifier defaultId) implements RegistrarOption {
|
||||
}
|
||||
|
||||
@@ -46,7 +46,6 @@ accessible field net/minecraft/world/level/block/state/BlockBehaviour$Properties
|
||||
mutable field net/minecraft/world/level/block/state/BlockBehaviour$Properties dynamicShape Z
|
||||
accessible method net/minecraft/world/level/block/state/BlockBehaviour$Properties <init> ()V
|
||||
accessible field net/minecraft/world/level/block/entity/FuelValues$Builder values Lit/unimi/dsi/fastutil/objects/Object2IntSortedMap;
|
||||
transitive-accessible method net/minecraft/world/entity/player/Player closeContainer ()V
|
||||
transitive-accessible method net/minecraft/advancements/CriteriaTriggers register (Ljava/lang/String;Lnet/minecraft/advancements/CriterionTrigger;)Lnet/minecraft/advancements/CriterionTrigger;
|
||||
transitive-accessible method net/minecraft/world/inventory/MenuType <init> (Lnet/minecraft/world/inventory/MenuType$MenuSupplier;Lnet/minecraft/world/flag/FeatureFlagSet;)V
|
||||
transitive-accessible class net/minecraft/world/inventory/MenuType$MenuSupplier
|
||||
@@ -62,50 +61,29 @@ accessible field net/minecraft/world/level/biome/Biome$ClimateSettings temperatu
|
||||
mutable field net/minecraft/world/level/biome/Biome$ClimateSettings temperatureModifier Lnet/minecraft/world/level/biome/Biome$TemperatureModifier;
|
||||
accessible field net/minecraft/world/level/biome/Biome$ClimateSettings downfall F
|
||||
mutable field net/minecraft/world/level/biome/Biome$ClimateSettings downfall F
|
||||
accessible field net/minecraft/world/level/biome/BiomeSpecialEffects fogColor I
|
||||
mutable field net/minecraft/world/level/biome/BiomeSpecialEffects fogColor I
|
||||
accessible field net/minecraft/world/level/biome/BiomeSpecialEffects waterColor I
|
||||
mutable field net/minecraft/world/level/biome/BiomeSpecialEffects waterColor I
|
||||
accessible field net/minecraft/world/level/biome/BiomeSpecialEffects waterFogColor I
|
||||
mutable field net/minecraft/world/level/biome/BiomeSpecialEffects waterFogColor I
|
||||
accessible field net/minecraft/world/level/biome/BiomeSpecialEffects skyColor I
|
||||
mutable field net/minecraft/world/level/biome/BiomeSpecialEffects skyColor I
|
||||
accessible field net/minecraft/world/level/biome/BiomeSpecialEffects foliageColorOverride Ljava/util/Optional;
|
||||
mutable field net/minecraft/world/level/biome/BiomeSpecialEffects foliageColorOverride Ljava/util/Optional;
|
||||
accessible field net/minecraft/world/level/biome/BiomeSpecialEffects dryFoliageColorOverride Ljava/util/Optional;
|
||||
mutable field net/minecraft/world/level/biome/BiomeSpecialEffects dryFoliageColorOverride Ljava/util/Optional;
|
||||
accessible field net/minecraft/world/level/biome/BiomeSpecialEffects grassColorOverride Ljava/util/Optional;
|
||||
mutable field net/minecraft/world/level/biome/BiomeSpecialEffects grassColorOverride Ljava/util/Optional;
|
||||
accessible field net/minecraft/world/level/biome/BiomeSpecialEffects grassColorModifier Lnet/minecraft/world/level/biome/BiomeSpecialEffects$GrassColorModifier;
|
||||
mutable field net/minecraft/world/level/biome/BiomeSpecialEffects grassColorModifier Lnet/minecraft/world/level/biome/BiomeSpecialEffects$GrassColorModifier;
|
||||
accessible field net/minecraft/world/level/biome/BiomeSpecialEffects ambientParticleSettings Ljava/util/Optional;
|
||||
mutable field net/minecraft/world/level/biome/BiomeSpecialEffects ambientParticleSettings Ljava/util/Optional;
|
||||
accessible field net/minecraft/world/level/biome/BiomeSpecialEffects ambientLoopSoundEvent Ljava/util/Optional;
|
||||
mutable field net/minecraft/world/level/biome/BiomeSpecialEffects ambientLoopSoundEvent Ljava/util/Optional;
|
||||
accessible field net/minecraft/world/level/biome/BiomeSpecialEffects ambientMoodSettings Ljava/util/Optional;
|
||||
mutable field net/minecraft/world/level/biome/BiomeSpecialEffects ambientMoodSettings Ljava/util/Optional;
|
||||
accessible field net/minecraft/world/level/biome/BiomeSpecialEffects ambientAdditionsSettings Ljava/util/Optional;
|
||||
mutable field net/minecraft/world/level/biome/BiomeSpecialEffects ambientAdditionsSettings Ljava/util/Optional;
|
||||
accessible field net/minecraft/world/level/biome/BiomeSpecialEffects backgroundMusic Ljava/util/Optional;
|
||||
mutable field net/minecraft/world/level/biome/BiomeSpecialEffects backgroundMusic Ljava/util/Optional;
|
||||
accessible field net/minecraft/world/level/biome/BiomeSpecialEffects$Builder fogColor Ljava/util/OptionalInt;
|
||||
accessible field net/minecraft/world/level/biome/BiomeSpecialEffects$Builder waterColor Ljava/util/OptionalInt;
|
||||
accessible field net/minecraft/world/level/biome/BiomeSpecialEffects$Builder waterFogColor Ljava/util/OptionalInt;
|
||||
accessible field net/minecraft/world/level/biome/BiomeSpecialEffects$Builder skyColor Ljava/util/OptionalInt;
|
||||
accessible field net/minecraft/world/level/biome/BiomeSpecialEffects$Builder foliageColorOverride Ljava/util/Optional;
|
||||
accessible field net/minecraft/world/level/biome/BiomeSpecialEffects$Builder dryFoliageColorOverride Ljava/util/Optional;
|
||||
accessible field net/minecraft/world/level/biome/BiomeSpecialEffects$Builder grassColorOverride Ljava/util/Optional;
|
||||
accessible field net/minecraft/world/level/biome/BiomeSpecialEffects$Builder grassColorModifier Lnet/minecraft/world/level/biome/BiomeSpecialEffects$GrassColorModifier;
|
||||
accessible field net/minecraft/world/level/biome/BiomeSpecialEffects$Builder ambientParticle Ljava/util/Optional;
|
||||
accessible field net/minecraft/world/level/biome/BiomeSpecialEffects$Builder ambientLoopSoundEvent Ljava/util/Optional;
|
||||
accessible field net/minecraft/world/level/biome/BiomeSpecialEffects$Builder ambientMoodSettings Ljava/util/Optional;
|
||||
accessible field net/minecraft/world/level/biome/BiomeSpecialEffects$Builder ambientAdditionsSettings Ljava/util/Optional;
|
||||
accessible field net/minecraft/world/level/biome/BiomeSpecialEffects$Builder backgroundMusic Ljava/util/Optional;
|
||||
accessible field net/minecraft/world/level/biome/MobSpawnSettings$Builder spawners Ljava/util/Map;
|
||||
accessible field net/minecraft/world/level/biome/MobSpawnSettings$Builder mobSpawnCosts Ljava/util/Map;
|
||||
accessible field net/minecraft/world/level/biome/MobSpawnSettings$Builder creatureGenerationProbability F
|
||||
transitive-accessible method net/minecraft/world/level/GameRules register (Ljava/lang/String;Lnet/minecraft/world/level/GameRules$Category;Lnet/minecraft/world/level/GameRules$Type;)Lnet/minecraft/world/level/GameRules$Key;
|
||||
transitive-accessible method net/minecraft/world/level/GameRules$BooleanValue create (ZLjava/util/function/BiConsumer;)Lnet/minecraft/world/level/GameRules$Type;
|
||||
transitive-accessible method net/minecraft/world/level/GameRules$BooleanValue create (Z)Lnet/minecraft/world/level/GameRules$Type;
|
||||
transitive-accessible method net/minecraft/world/level/GameRules$IntegerValue create (ILjava/util/function/BiConsumer;)Lnet/minecraft/world/level/GameRules$Type;
|
||||
transitive-accessible method net/minecraft/world/level/GameRules$IntegerValue create (I)Lnet/minecraft/world/level/GameRules$Type;
|
||||
transitive-accessible method net/minecraft/world/level/gamerules/GameRules register (Ljava/lang/String;Lnet/minecraft/world/level/gamerules/GameRuleCategory;Lnet/minecraft/world/level/gamerules/GameRuleType;Lcom/mojang/brigadier/arguments/ArgumentType;Lcom/mojang/serialization/Codec;Ljava/lang/Object;Lnet/minecraft/world/flag/FeatureFlagSet;Lnet/minecraft/world/level/gamerules/GameRules$VisitorCaller;Ljava/util/function/ToIntFunction;)Lnet/minecraft/world/level/gamerules/GameRule;
|
||||
transitive-accessible method net/minecraft/world/level/gamerules/GameRules registerBoolean (Ljava/lang/String;Lnet/minecraft/world/level/gamerules/GameRuleCategory;Z)Lnet/minecraft/world/level/gamerules/GameRule;
|
||||
transitive-accessible method net/minecraft/world/level/gamerules/GameRules registerInteger (Ljava/lang/String;Lnet/minecraft/world/level/gamerules/GameRuleCategory;II)Lnet/minecraft/world/level/gamerules/GameRule;
|
||||
transitive-accessible method net/minecraft/world/level/gamerules/GameRules registerInteger (Ljava/lang/String;Lnet/minecraft/world/level/gamerules/GameRuleCategory;III)Lnet/minecraft/world/level/gamerules/GameRule;
|
||||
transitive-accessible method net/minecraft/world/level/gamerules/GameRules registerInteger (Ljava/lang/String;Lnet/minecraft/world/level/gamerules/GameRuleCategory;IIILnet/minecraft/world/flag/FeatureFlagSet;)Lnet/minecraft/world/level/gamerules/GameRule;
|
||||
transitive-accessible method net/minecraft/world/level/storage/LevelResource <init> (Ljava/lang/String;)V
|
||||
transitive-accessible class net/minecraft/world/level/block/entity/BlockEntityType$BlockEntitySupplier
|
||||
accessible field net/minecraft/world/item/AxeItem STRIPPABLES Ljava/util/Map;
|
||||
@@ -115,18 +93,17 @@ mutable field net/minecraft/world/item/ShovelItem FLATTENABLES Ljava/util/Map;
|
||||
accessible field net/minecraft/world/item/HoeItem TILLABLES Ljava/util/Map;
|
||||
mutable field net/minecraft/world/item/HoeItem TILLABLES Ljava/util/Map;
|
||||
transitive-accessible method net/minecraft/world/entity/player/Player closeContainer ()V
|
||||
transitive-accessible method net/minecraft/client/renderer/RenderType create (Ljava/lang/String;ILcom/mojang/blaze3d/pipeline/RenderPipeline;Lnet/minecraft/client/renderer/RenderType$CompositeState;)Lnet/minecraft/client/renderer/RenderType$CompositeRenderType;
|
||||
transitive-accessible method net/minecraft/client/renderer/RenderType create (Ljava/lang/String;IZZLcom/mojang/blaze3d/pipeline/RenderPipeline;Lnet/minecraft/client/renderer/RenderType$CompositeState;)Lnet/minecraft/client/renderer/RenderType$CompositeRenderType;
|
||||
transitive-accessible class net/minecraft/client/renderer/RenderType$CompositeState
|
||||
transitive-accessible class net/minecraft/client/renderer/RenderType$CompositeRenderType
|
||||
transitive-accessible class net/minecraft/client/renderer/RenderType$OutlineProperty
|
||||
transitive-accessible method net/minecraft/client/renderer/rendertype/RenderType create (Ljava/lang/String;Lnet/minecraft/client/renderer/rendertype/RenderSetup;)Lnet/minecraft/client/renderer/rendertype/RenderType;
|
||||
transitive-accessible field net/minecraft/client/renderer/rendertype/RenderType state Lnet/minecraft/client/renderer/rendertype/RenderSetup;
|
||||
transitive-accessible field net/minecraft/client/renderer/rendertype/RenderType outline Ljava/util/Optional;
|
||||
transitive-accessible field net/minecraft/client/renderer/rendertype/RenderType name Ljava/lang/String;
|
||||
accessible class net/minecraft/client/particle/ParticleResources$MutableSpriteSet
|
||||
accessible field net/minecraft/client/particle/ParticleResources$MutableSpriteSet sprites Ljava/util/List;
|
||||
transitive-accessible class net/minecraft/world/item/CreativeModeTab$Output
|
||||
transitive-accessible class net/minecraft/world/item/CreativeModeTab$TabVisibility
|
||||
accessible field net/minecraft/client/multiplayer/MultiPlayerGameMode connection Lnet/minecraft/client/multiplayer/ClientPacketListener;
|
||||
accessible field net/minecraft/client/Minecraft particleResources Lnet/minecraft/client/particle/ParticleResources;
|
||||
transitive-accessible method net/minecraft/client/gui/components/debug/DebugScreenEntries register (Lnet/minecraft/resources/ResourceLocation;Lnet/minecraft/client/gui/components/debug/DebugScreenEntry;)Lnet/minecraft/resources/ResourceLocation;
|
||||
transitive-accessible method net/minecraft/client/gui/components/debug/DebugScreenEntries register (Lnet/minecraft/resources/Identifier;Lnet/minecraft/client/gui/components/debug/DebugScreenEntry;)Lnet/minecraft/resources/Identifier;
|
||||
|
||||
##############################
|
||||
# This section is generated automatically with Gradle task generateAccessWidener!!!
|
||||
@@ -239,49 +216,6 @@ transitive-accessible method net/minecraft/world/level/block/WitherSkullBlock <i
|
||||
transitive-accessible method net/minecraft/world/level/block/WitherWallSkullBlock <init> (Lnet/minecraft/world/level/block/state/BlockBehaviour$Properties;)V
|
||||
transitive-accessible method net/minecraft/world/level/block/WoolCarpetBlock <init> (Lnet/minecraft/world/item/DyeColor;Lnet/minecraft/world/level/block/state/BlockBehaviour$Properties;)V
|
||||
|
||||
# RenderStateShard fields
|
||||
transitive-accessible field net/minecraft/client/renderer/RenderStateShard BLOCK_SHEET_MIPPED Lnet/minecraft/client/renderer/RenderStateShard$TextureStateShard;
|
||||
transitive-accessible field net/minecraft/client/renderer/RenderStateShard BLOCK_SHEET Lnet/minecraft/client/renderer/RenderStateShard$TextureStateShard;
|
||||
transitive-accessible field net/minecraft/client/renderer/RenderStateShard NO_TEXTURE Lnet/minecraft/client/renderer/RenderStateShard$EmptyTextureStateShard;
|
||||
transitive-accessible field net/minecraft/client/renderer/RenderStateShard DEFAULT_TEXTURING Lnet/minecraft/client/renderer/RenderStateShard$TexturingStateShard;
|
||||
transitive-accessible field net/minecraft/client/renderer/RenderStateShard GLINT_TEXTURING Lnet/minecraft/client/renderer/RenderStateShard$TexturingStateShard;
|
||||
transitive-accessible field net/minecraft/client/renderer/RenderStateShard ENTITY_GLINT_TEXTURING Lnet/minecraft/client/renderer/RenderStateShard$TexturingStateShard;
|
||||
transitive-accessible field net/minecraft/client/renderer/RenderStateShard ARMOR_ENTITY_GLINT_TEXTURING Lnet/minecraft/client/renderer/RenderStateShard$TexturingStateShard;
|
||||
transitive-accessible field net/minecraft/client/renderer/RenderStateShard LIGHTMAP Lnet/minecraft/client/renderer/RenderStateShard$LightmapStateShard;
|
||||
transitive-accessible field net/minecraft/client/renderer/RenderStateShard NO_LIGHTMAP Lnet/minecraft/client/renderer/RenderStateShard$LightmapStateShard;
|
||||
transitive-accessible field net/minecraft/client/renderer/RenderStateShard OVERLAY Lnet/minecraft/client/renderer/RenderStateShard$OverlayStateShard;
|
||||
transitive-accessible field net/minecraft/client/renderer/RenderStateShard NO_OVERLAY Lnet/minecraft/client/renderer/RenderStateShard$OverlayStateShard;
|
||||
transitive-accessible field net/minecraft/client/renderer/RenderStateShard NO_LAYERING Lnet/minecraft/client/renderer/RenderStateShard$LayeringStateShard;
|
||||
transitive-accessible field net/minecraft/client/renderer/RenderStateShard VIEW_OFFSET_Z_LAYERING Lnet/minecraft/client/renderer/RenderStateShard$LayeringStateShard;
|
||||
transitive-accessible field net/minecraft/client/renderer/RenderStateShard VIEW_OFFSET_Z_LAYERING_FORWARD Lnet/minecraft/client/renderer/RenderStateShard$LayeringStateShard;
|
||||
transitive-accessible field net/minecraft/client/renderer/RenderStateShard MAIN_TARGET Lnet/minecraft/client/renderer/RenderStateShard$OutputStateShard;
|
||||
transitive-accessible field net/minecraft/client/renderer/RenderStateShard OUTLINE_TARGET Lnet/minecraft/client/renderer/RenderStateShard$OutputStateShard;
|
||||
transitive-accessible field net/minecraft/client/renderer/RenderStateShard WEATHER_TARGET Lnet/minecraft/client/renderer/RenderStateShard$OutputStateShard;
|
||||
transitive-accessible field net/minecraft/client/renderer/RenderStateShard ITEM_ENTITY_TARGET Lnet/minecraft/client/renderer/RenderStateShard$OutputStateShard;
|
||||
transitive-accessible field net/minecraft/client/renderer/RenderStateShard DEFAULT_LINE Lnet/minecraft/client/renderer/RenderStateShard$LineStateShard;
|
||||
transitive-accessible class net/minecraft/client/renderer/RenderStateShard$TextureStateShard
|
||||
transitive-accessible class net/minecraft/client/renderer/RenderStateShard$EmptyTextureStateShard
|
||||
transitive-accessible class net/minecraft/client/renderer/RenderStateShard$TexturingStateShard
|
||||
transitive-accessible class net/minecraft/client/renderer/RenderStateShard$LightmapStateShard
|
||||
transitive-accessible class net/minecraft/client/renderer/RenderStateShard$OverlayStateShard
|
||||
transitive-accessible class net/minecraft/client/renderer/RenderStateShard$LayeringStateShard
|
||||
transitive-accessible class net/minecraft/client/renderer/RenderStateShard$OutputStateShard
|
||||
transitive-accessible class net/minecraft/client/renderer/RenderStateShard$LineStateShard
|
||||
transitive-accessible class net/minecraft/client/renderer/RenderStateShard$OffsetTexturingStateShard
|
||||
transitive-accessible class net/minecraft/client/renderer/RenderStateShard$MultiTextureStateShard
|
||||
|
||||
# CompositeStateBuilder methods
|
||||
transitive-accessible method net/minecraft/client/renderer/RenderType$CompositeState$CompositeStateBuilder <init> ()V
|
||||
transitive-accessible method net/minecraft/client/renderer/RenderType$CompositeState$CompositeStateBuilder setTextureState (Lnet/minecraft/client/renderer/RenderStateShard$EmptyTextureStateShard;)Lnet/minecraft/client/renderer/RenderType$CompositeState$CompositeStateBuilder;
|
||||
transitive-accessible method net/minecraft/client/renderer/RenderType$CompositeState$CompositeStateBuilder setLightmapState (Lnet/minecraft/client/renderer/RenderStateShard$LightmapStateShard;)Lnet/minecraft/client/renderer/RenderType$CompositeState$CompositeStateBuilder;
|
||||
transitive-accessible method net/minecraft/client/renderer/RenderType$CompositeState$CompositeStateBuilder setOverlayState (Lnet/minecraft/client/renderer/RenderStateShard$OverlayStateShard;)Lnet/minecraft/client/renderer/RenderType$CompositeState$CompositeStateBuilder;
|
||||
transitive-accessible method net/minecraft/client/renderer/RenderType$CompositeState$CompositeStateBuilder setLayeringState (Lnet/minecraft/client/renderer/RenderStateShard$LayeringStateShard;)Lnet/minecraft/client/renderer/RenderType$CompositeState$CompositeStateBuilder;
|
||||
transitive-accessible method net/minecraft/client/renderer/RenderType$CompositeState$CompositeStateBuilder setOutputState (Lnet/minecraft/client/renderer/RenderStateShard$OutputStateShard;)Lnet/minecraft/client/renderer/RenderType$CompositeState$CompositeStateBuilder;
|
||||
transitive-accessible method net/minecraft/client/renderer/RenderType$CompositeState$CompositeStateBuilder setTexturingState (Lnet/minecraft/client/renderer/RenderStateShard$TexturingStateShard;)Lnet/minecraft/client/renderer/RenderType$CompositeState$CompositeStateBuilder;
|
||||
transitive-accessible method net/minecraft/client/renderer/RenderType$CompositeState$CompositeStateBuilder setLineState (Lnet/minecraft/client/renderer/RenderStateShard$LineStateShard;)Lnet/minecraft/client/renderer/RenderType$CompositeState$CompositeStateBuilder;
|
||||
transitive-accessible method net/minecraft/client/renderer/RenderType$CompositeState$CompositeStateBuilder createCompositeState (Z)Lnet/minecraft/client/renderer/RenderType$CompositeState;
|
||||
transitive-accessible method net/minecraft/client/renderer/RenderType$CompositeState$CompositeStateBuilder createCompositeState (Lnet/minecraft/client/renderer/RenderType$OutlineProperty;)Lnet/minecraft/client/renderer/RenderType$CompositeState;
|
||||
|
||||
# RenderPipelines fields
|
||||
transitive-accessible field net/minecraft/client/renderer/RenderPipelines PIPELINES_BY_LOCATION Ljava/util/Map;
|
||||
transitive-accessible field net/minecraft/client/renderer/RenderPipelines MATRICES_PROJECTION_SNIPPET Lcom/mojang/blaze3d/pipeline/RenderPipeline$Snippet;
|
||||
|
||||
Reference in New Issue
Block a user