Merge branch 'master' of https://github.com/paulevsGitch/BetterEnd.git
This commit is contained in:
commit
bd5d7e3937
3 changed files with 26 additions and 2 deletions
|
@ -0,0 +1,23 @@
|
||||||
|
package ru.betterend.mixin.client;
|
||||||
|
|
||||||
|
import org.spongepowered.asm.mixin.Mixin;
|
||||||
|
import org.spongepowered.asm.mixin.injection.At;
|
||||||
|
import org.spongepowered.asm.mixin.injection.Inject;
|
||||||
|
import org.spongepowered.asm.mixin.injection.callback.CallbackInfoReturnable;
|
||||||
|
|
||||||
|
import net.minecraft.client.render.model.ModelLoader;
|
||||||
|
import net.minecraft.client.render.model.json.JsonUnbakedModel;
|
||||||
|
import net.minecraft.util.Identifier;
|
||||||
|
import ru.betterend.BetterEnd;
|
||||||
|
|
||||||
|
@Mixin(ModelLoader.class)
|
||||||
|
public class ModelLoaderMixin {
|
||||||
|
|
||||||
|
@Inject(method = "loadModelFromJson", at = @At("HEAD"), cancellable = true)
|
||||||
|
private void loadModelFromJson(Identifier id, CallbackInfoReturnable<JsonUnbakedModel> info) {
|
||||||
|
if (id.getNamespace().equals(BetterEnd.MOD_ID) && id.getPath().contains("pattern")) {
|
||||||
|
System.out.println(id.getPath());
|
||||||
|
info.cancel();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
|
@ -1,13 +1,13 @@
|
||||||
{
|
{
|
||||||
"variants": {
|
"variants": {
|
||||||
"type=bottom": {
|
"type=bottom": {
|
||||||
"model": "betterend:block/flavolite_slab"
|
"model": "betterend:pattern/slab/flavolite"
|
||||||
},
|
},
|
||||||
"type=double": {
|
"type=double": {
|
||||||
"model": "betterend:block/flavolite"
|
"model": "betterend:block/flavolite"
|
||||||
},
|
},
|
||||||
"type=top": {
|
"type=top": {
|
||||||
"model": "betterend:block/flavolite_slab_top"
|
"model": "betterend:pattern/slab_top/flavolite"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
|
@ -7,6 +7,7 @@
|
||||||
"WorldRendererMixin",
|
"WorldRendererMixin",
|
||||||
"BackgroundRendererMixin",
|
"BackgroundRendererMixin",
|
||||||
"ClientRecipeBookMixin",
|
"ClientRecipeBookMixin",
|
||||||
|
"ModelLoaderMixin",
|
||||||
"ClientPlayNetworkHandlerMixin",
|
"ClientPlayNetworkHandlerMixin",
|
||||||
"MinecraftClientMixin"
|
"MinecraftClientMixin"
|
||||||
],
|
],
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue