mirror of
https://github.com/FabricMC/fabric.git
synced 2025-04-21 03:10:54 -04:00
Update yarn mappings (#1127)
This commit is contained in:
parent
8f6b00f9a3
commit
eacb8ba396
11 changed files with 28 additions and 16 deletions
build.gradle
fabric-game-rule-api-v1/src/main/java/net/fabricmc/fabric/mixin/gamerule/client
fabric-object-builder-api-v1/src/main/java/net/fabricmc/fabric
api/object/builder/v1/block
mixin/object/builder
fabric-object-builders-v0/src/main/java/net/fabricmc/fabric/api/block
fabric-registry-sync-v0/src/main/java/net/fabricmc/fabric/mixin/registry/sync
fabric-renderer-api-v1/src/main/java/net/fabricmc/fabric
fabric-renderer-indigo/src/main/java/net/fabricmc/fabric/impl/client/indigo/renderer/render
fabric-textures-v0/src/main/java/net/fabricmc/fabric/api/event/client
|
@ -20,7 +20,7 @@ def ENV = System.getenv()
|
|||
class Globals {
|
||||
static def baseVersion = "0.24.1"
|
||||
static def mcVersion = "1.16.3"
|
||||
static def yarnVersion = "+build.1"
|
||||
static def yarnVersion = "+build.47"
|
||||
static def loaderVersion = "0.9.2+build.206"
|
||||
}
|
||||
|
||||
|
|
|
@ -33,6 +33,7 @@ import net.minecraft.world.GameRules;
|
|||
|
||||
import net.fabricmc.fabric.api.gamerule.v1.CustomGameRuleCategory;
|
||||
|
||||
// For any future maintainers who wonder why this class does not compile because of jsr305, please reload gradle using `--refresh-dependencies`.
|
||||
@Mixin(EditGameRulesScreen.RuleListWidget.class)
|
||||
public abstract class RuleListWidgetMixin extends net.minecraft.client.gui.widget.EntryListWidget<EditGameRulesScreen.AbstractRuleWidget> {
|
||||
@Unique
|
||||
|
|
|
@ -50,6 +50,7 @@ public class FabricBlockSettings extends AbstractBlock.Settings {
|
|||
protected FabricBlockSettings(AbstractBlock.Settings settings) {
|
||||
super(((AbstractBlockSettingsAccessor) settings).getMaterial(), ((AbstractBlockSettingsAccessor) settings).getMaterialColorFactory());
|
||||
// Mostly Copied from vanilla's copy method
|
||||
// Note: If new methods are added to Block settings, an accessor must be added here
|
||||
AbstractBlockSettingsAccessor thisAccessor = (AbstractBlockSettingsAccessor) this;
|
||||
AbstractBlockSettingsAccessor otherAccessor = (AbstractBlockSettingsAccessor) settings;
|
||||
|
||||
|
@ -58,7 +59,7 @@ public class FabricBlockSettings extends AbstractBlock.Settings {
|
|||
this.resistance(otherAccessor.getResistance());
|
||||
this.collidable(otherAccessor.getCollidable());
|
||||
thisAccessor.setRandomTicks(otherAccessor.getRandomTicks());
|
||||
this.lightLevel(otherAccessor.getLuminance());
|
||||
this.luminance(otherAccessor.getLuminance());
|
||||
thisAccessor.setMaterialColorFactory(otherAccessor.getMaterialColorFactory());
|
||||
this.sounds(otherAccessor.getSoundGroup());
|
||||
this.slipperiness(otherAccessor.getSlipperiness());
|
||||
|
@ -134,8 +135,8 @@ public class FabricBlockSettings extends AbstractBlock.Settings {
|
|||
}
|
||||
|
||||
@Override
|
||||
public FabricBlockSettings lightLevel(ToIntFunction<BlockState> levelFunction) {
|
||||
super.lightLevel(levelFunction);
|
||||
public FabricBlockSettings luminance(ToIntFunction<BlockState> luminanceFunction) {
|
||||
super.luminance(luminanceFunction);
|
||||
return this;
|
||||
}
|
||||
|
||||
|
@ -224,8 +225,17 @@ public class FabricBlockSettings extends AbstractBlock.Settings {
|
|||
|
||||
/* FABRIC ADDITIONS*/
|
||||
|
||||
/**
|
||||
* @deprecated Please use {@link FabricBlockSettings#luminance(int)}.
|
||||
*/
|
||||
@Deprecated
|
||||
public FabricBlockSettings lightLevel(int lightLevel) {
|
||||
this.lightLevel(ignored -> lightLevel);
|
||||
this.luminance(lightLevel);
|
||||
return this;
|
||||
}
|
||||
|
||||
public FabricBlockSettings luminance(int luminance) {
|
||||
this.luminance(ignored -> luminance);
|
||||
return this;
|
||||
}
|
||||
|
||||
|
|
|
@ -49,7 +49,7 @@ public interface AbstractBlockSettingsAccessor {
|
|||
@Accessor
|
||||
boolean getRandomTicks();
|
||||
|
||||
@Accessor
|
||||
@Accessor("luminance")
|
||||
ToIntFunction<BlockState> getLuminance();
|
||||
|
||||
@Accessor
|
||||
|
@ -110,13 +110,14 @@ public interface AbstractBlockSettingsAccessor {
|
|||
@Accessor
|
||||
void setToolRequired(boolean toolRequired);
|
||||
|
||||
// Cannot be an invoker due to conflicts in mixin: method_9631(Ljava/util/function/ToIntFunction;)Lnet/minecraft/class_4970$class_2251; for target net.minecraft.block.AbstractBlock$Settings conflicts with existing mapping field_10663:Ljava/util/function/ToIntFunction;
|
||||
@Accessor("luminance")
|
||||
void setLuminanceFunction(ToIntFunction<BlockState> luminanceFunction);
|
||||
|
||||
/* INVOKERS */
|
||||
@Invoker
|
||||
Block.Settings invokeSounds(BlockSoundGroup group);
|
||||
|
||||
@Invoker
|
||||
Block.Settings invokeLightLevel(ToIntFunction<BlockState> lightLevelFunction);
|
||||
|
||||
@Invoker
|
||||
Block.Settings invokeBreakInstantly();
|
||||
|
||||
|
|
|
@ -67,7 +67,7 @@ public final class BlockSettingsExtensions {
|
|||
}
|
||||
|
||||
public static void lightLevel(Settings settings, int lightLevel) {
|
||||
((AbstractBlockSettingsAccessor) settings).invokeLightLevel(ignored -> lightLevel);
|
||||
((AbstractBlockSettingsAccessor) settings).setLuminanceFunction(ignored -> lightLevel);
|
||||
}
|
||||
|
||||
public static void breakInstantly(Settings settings) {
|
||||
|
|
|
@ -28,7 +28,7 @@ import net.fabricmc.fabric.api.event.registry.DynamicRegistrySetupCallback;
|
|||
|
||||
@Mixin(DynamicRegistryManager.class)
|
||||
public class DynamicRegistryManagerMixin {
|
||||
@Inject(method = "create", at = @At(value = "INVOKE", target = "Lnet/minecraft/util/dynamic/RegistryOps$class_5506$class_5507;<init>()V"), locals = LocalCapture.CAPTURE_FAILHARD)
|
||||
@Inject(method = "create", at = @At(value = "INVOKE", target = "Lnet/minecraft/util/dynamic/RegistryOps$EntryLoader$Impl;<init>()V"), locals = LocalCapture.CAPTURE_FAILHARD)
|
||||
private static void onCreateImpl(CallbackInfoReturnable<DynamicRegistryManager.Impl> cir, DynamicRegistryManager.Impl registryManager) {
|
||||
DynamicRegistrySetupCallback.EVENT.invoker().onRegistrySetup(registryManager);
|
||||
}
|
||||
|
|
|
@ -129,7 +129,7 @@ public class MixinLevelStorageSession {
|
|||
}
|
||||
}
|
||||
|
||||
@Inject(method = "method_27426", at = @At("HEAD"))
|
||||
@Inject(method = "backupLevelDataFile(Lnet/minecraft/util/registry/DynamicRegistryManager;Lnet/minecraft/world/SaveProperties;Lnet/minecraft/nbt/CompoundTag;)V", at = @At("HEAD"))
|
||||
public void saveWorld(DynamicRegistryManager registryTracker, SaveProperties saveProperties, CompoundTag compoundTag, CallbackInfo info) {
|
||||
if (!Files.exists(directory)) {
|
||||
return;
|
||||
|
|
|
@ -74,7 +74,7 @@ public abstract class ModelHelper {
|
|||
* <p>Retrieves sprites from the block texture atlas via {@link SpriteFinder}.
|
||||
*/
|
||||
public static List<BakedQuad>[] toQuadLists(Mesh mesh) {
|
||||
SpriteFinder finder = SpriteFinder.get(MinecraftClient.getInstance().getBakedModelManager().method_24153(SpriteAtlasTexture.BLOCK_ATLAS_TEX));
|
||||
SpriteFinder finder = SpriteFinder.get(MinecraftClient.getInstance().getBakedModelManager().method_24153(SpriteAtlasTexture.BLOCK_ATLAS_TEXTURE));
|
||||
|
||||
@SuppressWarnings("unchecked")
|
||||
final ImmutableList.Builder<BakedQuad>[] builders = new ImmutableList.Builder[7];
|
||||
|
|
|
@ -134,7 +134,7 @@ public class SpriteFinderImpl implements SpriteFinder {
|
|||
} else if (quadrant instanceof Node) {
|
||||
return ((Node) quadrant).find(u, v);
|
||||
} else {
|
||||
return MinecraftClient.getInstance().getSpriteAtlas(SpriteAtlasTexture.BLOCK_ATLAS_TEX).apply(MissingSprite.getMissingSpriteId());
|
||||
return MinecraftClient.getInstance().getSpriteAtlas(SpriteAtlasTexture.BLOCK_ATLAS_TEXTURE).apply(MissingSprite.getMissingSpriteId());
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -132,7 +132,7 @@ public class ItemRenderContext extends AbstractRenderContext implements RenderCo
|
|||
*/
|
||||
private VertexConsumer selectVertexConsumer(RenderLayer layerIn) {
|
||||
final RenderLayer layer = transformMode == ModelTransformation.Mode.GUI ? TexturedRenderLayers.getEntityTranslucentCull() : layerIn;
|
||||
return ItemRenderer.getArmorVertexConsumer(vertexConsumerProvider, layer, true, itemStack.hasGlint());
|
||||
return ItemRenderer.getArmorGlintConsumer(vertexConsumerProvider, layer, true, itemStack.hasGlint());
|
||||
}
|
||||
|
||||
private class Maker extends MutableQuadViewImpl implements QuadEmitter {
|
||||
|
|
|
@ -53,7 +53,7 @@ public interface ClientSpriteRegistryCallback {
|
|||
*/
|
||||
@Deprecated
|
||||
static void registerBlockAtlas(ClientSpriteRegistryCallback callback) {
|
||||
event(SpriteAtlasTexture.BLOCK_ATLAS_TEX).register(callback);
|
||||
event(SpriteAtlasTexture.BLOCK_ATLAS_TEXTURE).register(callback);
|
||||
}
|
||||
|
||||
class Registry {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue