Skip to content

Commit

Permalink
Console Animations (#99)
Browse files Browse the repository at this point in the history
  • Loading branch information
Jeryn99 authored Feb 27, 2023
1 parent 5e0bd2a commit 274ec0f
Show file tree
Hide file tree
Showing 47 changed files with 13,763 additions and 931 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -68,11 +68,8 @@ public class ModelRegistry {

public static ModelLayerLocation ARS_EGG;
public static ModelLayerLocation BULK_HEAD_DOOR;
public static ModelLayerLocation CRYSTAL_CORE;


public static void init() {
CRYSTAL_CORE = register(new ModelLayerLocation(new ResourceLocation(TardisRefined.MODID, "crystal_core"), "crystal_core"), CrystalCoreModel::createBodyLayer);
ROOT_PLANT_STATE_ONE = register(new ModelLayerLocation(new ResourceLocation(TardisRefined.MODID, "root_plant_one"), "root_plant_one"), RootPlantStateOneModel::createBodyLayer);
ROOT_PLANT_STATE_TWO = register(new ModelLayerLocation(new ResourceLocation(TardisRefined.MODID, "root_plant_two"), "root_plant_two"), RootPlantStateTwoModel::createBodyLayer);
ROOT_PLANT_STATE_THREE = register(new ModelLayerLocation(new ResourceLocation(TardisRefined.MODID, "root_plant_three"), "root_plant_three"), RootPlantStateThreeModel::createBodyLayer);
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
package whocraft.tardis_refined.client.model.blockentity.console;

import com.mojang.blaze3d.vertex.PoseStack;
import net.minecraft.client.model.HierarchicalModel;
import net.minecraft.client.model.geom.ModelPart;
import net.minecraft.client.renderer.MultiBufferSource;
import net.minecraft.resources.ResourceLocation;
import net.minecraft.world.level.Level;
Expand All @@ -18,5 +20,15 @@ default ResourceLocation getTexture(GlobalConsoleBlockEntity entity) {
ConsoleTheme console = entity.getBlockState().getValue(GlobalConsoleBlock.CONSOLE);
return entity.pattern().textureLocation();
}

default ModelPart findPart(HierarchicalModel hierarchicalModel, String string) {
return hierarchicalModel.root().getAllParts().filter((modelPart) -> {
return modelPart.hasChild(string);
}).findFirst().map((modelPart) -> {
return modelPart.getChild(string);
}).get();
}

ResourceLocation getDefaultTexture();

}

Large diffs are not rendered by default.

Large diffs are not rendered by default.

Large diffs are not rendered by default.

This file was deleted.

Loading

0 comments on commit 274ec0f

Please sign in to comment.