diff --git a/src/main/java/com/klikli_dev/occultism/client/entities/SpiritJobClient.java b/src/main/java/com/klikli_dev/occultism/client/entities/SpiritJobClient.java new file mode 100644 index 000000000..e0e5d736a --- /dev/null +++ b/src/main/java/com/klikli_dev/occultism/client/entities/SpiritJobClient.java @@ -0,0 +1,29 @@ +package com.klikli_dev.occultism.client.entities; + +import com.klikli_dev.occultism.Occultism; +import net.minecraft.resources.ResourceLocation; + + +public class SpiritJobClient { + protected ResourceLocation modelID; + + public SpiritJobClient(ResourceLocation modelID) { + this.modelID = modelID; + } + + public ResourceLocation modelID() { + return modelID; + } + + public static SpiritJobClient create(ResourceLocation modelID) { + return new SpiritJobClient(modelID); + } + + public static SpiritJobClient create(String modelId) { + return create(new ResourceLocation(Occultism.MODID,modelId)); + } + + public static SpiritJobClient create() { + return create("worker"); + } +} diff --git a/src/main/java/com/klikli_dev/occultism/client/model/entity/AfritModel.java b/src/main/java/com/klikli_dev/occultism/client/model/entity/AfritModel.java index 76726d45a..b55811626 100644 --- a/src/main/java/com/klikli_dev/occultism/client/model/entity/AfritModel.java +++ b/src/main/java/com/klikli_dev/occultism/client/model/entity/AfritModel.java @@ -31,15 +31,9 @@ import software.bernie.geckolib.model.DefaultedGeoModel; -public class AfritModel extends DefaultedEntityGeoModel { - +public class AfritModel extends DefaultedJobEntityModel { + public final static String ASSET_SUBPATH = "afrit"; public AfritModel() { - super(new ResourceLocation(Occultism.MODID, "afrit"), true); - } - - @Override - public RenderType getRenderType(AfritEntity animatable, ResourceLocation texture) { - return RenderType.entityTranslucent(this.getTextureResource(animatable)); + super(new ResourceLocation(Occultism.MODID, "afrit"), true,ASSET_SUBPATH); } - } diff --git a/src/main/java/com/klikli_dev/occultism/client/model/entity/DefaultedJobEntityModel.java b/src/main/java/com/klikli_dev/occultism/client/model/entity/DefaultedJobEntityModel.java new file mode 100644 index 000000000..09382d22c --- /dev/null +++ b/src/main/java/com/klikli_dev/occultism/client/model/entity/DefaultedJobEntityModel.java @@ -0,0 +1,80 @@ +package com.klikli_dev.occultism.client.model.entity; + +import com.klikli_dev.occultism.Occultism; +import com.klikli_dev.occultism.common.entity.job.SpiritJobFactory; +import com.klikli_dev.occultism.common.entity.spirit.DjinniEntity; +import com.klikli_dev.occultism.common.entity.spirit.SpiritEntity; +import com.klikli_dev.occultism.registry.OccultismSpiritJobs; +import net.minecraft.client.renderer.RenderType; +import net.minecraft.resources.ResourceLocation; +import software.bernie.geckolib.cache.GeckoLibCache; +import software.bernie.geckolib.core.animatable.GeoAnimatable; +import software.bernie.geckolib.model.DefaultedEntityGeoModel; + +import java.util.HashMap; +import java.util.Map; + +public abstract class DefaultedJobEntityModel extends DefaultedEntityGeoModel { + private final String entity_subpath; + protected final Map jobModels; + protected final ModelData worker; + + public DefaultedJobEntityModel(ResourceLocation assetSubpath, boolean turnsHead, String entity_subpath) { + super(assetSubpath, turnsHead); + this.entity_subpath = entity_subpath; + jobModels = new HashMap<>(); + this.worker = this.buildModelData("worker"); + for(var job: OccultismSpiritJobs.JOBS.getEntries()) { + SpiritJobFactory factory = job.get(); + jobModels.put(job.getId().toString(), this.buildModelData(factory.client().modelID(),"_")); + } + } + + public ModelData getModelData(T animatable) { + var job = animatable.getJobID(); + var model = jobModels.getOrDefault(job, this.worker); + if(!GeckoLibCache.getBakedModels().containsKey(model.model())) + model=this.worker; + return model; + } + public ModelData buildModelData(String job) { + return this.buildModelData(job, "_"); + } + + public ModelData buildModelData(ResourceLocation basePath) { + return new ModelData( + this.buildFormattedModelPath(basePath), + this.buildFormattedTexturePath(basePath), + this.buildFormattedAnimationPath(basePath) + ); + } + public ModelData buildModelData(ResourceLocation location, String separator) { + return this.buildModelData(new ResourceLocation(location.getNamespace(), entity_subpath + separator + location.getPath())); + } + public ModelData buildModelData(String job, String separator) { + return this.buildModelData(new ResourceLocation(Occultism.MODID, job),separator); + } + + public record ModelData(ResourceLocation model, ResourceLocation texture, ResourceLocation animation) { + } + + @Override + public RenderType getRenderType(T animatable, ResourceLocation texture) { + return RenderType.entityTranslucent(this.getTextureResource(animatable)); + } + + @Override + public ResourceLocation getModelResource(T animatable) { + return this.getModelData(animatable).model(); + } + + @Override + public ResourceLocation getTextureResource(T animatable) { + return this.getModelData(animatable).texture(); + } + + @Override + public ResourceLocation getAnimationResource(T animatable) { + return this.getModelData(animatable).animation(); + } +} diff --git a/src/main/java/com/klikli_dev/occultism/client/model/entity/DjinniModel.java b/src/main/java/com/klikli_dev/occultism/client/model/entity/DjinniModel.java index 3c91d86f5..72ac7a25d 100644 --- a/src/main/java/com/klikli_dev/occultism/client/model/entity/DjinniModel.java +++ b/src/main/java/com/klikli_dev/occultism/client/model/entity/DjinniModel.java @@ -33,62 +33,12 @@ import java.util.Objects; -public class DjinniModel extends DefaultedEntityGeoModel { +public class DjinniModel extends DefaultedJobEntityModel { public final static String ASSET_SUBPATH = "djinni"; - public final ModelData worker; - public final ModelData machineManager; public DjinniModel() { - super(new ResourceLocation(Occultism.MODID, ASSET_SUBPATH), false); - - this.worker = this.buildModelData("worker"); - this.machineManager = this.buildModelData("machine_manager"); - } - - public ModelData getModelData(DjinniEntity animatable) { - var job = animatable.getJobID(); - - if (Objects.equals(job, OccultismSpiritJobs.MANAGE_MACHINE.getId().toString())) { - return this.machineManager; - } - - return this.worker; - } - - @Override - public RenderType getRenderType(DjinniEntity animatable, ResourceLocation texture) { - return RenderType.entityTranslucent(this.getTextureResource(animatable)); - } - - @Override - public ResourceLocation getModelResource(DjinniEntity animatable) { - return this.getModelData(animatable).model(); - } - - @Override - public ResourceLocation getTextureResource(DjinniEntity animatable) { - return this.getModelData(animatable).texture(); - } - - @Override - public ResourceLocation getAnimationResource(DjinniEntity animatable) { - return this.getModelData(animatable).animation(); - } - - public ModelData buildModelData(String job) { - return this.buildModelData(job, "_"); - } - - public ModelData buildModelData(String job, String separator) { - return new ModelData( - this.buildFormattedModelPath(new ResourceLocation(Occultism.MODID, ASSET_SUBPATH + separator + job)), - this.buildFormattedTexturePath(new ResourceLocation(Occultism.MODID, ASSET_SUBPATH + separator + job)), - this.buildFormattedAnimationPath(new ResourceLocation(Occultism.MODID, ASSET_SUBPATH + separator + job)) - ); - } - - public record ModelData(ResourceLocation model, ResourceLocation texture, ResourceLocation animation) { + super(new ResourceLocation(Occultism.MODID, ASSET_SUBPATH), false,ASSET_SUBPATH); } } diff --git a/src/main/java/com/klikli_dev/occultism/client/model/entity/FoliotModel.java b/src/main/java/com/klikli_dev/occultism/client/model/entity/FoliotModel.java index 2c2b5bc98..7c31b7fb6 100644 --- a/src/main/java/com/klikli_dev/occultism/client/model/entity/FoliotModel.java +++ b/src/main/java/com/klikli_dev/occultism/client/model/entity/FoliotModel.java @@ -23,90 +23,23 @@ package com.klikli_dev.occultism.client.model.entity; import com.klikli_dev.occultism.Occultism; +import com.klikli_dev.occultism.common.entity.job.SpiritJobFactory; import com.klikli_dev.occultism.common.entity.spirit.FoliotEntity; import com.klikli_dev.occultism.registry.OccultismSpiritJobs; import net.minecraft.resources.ResourceLocation; import software.bernie.geckolib.model.DefaultedEntityGeoModel; +import java.util.HashMap; +import java.util.Map; import java.util.Objects; -public class FoliotModel extends DefaultedEntityGeoModel { +public class FoliotModel extends DefaultedJobEntityModel { public final static String ASSET_SUBPATH = "foliot"; - public final ModelData crusher; - public final ModelData transporter; - public final ModelData janitor; - public final ModelData lumberjack; - public final ModelData saplingTrader; - public final ModelData otherstoneTrader; - public FoliotModel() { - super(new ResourceLocation(Occultism.MODID, ASSET_SUBPATH), false); - - this.crusher = this.buildModelData("crusher"); - this.transporter = this.buildModelData("transporter"); - this.janitor = this.buildModelData("janitor"); - this.lumberjack = this.buildModelData("lumberjack"); - this.otherstoneTrader = this.buildModelData("otherstone_trader"); - this.saplingTrader = this.buildModelData("sapling_trader"); - } - - public ModelData getModelData(FoliotEntity animatable) { - var job = animatable.getJobID(); - - if (Objects.equals(job, OccultismSpiritJobs.TRANSPORT_ITEMS.getId().toString())) { - return this.transporter; - } - - if (Objects.equals(job, OccultismSpiritJobs.CLEANER.getId().toString())) { - return this.janitor; - } - - if (Objects.equals(job, OccultismSpiritJobs.LUMBERJACK.getId().toString())) { - return this.lumberjack; - } - - if (Objects.equals(job, OccultismSpiritJobs.TRADE_OTHERSTONE_T1.getId().toString())) { - return this.otherstoneTrader; - } - - if (Objects.equals(job, OccultismSpiritJobs.TRADE_OTHERWORLD_SAPLINGS_T2.getId().toString())) { - return this.saplingTrader; - } - - return this.crusher; - } - - @Override - public ResourceLocation getModelResource(FoliotEntity animatable) { - return this.getModelData(animatable).model(); - } - - @Override - public ResourceLocation getTextureResource(FoliotEntity animatable) { - return this.getModelData(animatable).texture(); - } - - @Override - public ResourceLocation getAnimationResource(FoliotEntity animatable) { - return this.getModelData(animatable).animation(); - } - - public ModelData buildModelData(String job) { - return this.buildModelData(job, "_"); - } - - public ModelData buildModelData(String job, String separator) { - return new ModelData( - this.buildFormattedModelPath(new ResourceLocation(Occultism.MODID, ASSET_SUBPATH + separator + job)), - this.buildFormattedTexturePath(new ResourceLocation(Occultism.MODID, ASSET_SUBPATH + separator + job)), - this.buildFormattedAnimationPath(new ResourceLocation(Occultism.MODID, ASSET_SUBPATH + separator + job)) - ); - } - - public record ModelData(ResourceLocation model, ResourceLocation texture, ResourceLocation animation) { + super(new ResourceLocation(Occultism.MODID, ASSET_SUBPATH), false,ASSET_SUBPATH); } } diff --git a/src/main/java/com/klikli_dev/occultism/client/model/entity/MaridModel.java b/src/main/java/com/klikli_dev/occultism/client/model/entity/MaridModel.java index 306b7f69b..d633f3cc1 100644 --- a/src/main/java/com/klikli_dev/occultism/client/model/entity/MaridModel.java +++ b/src/main/java/com/klikli_dev/occultism/client/model/entity/MaridModel.java @@ -39,15 +39,10 @@ import software.bernie.geckolib.model.DefaultedGeoModel; -public class MaridModel extends DefaultedEntityGeoModel { - +public class MaridModel extends DefaultedJobEntityModel { + public final static String ASSET_SUBPATH = "marid"; public MaridModel() { - super(new ResourceLocation(Occultism.MODID, "marid"), true); - } - - @Override - public RenderType getRenderType(MaridEntity animatable, ResourceLocation texture) { - return RenderType.entityTranslucent(this.getTextureResource(animatable)); + super(new ResourceLocation(Occultism.MODID, "marid"), true,ASSET_SUBPATH); } } diff --git a/src/main/java/com/klikli_dev/occultism/common/entity/job/SpiritJobFactory.java b/src/main/java/com/klikli_dev/occultism/common/entity/job/SpiritJobFactory.java index 3ccedfbdc..4277a2dbc 100644 --- a/src/main/java/com/klikli_dev/occultism/common/entity/job/SpiritJobFactory.java +++ b/src/main/java/com/klikli_dev/occultism/common/entity/job/SpiritJobFactory.java @@ -22,17 +22,21 @@ package com.klikli_dev.occultism.common.entity.job; +import com.klikli_dev.occultism.client.entities.SpiritJobClient; import com.klikli_dev.occultism.common.entity.spirit.SpiritEntity; import com.klikli_dev.occultism.registry.OccultismSpiritJobs; +import net.minecraft.resources.ResourceLocation; import java.util.function.Function; public class SpiritJobFactory { Function constructor; + SpiritJobClient client; - public SpiritJobFactory(Function constructor) { + public SpiritJobFactory(Function constructor, SpiritJobClient client) { this.constructor = constructor; + this.client = client; } public SpiritJob create(SpiritEntity entity) { @@ -41,4 +45,8 @@ public SpiritJob create(SpiritEntity entity) { return job; } + public SpiritJobClient client() { + return this.client; + } + } diff --git a/src/main/java/com/klikli_dev/occultism/registry/OccultismSpiritJobs.java b/src/main/java/com/klikli_dev/occultism/registry/OccultismSpiritJobs.java index 0205c0319..4178502ec 100644 --- a/src/main/java/com/klikli_dev/occultism/registry/OccultismSpiritJobs.java +++ b/src/main/java/com/klikli_dev/occultism/registry/OccultismSpiritJobs.java @@ -23,6 +23,7 @@ package com.klikli_dev.occultism.registry; import com.klikli_dev.occultism.Occultism; +import com.klikli_dev.occultism.client.entities.SpiritJobClient; import com.klikli_dev.occultism.common.entity.job.*; import com.klikli_dev.occultism.util.StaticUtil; import net.minecraft.resources.ResourceLocation; @@ -41,13 +42,13 @@ public class OccultismSpiritJobs { new RegistryBuilder().disableSaving().setMaxID(Integer.MAX_VALUE - 1)); public static final RegistryObject LUMBERJACK = JOBS.register("lumberjack", - () -> new SpiritJobFactory(LumberjackJob::new)); + () -> new SpiritJobFactory(LumberjackJob::new, SpiritJobClient.create("lumberjack"))); public static final RegistryObject MANAGE_MACHINE = JOBS.register("manage_machine", - () -> new SpiritJobFactory(ManageMachineJob::new)); + () -> new SpiritJobFactory(ManageMachineJob::new, SpiritJobClient.create("machine_manager"))); public static final RegistryObject TRANSPORT_ITEMS = JOBS.register("transport_items", - () -> new SpiritJobFactory(TransportItemsJob::new)); + () -> new SpiritJobFactory(TransportItemsJob::new, SpiritJobClient.create("transporter"))); public static final RegistryObject CLEANER = JOBS.register("cleaner", - () -> new SpiritJobFactory(CleanerJob::new)); + () -> new SpiritJobFactory(CleanerJob::new, SpiritJobClient.create("janitor"))); //Trade jobs public static final RegistryObject TRADE_OTHERSTONE_T1 = JOBS.register("trade_otherstone_t1", @@ -56,14 +57,14 @@ public class OccultismSpiritJobs { job.setTimeToConvert(15); job.setMaxTradesPerRound(4); return job; - })); + },SpiritJobClient.create("sapling_trader"))); public static final RegistryObject TRADE_OTHERWORLD_SAPLINGS_T2 = JOBS.register("trade_otherworld_saplings_t1", () -> new SpiritJobFactory((entity) -> { TraderJob job = new TraderJob(entity, StaticUtil.modLoc("spirit_trade/otherworld_sapling")); job.setTimeToConvert(20); job.setMaxTradesPerRound(1); return job; - })); + }, SpiritJobClient.create("otherstone_trader"))); //Crushing jobs public static final RegistryObject CRUSH_TIER1 = JOBS.register("crush_tier1", @@ -71,38 +72,38 @@ public class OccultismSpiritJobs { () -> Occultism.SERVER_CONFIG.spiritJobs.tier1CrusherTimeMultiplier.get().floatValue(), () -> Occultism.SERVER_CONFIG.spiritJobs.tier1CrusherOutputMultiplier.get().floatValue(), () -> 1 - ))); + ), SpiritJobClient.create("crusher"))); public static final RegistryObject CRUSH_TIER2 = JOBS.register("crush_tier2", () -> new SpiritJobFactory((entity) -> new CrusherJob(entity, () -> Occultism.SERVER_CONFIG.spiritJobs.tier2CrusherTimeMultiplier.get().floatValue(), () -> Occultism.SERVER_CONFIG.spiritJobs.tier2CrusherOutputMultiplier.get().floatValue(), () -> 2 - ))); + ), SpiritJobClient.create( "crusher"))); public static final RegistryObject CRUSH_TIER3 = JOBS.register("crush_tier3", () -> new SpiritJobFactory((entity) -> new CrusherJob(entity, () -> Occultism.SERVER_CONFIG.spiritJobs.tier3CrusherTimeMultiplier.get().floatValue(), () -> Occultism.SERVER_CONFIG.spiritJobs.tier3CrusherOutputMultiplier.get().floatValue(), () -> 3 - ))); + ), SpiritJobClient.create( "crusher"))); public static final RegistryObject CRUSH_TIER4 = JOBS.register("crush_tier4", () -> new SpiritJobFactory((entity) -> new CrusherJob(entity, () -> Occultism.SERVER_CONFIG.spiritJobs.tier4CrusherTimeMultiplier.get().floatValue(), () -> Occultism.SERVER_CONFIG.spiritJobs.tier4CrusherOutputMultiplier.get().floatValue(), () -> 4 - ))); + ), SpiritJobClient.create("crusher"))); //Weather Jobs public static final RegistryObject CLEAR_WEATHER = JOBS.register("clear_weather", - () -> new SpiritJobFactory((entity) -> new ClearWeatherJob(entity, 20 * 15))); + () -> new SpiritJobFactory((entity) -> new ClearWeatherJob(entity, 20 * 15), SpiritJobClient.create())); public static final RegistryObject RAIN_WEATHER = JOBS.register("rain_weather", - () -> new SpiritJobFactory((entity) -> new RainWeatherJob(entity, 20 * 30))); + () -> new SpiritJobFactory((entity) -> new RainWeatherJob(entity, 20 * 30), SpiritJobClient.create())); public static final RegistryObject THUNDER_WEATHER = JOBS.register("thunder_weather", - () -> new SpiritJobFactory((entity) -> new ThunderWeatherJob(entity, 20 * 60))); + () -> new SpiritJobFactory((entity) -> new ThunderWeatherJob(entity, 20 * 60), SpiritJobClient.create())); //Time Jobs public static final RegistryObject DAY_TIME = JOBS.register("day_time", - () -> new SpiritJobFactory((entity) -> new DayTimeJob(entity, 20 * 5))); + () -> new SpiritJobFactory((entity) -> new DayTimeJob(entity, 20 * 5), SpiritJobClient.create())); public static final RegistryObject NIGHT_TIME = JOBS.register("night_time", - () -> new SpiritJobFactory((entity) -> new NightTimeJob(entity, 20 * 5))); + () -> new SpiritJobFactory((entity) -> new NightTimeJob(entity, 20 * 5), SpiritJobClient.create())); } diff --git a/src/main/resources/assets/occultism/animations/entity/afrit_worker.animation.json b/src/main/resources/assets/occultism/animations/entity/afrit_worker.animation.json new file mode 100644 index 000000000..0ab6ed691 --- /dev/null +++ b/src/main/resources/assets/occultism/animations/entity/afrit_worker.animation.json @@ -0,0 +1,502 @@ +{ + "format_version": "1.8.0", + "animations": { + "idle": { + "loop": true, + "animation_length": 2, + "bones": { + "1": { + "rotation": { + "0.0": { + "vector": [0, 0, 2.5] + }, + "1.0": { + "vector": [0, 0, -5] + }, + "2.0": { + "vector": [0, 0, 2.5] + } + } + }, + "2": { + "rotation": { + "0.0": { + "vector": [-9.99067, -0.43399, -2.46207] + }, + "1.0": { + "vector": [-9.96271, 0.86717, 4.92442] + }, + "2.0": { + "vector": [-9.99067, -0.43399, -2.46207] + } + } + }, + "3": { + "rotation": { + "0.0": { + "vector": [7.49294, -0.32621, 2.47864] + }, + "1.0": { + "vector": [7.43656, 0.9762, -7.43656] + }, + "2.0": { + "vector": [7.49294, -0.32621, 2.47864] + } + } + }, + "Torso": { + "position": { + "0.0": { + "vector": [0, 0, 0] + }, + "1.0": { + "vector": [0, 0.5, 0] + }, + "2.0": { + "vector": [0, 0, 0] + } + }, + "scale": { + "vector": [1, 1, 1] + } + }, + "Lhand": { + "rotation": { + "0.0": { + "vector": [7.5, 0, -10] + }, + "1.0": { + "vector": [7.49294, 0.32621, -12.47864] + }, + "2.0": { + "vector": [7.5, 0, -10] + } + } + }, + "bone": { + "rotation": { + "vector": [-27.5, 0, 0] + } + }, + "Rhand": { + "rotation": { + "0.0": { + "vector": [-10, 0, 12.5] + }, + "1.0": { + "vector": [-9.99403, 0.34723, 14.46964] + }, + "2.0": { + "vector": [-10, 0, 12.5] + } + } + }, + "bone2": { + "rotation": { + "vector": [-12, -17.5, 0] + } + }, + "Tail": { + "rotation": { + "vector": [0, 0, 0] + } + }, + "bone3": { + "rotation": { + "0.0": { + "vector": [0, 0, 0] + }, + "1.0": { + "vector": [0, -180, 0] + }, + "2.0": { + "vector": [0, -357.5, 0] + } + } + }, + "bone4": { + "rotation": { + "0.0": { + "vector": [0, 0, 0] + }, + "1.0": { + "vector": [0, 180, 0] + }, + "2.0": { + "vector": [0, 360, 0] + } + } + }, + "bone5": { + "rotation": { + "0.0": { + "vector": [0, 0, 0] + }, + "1.0": { + "vector": [0, -180, 0] + }, + "2.0": { + "vector": [0, -357.5, 0] + } + } + }, + "chest": { + "scale": { + "0.0": { + "vector": [1, 1, 1] + }, + "1.0": { + "vector": [1.07, 1, 1] + }, + "2.0": { + "vector": [1, 1, 1] + } + } + } + } + }, + "attack": { + "loop": "hold_on_last_frame", + "animation_length": 0.5, + "bones": { + "1": { + "rotation": { + "0.0": { + "vector": [0, 0, 2.5] + }, + "0.25": { + "vector": [0, 0, -5] + }, + "0.5": { + "vector": [0, 0, 2.5] + } + } + }, + "2": { + "rotation": { + "0.0": { + "vector": [-9.99067, -0.43399, -2.46207] + }, + "0.25": { + "vector": [-9.96271, 0.86717, 4.92442] + }, + "0.5": { + "vector": [-9.99067, -0.43399, -2.46207] + } + } + }, + "3": { + "rotation": { + "0.0": { + "vector": [7.49294, -0.32621, 2.47864] + }, + "0.25": { + "vector": [7.43656, 0.9762, -7.43656] + }, + "0.5": { + "vector": [7.49294, -0.32621, 2.47864] + } + } + }, + "Torso": { + "rotation": { + "0.0": { + "vector": [0, 0, 0] + }, + "0.25": { + "vector": [0, -45, 0] + }, + "0.2917": { + "vector": [0, -2, 0] + }, + "0.5": { + "vector": [0, 0, 0] + } + }, + "position": { + "vector": [0, 0, 0] + }, + "scale": { + "vector": [1, 1, 1] + } + }, + "Lhand": { + "rotation": { + "vector": [7.5, 0, -10] + } + }, + "bone": { + "rotation": { + "vector": [-27.5, 0, 0] + } + }, + "Rhand": { + "rotation": { + "0.0": { + "vector": [-10, 0, 12.5] + }, + "0.2083": { + "vector": [-55.11756, -17.98449, 37.66083] + }, + "0.25": { + "vector": [-43.96521, 11.10344, 43.241] + }, + "0.2917": { + "vector": [-4.05266, -5.23211, 27.36235] + }, + "0.375": { + "vector": [-13.12996, 0.13083, 34.13127] + }, + "0.5": { + "vector": [-10, 0, 12.5] + } + } + }, + "bone2": { + "rotation": { + "0.0": { + "vector": [-12, -17.5, 0] + }, + "0.25": { + "vector": [-32, -17.5, 0] + }, + "0.2917": { + "vector": [10.20951, -5.54343, -1.04318] + }, + "0.5": { + "vector": [-12, -17.5, 0] + } + } + }, + "Tail": { + "rotation": { + "vector": [0, 0, 0] + } + }, + "bone3": { + "rotation": { + "0.0": { + "vector": [0, 0, 0] + }, + "0.25": { + "vector": [0, -180, 0] + }, + "0.5": { + "vector": [0, -357.5, 0] + } + } + }, + "bone4": { + "rotation": { + "0.0": { + "vector": [0, 0, 0] + }, + "0.25": { + "vector": [0, 180, 0] + }, + "0.5": { + "vector": [0, 360, 0] + } + } + }, + "bone5": { + "rotation": { + "0.0": { + "vector": [0, 0, 0] + }, + "0.25": { + "vector": [0, -180, 0] + }, + "0.5": { + "vector": [0, -357.5, 0] + } + } + }, + "chest": { + "scale": { + "vector": [1, 1, 1] + } + }, + "Head": { + "rotation": { + "0.0": { + "vector": [0, 0, 0] + }, + "0.25": { + "vector": [0, 45, 0] + }, + "0.2917": { + "vector": [0, 5.75, 0] + }, + "0.4167": { + "vector": [0, 0, 0] + } + } + } + } + }, + "walk": { + "loop": true, + "animation_length": 2, + "bones": { + "1": { + "rotation": { + "0.0": { + "vector": [0, 0, 2.5] + }, + "1.0": { + "vector": [0, 0, -5] + }, + "2.0": { + "vector": [0, 0, 2.5] + } + } + }, + "2": { + "rotation": { + "0.0": { + "vector": [-9.99067, -0.43399, -2.46207] + }, + "1.0": { + "vector": [-9.96271, 0.86717, 4.92442] + }, + "2.0": { + "vector": [-9.99067, -0.43399, -2.46207] + } + } + }, + "3": { + "rotation": { + "0.0": { + "vector": [7.49294, -0.32621, 2.47864] + }, + "1.0": { + "vector": [7.43656, 0.9762, -7.43656] + }, + "2.0": { + "vector": [7.49294, -0.32621, 2.47864] + } + } + }, + "Torso": { + "position": { + "0.0": { + "vector": [0, 0, 0] + }, + "1.0": { + "vector": [0, 0.5, 0] + }, + "2.0": { + "vector": [0, 0, 0] + } + }, + "scale": { + "vector": [1, 1, 1] + } + }, + "Lhand": { + "rotation": { + "0.0": { + "vector": [28.5, 0, -10] + }, + "1.0": { + "vector": [28.5, 0, -10] + }, + "2.0": { + "vector": [28.5, 0, -10] + } + } + }, + "bone": { + "rotation": { + "vector": [-27.5, 0, 0] + } + }, + "Rhand": { + "rotation": { + "0.0": { + "vector": [-44, 0, 12.5] + }, + "1.0": { + "vector": [-44, 0, 12.5] + }, + "2.0": { + "vector": [-44, 0, 12.5] + } + } + }, + "bone2": { + "rotation": { + "vector": [-26.69094, -36.01788, 4.80057] + }, + "position": { + "vector": [0, 0.5, -0.4] + } + }, + "Tail": { + "rotation": { + "vector": [0, 0, 0] + } + }, + "bone3": { + "rotation": { + "0.0": { + "vector": [0, 0, 0] + }, + "1.0": { + "vector": [0, -180, 0] + }, + "2.0": { + "vector": [0, -357.5, 0] + } + } + }, + "bone4": { + "rotation": { + "0.0": { + "vector": [0, 0, 0] + }, + "1.0": { + "vector": [0, 180, 0] + }, + "2.0": { + "vector": [0, 360, 0] + } + } + }, + "bone5": { + "rotation": { + "0.0": { + "vector": [0, 0, 0] + }, + "1.0": { + "vector": [0, -180, 0] + }, + "2.0": { + "vector": [0, -357.5, 0] + } + } + }, + "chest": { + "scale": { + "0.0": { + "vector": [1, 1, 1] + }, + "1.0": { + "vector": [1.07, 1, 1] + }, + "2.0": { + "vector": [1, 1, 1] + } + } + }, + "All": { + "rotation": { + "vector": [8, 0, 0] + } + } + } + } + }, + "geckolib_format_version": 2 +} \ No newline at end of file diff --git a/src/main/resources/assets/occultism/animations/entity/foliot_worker.animation.json b/src/main/resources/assets/occultism/animations/entity/foliot_worker.animation.json new file mode 100644 index 000000000..48908c5f4 --- /dev/null +++ b/src/main/resources/assets/occultism/animations/entity/foliot_worker.animation.json @@ -0,0 +1,245 @@ +{ + "format_version": "1.8.0", + "animations": { + "idle": { + "loop": true, + "animation_length": 2, + "bones": { + "Torso": { + "position": { + "0.0": { + "vector": [0, 0, 0] + }, + "1.0": { + "vector": [0, -0.1, 0] + }, + "2.0": { + "vector": [0, 0, 0] + } + } + }, + "RARM": { + "rotation": { + "0.0": { + "vector": [0, 0, 0] + }, + "1.0": { + "vector": [4, 0, 0] + }, + "2.0": { + "vector": [0, 0, 0] + } + } + }, + "LARM": { + "rotation": { + "0.0": { + "vector": [1, 0, 0] + }, + "1.0": { + "vector": [-2, 0, 0] + }, + "2.0": { + "vector": [1, 0, 0] + } + } + } + } + }, + "walk": { + "loop": true, + "animation_length": 2, + "bones": { + "Torso": { + "rotation": { + "0.0": { + "vector": [0, 0, -1] + }, + "0.5": { + "vector": [0, 0, 2] + }, + "1.0": { + "vector": [0, 0, -1] + }, + "1.5": { + "vector": [0, 0, 2] + }, + "2.0": { + "vector": [0, 0, -1] + } + }, + "position": { + "0.0": { + "vector": [0, 0, 0] + }, + "1.0": { + "vector": [0, -0.1, 0] + }, + "2.0": { + "vector": [0, 0, 0] + } + } + }, + "RARM": { + "rotation": { + "0.0": { + "vector": [31, 0, 0] + }, + "0.25": { + "vector": [-25.75, 0, 0] + }, + "0.5": { + "vector": [31, 0, 0] + }, + "0.75": { + "vector": [-25.75, 0, 0] + }, + "1.0": { + "vector": [31, 0, 0] + }, + "1.25": { + "vector": [-25.75, 0, 0] + }, + "1.5": { + "vector": [31, 0, 0] + }, + "1.75": { + "vector": [-25.75, 0, 0] + }, + "2.0": { + "vector": [31, 0, 0] + } + } + }, + "bone2": { + "rotation": { + "0.0": { + "vector": [27.5, 0, 0] + }, + "0.25": { + "vector": [-32.5, 0, 0] + }, + "0.5": { + "vector": [27.5, 0, 0] + }, + "0.75": { + "vector": [-32.5, 0, 0] + }, + "1.0": { + "vector": [27.5, 0, 0] + }, + "1.25": { + "vector": [-32.5, 0, 0] + }, + "1.5": { + "vector": [27.5, 0, 0] + }, + "1.75": { + "vector": [-32.5, 0, 0] + }, + "2.0": { + "vector": [27.5, 0, 0] + } + } + }, + "bone": { + "rotation": { + "0.0": { + "vector": [-26, 0, 0] + }, + "0.25": { + "vector": [31.5, 0, 0] + }, + "0.5": { + "vector": [-26, 0, 0] + }, + "0.75": { + "vector": [31.5, 0, 0] + }, + "1.0": { + "vector": [-26, 0, 0] + }, + "1.25": { + "vector": [31.5, 0, 0] + }, + "1.5": { + "vector": [-26, 0, 0] + }, + "1.75": { + "vector": [31.5, 0, 0] + }, + "2.0": { + "vector": [-26, 0, 0] + } + } + }, + "FAT": { + "scale": { + "0.0": { + "vector": [1, 1, 1] + }, + "0.25": { + "vector": [1.01, 1, 1] + }, + "0.5": { + "vector": [1, 1, 1] + }, + "0.75": { + "vector": [1.01, 1, 1] + }, + "1.0": { + "vector": [1, 1, 1] + }, + "1.25": { + "vector": [1.01, 1, 1] + }, + "1.5": { + "vector": [1, 1, 1] + }, + "1.75": { + "vector": [1.01, 1, 1] + }, + "2.0": { + "vector": [1, 1, 1] + } + } + }, + "LARM": { + "rotation": { + "0.0": { + "vector": [-22.5, 0, 0] + }, + "0.25": { + "vector": [27.5, 0, 0] + }, + "0.5": { + "vector": [-22.5, 0, 0] + }, + "0.75": { + "vector": [27.5, 0, 0] + }, + "1.0": { + "vector": [-22.5, 0, 0] + }, + "1.25": { + "vector": [27.5, 0, 0] + }, + "1.5": { + "vector": [-22.5, 0, 0] + }, + "1.75": { + "vector": [27.5, 0, 0] + }, + "2.0": { + "vector": [-22.5, 0, 0] + } + }, + "position": { + "vector": [0, 0, 0] + } + } + } + } + }, + "geckolib_format_version": 2 +} \ No newline at end of file diff --git a/src/main/resources/assets/occultism/animations/entity/marid.animation.json b/src/main/resources/assets/occultism/animations/entity/marid_worker.animation.json similarity index 100% rename from src/main/resources/assets/occultism/animations/entity/marid.animation.json rename to src/main/resources/assets/occultism/animations/entity/marid_worker.animation.json diff --git a/src/main/resources/assets/occultism/geo/entity/afrit.geo.json b/src/main/resources/assets/occultism/geo/entity/afrit.geo.json index 85e2a5f76..290e2d134 100644 --- a/src/main/resources/assets/occultism/geo/entity/afrit.geo.json +++ b/src/main/resources/assets/occultism/geo/entity/afrit.geo.json @@ -3,7 +3,7 @@ "minecraft:geometry": [ { "description": { - "identifier": "geometry.unknown", + "identifier": "geometry.afrit", "texture_width": 64, "texture_height": 64, "visible_bounds_width": 2, diff --git a/src/main/resources/assets/occultism/geo/entity/afrit_worker.geo.json b/src/main/resources/assets/occultism/geo/entity/afrit_worker.geo.json new file mode 100644 index 000000000..7bcb98cca --- /dev/null +++ b/src/main/resources/assets/occultism/geo/entity/afrit_worker.geo.json @@ -0,0 +1,133 @@ +{ + "format_version": "1.12.0", + "minecraft:geometry": [ + { + "description": { + "identifier": "geometry.afrit_worker", + "texture_width": 64, + "texture_height": 64, + "visible_bounds_width": 2, + "visible_bounds_height": 3.5, + "visible_bounds_offset": [0, 1.25, 0] + }, + "bones": [ + { + "name": "All", + "pivot": [0, 0, 0] + }, + { + "name": "Torso", + "parent": "All", + "pivot": [0, 22, 0] + }, + { + "name": "Head", + "parent": "Torso", + "pivot": [0, 0, 0], + "cubes": [ + {"origin": [-2.5, 32, -3], "size": [5, 4, 5], "uv": [32, 0]}, + {"origin": [-3.3, 35, -3.7], "size": [6.6, 3.4, 7.7], "pivot": [0, 38, 0], "rotation": [-15, 0, 0], "uv": [26, 9]} + ] + }, + { + "name": "Lhand", + "parent": "Torso", + "pivot": [5.5, 30, 0], + "cubes": [ + {"origin": [5, 23, -2], "size": [3, 8, 4], "uv": [46, 45]} + ] + }, + { + "name": "bone", + "parent": "Lhand", + "pivot": [6.5, 23.5, 0], + "cubes": [ + {"origin": [5.2, 17.5, -1.8], "size": [2.6, 6, 3.6], "uv": [50, 7]} + ] + }, + { + "name": "Rhand", + "parent": "Torso", + "pivot": [-5.5, 30, 0], + "cubes": [ + {"origin": [-8, 23, -2], "size": [3, 8, 4], "uv": [0, 40]} + ] + }, + { + "name": "bone2", + "parent": "Rhand", + "pivot": [-6.5, 23, 0], + "cubes": [ + {"origin": [-7.8, 17.3, -1.8], "size": [2.6, 5.7, 4], "uv": [49, 16]}, + {"origin": [-6.9, 18, -4], "size": [1.1, 1.4, 5], "uv": [46, 31]}, + {"origin": [-7.3, 17.3, -4.2], "size": [2, 2.9, 0.9], "uv": [0, 22]}, + {"origin": [-6.4, 17.7, -13.9], "size": [0.4, 2, 9.9], "pivot": [-6, 19, 0], "rotation": [4, 0, 0], "uv": [26, 10]}, + {"origin": [-6.3, 17.02341, -16.8341], "size": [0.2, 2.1, 4], "pivot": [-6, 19, -14], "rotation": [-23.5, 0, 0], "uv": [24, 0]} + ] + }, + { + "name": "chest", + "parent": "Torso", + "pivot": [0, 4, 0], + "cubes": [ + {"origin": [-5, 26, -3], "size": [10, 6, 6], "uv": [0, 16]}, + {"origin": [-3, 20, -2.3], "size": [6, 8, 4.7], "uv": [0, 28]} + ] + }, + { + "name": "Tail", + "parent": "All", + "pivot": [0, 0, 0] + }, + { + "name": "1", + "parent": "Tail", + "pivot": [0, 19, 0], + "cubes": [ + {"origin": [-2.6, 15.1, -1.9], "size": [5.3, 8, 4.5], "uv": [16, 36]} + ] + }, + { + "name": "bone3", + "parent": "1", + "pivot": [0, 19, 0], + "cubes": [ + {"origin": [-4.3, 14.9, -4.3], "size": [8.6, 8.2, 8.3], "uv": [0, 0]} + ] + }, + { + "name": "2", + "parent": "Tail", + "pivot": [0, 12, 0], + "cubes": [ + {"origin": [-2, 9, -1.6], "size": [4, 7, 3.6], "uv": [14, 48]} + ] + }, + { + "name": "bone4", + "parent": "2", + "pivot": [0, 12, 0], + "cubes": [ + {"origin": [-3, 8, -3], "size": [6, 8, 5.9], "uv": [27, 23]} + ] + }, + { + "name": "3", + "parent": "Tail", + "pivot": [0, 4, 0], + "cubes": [ + {"origin": [-1, 4, -1], "size": [2, 5, 2], "uv": [0, 0]} + ] + }, + { + "name": "bone5", + "parent": "3", + "pivot": [0, 5, 0], + "cubes": [ + {"origin": [-2, -0.3, -2], "size": [4, 9, 4], "uv": [34, 36]} + ] + } + ] + } + ] +} \ No newline at end of file diff --git a/src/main/resources/assets/occultism/geo/entity/foliot_worker.geo.json b/src/main/resources/assets/occultism/geo/entity/foliot_worker.geo.json new file mode 100644 index 000000000..f3b76c050 --- /dev/null +++ b/src/main/resources/assets/occultism/geo/entity/foliot_worker.geo.json @@ -0,0 +1,95 @@ +{ + "format_version": "1.12.0", + "minecraft:geometry": [ + { + "description": { + "identifier": "geometry.foliot_worker", + "texture_width": 32, + "texture_height": 32, + "visible_bounds_width": 2, + "visible_bounds_height": 2.5, + "visible_bounds_offset": [0, 0.75, 0] + }, + "bones": [ + { + "name": "All", + "pivot": [0, 0, 0] + }, + { + "name": "bone2", + "parent": "All", + "pivot": [-1.6, 4, 0], + "cubes": [ + {"origin": [-2.9, 1.2, -1], "size": [2.6, 3.1, 2], "uv": [0, 24]}, + {"origin": [-3, 0, -2.3], "size": [2.9, 2, 3.5], "uv": [16, 21]} + ] + }, + { + "name": "bone", + "parent": "All", + "pivot": [1.3, 3.9, 0], + "cubes": [ + {"origin": [0.3, 1.2, -1], "size": [2.6, 3.1, 2], "uv": [23, 10]}, + {"origin": [0.1, 0, -2.3], "size": [2.9, 2, 3.5], "uv": [18, 0]} + ] + }, + { + "name": "Torso", + "parent": "All", + "pivot": [0, 6, 0] + }, + { + "name": "FAT", + "parent": "Torso", + "pivot": [0, 0, 0], + "cubes": [ + {"origin": [-3, 4, -3], "size": [6, 6, 6], "uv": [0, 0]} + ] + }, + { + "name": "Head", + "parent": "Torso", + "pivot": [0, 11.4, -2], + "cubes": [ + {"origin": [-2, 9, -2], "size": [4, 4, 4], "uv": [11, 13]}, + { + "origin": [-1.5, 12, -1.5], + "size": [0.8, 2, 0.8], + "pivot": [-1, 13, -1.1], + "rotation": [16.93839, -4.46375, 14.33501], + "uv": { + "north": {"uv": [0, 0], "uv_size": [0, 2]}, + "east": {"uv": [0, 0], "uv_size": [0, 2]}, + "south": {"uv": [0, 0], "uv_size": [0, 2]}, + "west": {"uv": [0, 0], "uv_size": [0, 2]}, + "up": {"uv": [0, 0], "uv_size": [0, 0]}, + "down": {"uv": [0, 0], "uv_size": [0, 0]} + } + }, + {"origin": [0.7, 12, -1.5], "size": [0.8, 2, 0.8], "pivot": [1, 13, -1.1], "rotation": [16.93839, 4.46375, -14.33501], "uv": [0, 0]}, + {"origin": [-0.4, 11.3, -2.8], "size": [0.9, 0.6, 1.5], "pivot": [0, 11.4, -2], "rotation": [32.5, 0, 0], "uv": [1, 1]}, + {"origin": [1.6, 11.4, -0.5], "size": [0.4, 2, 1.5], "pivot": [2, 11.7, 0], "rotation": [-23.01667, 16.64946, 8.06026], "uv": [1, 1]}, + {"origin": [-2, 11.4, -0.5], "size": [0.4, 2, 1.5], "pivot": [-2, 11.7, 0], "rotation": [-23.01667, -16.64946, -8.06026], "uv": [1, 1], "mirror": true} + ] + }, + { + "name": "LARM", + "parent": "Torso", + "pivot": [-5, 8.3, -0.3], + "rotation": [-28, 0, 0], + "cubes": [ + {"origin": [-5, 4.08168, -1.07023], "size": [2, 5, 2], "pivot": [-3.5, 8.28168, -0.07023], "rotation": [28.30479, -7.48388, -4.25406], "uv": [8, 21]} + ] + }, + { + "name": "RARM", + "parent": "Torso", + "pivot": [3, 8, 0], + "cubes": [ + {"origin": [3, 4, -1], "size": [2, 5, 2], "uv": [0, 17]} + ] + } + ] + } + ] +} \ No newline at end of file diff --git a/src/main/resources/assets/occultism/geo/entity/marid.geo.json b/src/main/resources/assets/occultism/geo/entity/marid_worker.geo.json similarity index 99% rename from src/main/resources/assets/occultism/geo/entity/marid.geo.json rename to src/main/resources/assets/occultism/geo/entity/marid_worker.geo.json index 7e923c313..b7d70f355 100644 --- a/src/main/resources/assets/occultism/geo/entity/marid.geo.json +++ b/src/main/resources/assets/occultism/geo/entity/marid_worker.geo.json @@ -3,7 +3,7 @@ "minecraft:geometry": [ { "description": { - "identifier": "geometry.marid", + "identifier": "geometry.marid_worker", "texture_width": 64, "texture_height": 64, "visible_bounds_width": 5, diff --git a/src/main/resources/assets/occultism/textures/entity/afrit_worker.png b/src/main/resources/assets/occultism/textures/entity/afrit_worker.png new file mode 100644 index 000000000..aa3f071e1 Binary files /dev/null and b/src/main/resources/assets/occultism/textures/entity/afrit_worker.png differ diff --git a/src/main/resources/assets/occultism/textures/entity/afrit_worker_glowmask.png b/src/main/resources/assets/occultism/textures/entity/afrit_worker_glowmask.png new file mode 100644 index 000000000..bcb7eaa1b Binary files /dev/null and b/src/main/resources/assets/occultism/textures/entity/afrit_worker_glowmask.png differ diff --git a/src/main/resources/assets/occultism/textures/entity/foliot_worker.png b/src/main/resources/assets/occultism/textures/entity/foliot_worker.png new file mode 100644 index 000000000..d25e8c76b Binary files /dev/null and b/src/main/resources/assets/occultism/textures/entity/foliot_worker.png differ diff --git a/src/main/resources/assets/occultism/textures/entity/marid_worker.png b/src/main/resources/assets/occultism/textures/entity/marid_worker.png new file mode 100644 index 000000000..e1132c23e Binary files /dev/null and b/src/main/resources/assets/occultism/textures/entity/marid_worker.png differ