Fabric 1.17 does not contain the ArmorRenderingRegistry
. Temporarily added the missing files to a shadow-namespace to allw testing of the CrystaliteArmor.
This commit is contained in:
parent
2ba7ed4ec8
commit
9a28623230
9 changed files with 474 additions and 7 deletions
|
@ -0,0 +1,57 @@
|
|||
/*
|
||||
* Copyright (c) 2016, 2017, 2018, 2019 FabricMC
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
/*
|
||||
This file is a refactor from fabric-api, based on the work of shedaniel.
|
||||
*/
|
||||
|
||||
package shadow.fabric.mixin.client.rendering;
|
||||
|
||||
|
||||
import net.minecraft.world.item.Item;
|
||||
import org.spongepowered.asm.mixin.Mixin;
|
||||
import org.spongepowered.asm.mixin.Unique;
|
||||
import shadow.fabric.api.client.rendering.v1.ArmorRenderingRegistry;
|
||||
import shadow.fabric.impl.client.rendering.ArmorProviderExtensions;
|
||||
|
||||
|
||||
@Mixin(Item.class)
|
||||
public class MixinItem implements ArmorProviderExtensions {
|
||||
@Unique
|
||||
private ArmorRenderingRegistry.ModelProvider armorModelProvider;
|
||||
@Unique
|
||||
private ArmorRenderingRegistry.TextureProvider armorTextureProvider;
|
||||
|
||||
@Override
|
||||
public ArmorRenderingRegistry.ModelProvider fabric_getArmorModelProvider() {
|
||||
return armorModelProvider;
|
||||
}
|
||||
|
||||
@Override
|
||||
public ArmorRenderingRegistry.TextureProvider fabric_getArmorTextureProvider() {
|
||||
return armorTextureProvider;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void fabric_setArmorModelProvider(ArmorRenderingRegistry.ModelProvider provider) {
|
||||
armorModelProvider = provider;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void fabric_setArmorTextureProvider(ArmorRenderingRegistry.TextureProvider provider) {
|
||||
armorTextureProvider = provider;
|
||||
}
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue