From a68c3d6b4d75fc33942976dc7bd7d46fc085f9b1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?igl=C3=A9e42?= Date: Tue, 10 Sep 2024 17:23:06 +0200 Subject: [PATCH 1/4] Crate Loots & Guardian Drops - Crates can be found in suspicious sand, shipwreck and ocean ruins - Crates can be dropped by elder guardian - Guardian can drop parts - Crowbar chance was double (0.1 => 0.2) --- .../9419a4a367f91ae64b7a192c54b5d646e8c9a939 | 7 + .../resources/data/minecraft/recipe/air.json | 7 + .../elder_guardian_modifier.json | 22 +++ .../loot_modifiers/guardian_modifier.json | 14 ++ .../loot_modifiers/ocean_ruins_modifier.json | 31 +++++ .../loot_modifiers/shipwreck_modifier.json | 22 +++ .../suspicious_ruins_sand_modifier.json | 22 +++ .../loot_modifiers/global_loot_modifiers.json | 10 ++ .../com/portingdeadmods/modjam/ModJam.java | 1 + .../modjam/content/blocks/CrateBlock.java | 2 +- .../modjam/datagen/DataGatherer.java | 1 + .../modjam/datagen/LootModifierProvider.java | 58 ++++++++ .../modjam/loot/AddItemModifier.java | 49 +++++++ .../modjam/registries/MJLootModifier.java | 15 +++ .../modjam/registries/MJLootTables.java | 32 +++++ .../data/modjam/loot_table/chests/crate.json | 125 ++++++++++++++++++ .../modjam/loot_table/entities/guardian.json | 35 +++++ 17 files changed, 452 insertions(+), 1 deletion(-) create mode 100644 src/generated/resources/.cache/9419a4a367f91ae64b7a192c54b5d646e8c9a939 create mode 100644 src/generated/resources/data/minecraft/recipe/air.json create mode 100644 src/generated/resources/data/modjam/loot_modifiers/elder_guardian_modifier.json create mode 100644 src/generated/resources/data/modjam/loot_modifiers/guardian_modifier.json create mode 100644 src/generated/resources/data/modjam/loot_modifiers/ocean_ruins_modifier.json create mode 100644 src/generated/resources/data/modjam/loot_modifiers/shipwreck_modifier.json create mode 100644 src/generated/resources/data/modjam/loot_modifiers/suspicious_ruins_sand_modifier.json create mode 100644 src/generated/resources/data/neoforge/loot_modifiers/global_loot_modifiers.json create mode 100644 src/main/java/com/portingdeadmods/modjam/datagen/LootModifierProvider.java create mode 100644 src/main/java/com/portingdeadmods/modjam/loot/AddItemModifier.java create mode 100644 src/main/java/com/portingdeadmods/modjam/registries/MJLootModifier.java create mode 100644 src/main/java/com/portingdeadmods/modjam/registries/MJLootTables.java create mode 100644 src/main/resources/data/modjam/loot_table/chests/crate.json create mode 100644 src/main/resources/data/modjam/loot_table/entities/guardian.json diff --git a/src/generated/resources/.cache/9419a4a367f91ae64b7a192c54b5d646e8c9a939 b/src/generated/resources/.cache/9419a4a367f91ae64b7a192c54b5d646e8c9a939 new file mode 100644 index 00000000..74bf8fde --- /dev/null +++ b/src/generated/resources/.cache/9419a4a367f91ae64b7a192c54b5d646e8c9a939 @@ -0,0 +1,7 @@ +// 1.21.1 2024-09-09T22:07:45.6292483 Global Loot Modifiers : modjam +e7f11a46f5a3672b7ccab65e075c363596d0bf4b data/modjam/loot_modifiers/elder_guardian_modifier.json +153470fec00d9665888f06038bdd96b8249cae90 data/modjam/loot_modifiers/guardian_modifier.json +4c83e5f61706ea5181128230627d9cfff7e3c15b data/modjam/loot_modifiers/ocean_ruins_modifier.json +c011af8fc50a517e0473e9113f9a2672c854d882 data/modjam/loot_modifiers/shipwreck_modifier.json +655a48f63f1b41627dd1fc25c31ad537eb8da0ca data/modjam/loot_modifiers/suspicious_ruins_sand_modifier.json +15f14af3dcb92ee9a8901ef211bd4feb415420bf data/neoforge/loot_modifiers/global_loot_modifiers.json diff --git a/src/generated/resources/data/minecraft/recipe/air.json b/src/generated/resources/data/minecraft/recipe/air.json new file mode 100644 index 00000000..37d5fd6a --- /dev/null +++ b/src/generated/resources/data/minecraft/recipe/air.json @@ -0,0 +1,7 @@ +{ + "type": "modjam:aquatic_catalyst_channeling", + "ingredient": { + "item": "minecraft:kelp" + }, + "power_amount": 100 +} \ No newline at end of file diff --git a/src/generated/resources/data/modjam/loot_modifiers/elder_guardian_modifier.json b/src/generated/resources/data/modjam/loot_modifiers/elder_guardian_modifier.json new file mode 100644 index 00000000..997eed98 --- /dev/null +++ b/src/generated/resources/data/modjam/loot_modifiers/elder_guardian_modifier.json @@ -0,0 +1,22 @@ +{ + "type": "modjam:add_item", + "conditions": [ + { + "condition": "neoforge:loot_table_id", + "loot_table_id": "minecraft:entities/elder_guardian" + }, + { + "chance": 1.0, + "condition": "minecraft:random_chance" + } + ], + "item": { + "components": { + "minecraft:container_loot": { + "loot_table": "modjam:chests/crate" + } + }, + "count": 1, + "id": "modjam:crate" + } +} \ No newline at end of file diff --git a/src/generated/resources/data/modjam/loot_modifiers/guardian_modifier.json b/src/generated/resources/data/modjam/loot_modifiers/guardian_modifier.json new file mode 100644 index 00000000..3d66a2a1 --- /dev/null +++ b/src/generated/resources/data/modjam/loot_modifiers/guardian_modifier.json @@ -0,0 +1,14 @@ +{ + "type": "neoforge:add_table", + "conditions": [ + { + "condition": "neoforge:loot_table_id", + "loot_table_id": "minecraft:entities/guardian" + }, + { + "chance": 0.20, + "condition": "minecraft:random_chance" + } + ], + "table": "modjam:entities/guardian" +} \ No newline at end of file diff --git a/src/generated/resources/data/modjam/loot_modifiers/ocean_ruins_modifier.json b/src/generated/resources/data/modjam/loot_modifiers/ocean_ruins_modifier.json new file mode 100644 index 00000000..b119aaad --- /dev/null +++ b/src/generated/resources/data/modjam/loot_modifiers/ocean_ruins_modifier.json @@ -0,0 +1,31 @@ +{ + "type": "modjam:add_item", + "conditions": [ + { + "condition": "minecraft:any_of", + "terms": [ + { + "condition": "neoforge:loot_table_id", + "loot_table_id": "minecraft:chests/underwater_ruin_big" + }, + { + "condition": "neoforge:loot_table_id", + "loot_table_id": "minecraft:chests/underwater_ruin_small" + } + ] + }, + { + "chance": 0.33, + "condition": "minecraft:random_chance" + } + ], + "item": { + "components": { + "minecraft:container_loot": { + "loot_table": "modjam:chests/crate" + } + }, + "count": 1, + "id": "modjam:crate" + } +} \ No newline at end of file diff --git a/src/generated/resources/data/modjam/loot_modifiers/shipwreck_modifier.json b/src/generated/resources/data/modjam/loot_modifiers/shipwreck_modifier.json new file mode 100644 index 00000000..e393d126 --- /dev/null +++ b/src/generated/resources/data/modjam/loot_modifiers/shipwreck_modifier.json @@ -0,0 +1,22 @@ +{ + "type": "modjam:add_item", + "conditions": [ + { + "condition": "neoforge:loot_table_id", + "loot_table_id": "minecraft:chests/shipwreck_treasure" + }, + { + "chance": 0.33, + "condition": "minecraft:random_chance" + } + ], + "item": { + "components": { + "minecraft:container_loot": { + "loot_table": "modjam:chests/crate" + } + }, + "count": 1, + "id": "modjam:crate" + } +} \ No newline at end of file diff --git a/src/generated/resources/data/modjam/loot_modifiers/suspicious_ruins_sand_modifier.json b/src/generated/resources/data/modjam/loot_modifiers/suspicious_ruins_sand_modifier.json new file mode 100644 index 00000000..0b06af42 --- /dev/null +++ b/src/generated/resources/data/modjam/loot_modifiers/suspicious_ruins_sand_modifier.json @@ -0,0 +1,22 @@ +{ + "type": "modjam:add_item", + "conditions": [ + { + "condition": "neoforge:loot_table_id", + "loot_table_id": "minecraft:archaeology/ocean_ruin_warm" + }, + { + "chance": 0.05, + "condition": "minecraft:random_chance" + } + ], + "item": { + "components": { + "minecraft:container_loot": { + "loot_table": "modjam:chests/crate" + } + }, + "count": 1, + "id": "modjam:crate" + } +} \ No newline at end of file diff --git a/src/generated/resources/data/neoforge/loot_modifiers/global_loot_modifiers.json b/src/generated/resources/data/neoforge/loot_modifiers/global_loot_modifiers.json new file mode 100644 index 00000000..ba44dcaf --- /dev/null +++ b/src/generated/resources/data/neoforge/loot_modifiers/global_loot_modifiers.json @@ -0,0 +1,10 @@ +{ + "entries": [ + "modjam:ocean_ruins_modifier", + "modjam:guardian_modifier", + "modjam:elder_guardian_modifier", + "modjam:suspicious_ruins_sand_modifier", + "modjam:shipwreck_modifier" + ], + "replace": false +} \ No newline at end of file diff --git a/src/main/java/com/portingdeadmods/modjam/ModJam.java b/src/main/java/com/portingdeadmods/modjam/ModJam.java index 77a6e915..58be3e31 100644 --- a/src/main/java/com/portingdeadmods/modjam/ModJam.java +++ b/src/main/java/com/portingdeadmods/modjam/ModJam.java @@ -39,6 +39,7 @@ public ModJam(IEventBus modEventBus, ModContainer modContainer) { MJMultiblocks.MULTIBLOCKS.register(modEventBus); MJAugments.AUGMENTS.register(modEventBus); MJMenuTypes.MENUS.register(modEventBus); + MJLootModifier.LOOT_MODIFIERS.register(modEventBus); modEventBus.addListener(PrismMonocleItem::registerCapabilities); diff --git a/src/main/java/com/portingdeadmods/modjam/content/blocks/CrateBlock.java b/src/main/java/com/portingdeadmods/modjam/content/blocks/CrateBlock.java index ce6ec895..86d37be0 100644 --- a/src/main/java/com/portingdeadmods/modjam/content/blocks/CrateBlock.java +++ b/src/main/java/com/portingdeadmods/modjam/content/blocks/CrateBlock.java @@ -73,7 +73,7 @@ protected MapCodec codec() { if (stack.isEmpty()) return ItemInteractionResult.PASS_TO_DEFAULT_BLOCK_INTERACTION; if (!stack.is(MJItems.CROWBAR)) return ItemInteractionResult.PASS_TO_DEFAULT_BLOCK_INTERACTION; if (player.getCooldowns().isOnCooldown(stack.getItem())) return ItemInteractionResult.FAIL; - if (Math.random() > 0.1){ + if (Math.random() > 0.2){ be.playSound(state,SoundEvents.ANVIL_HIT); player.getCooldowns().addCooldown(stack.getItem(),10); return ItemInteractionResult.FAIL; diff --git a/src/main/java/com/portingdeadmods/modjam/datagen/DataGatherer.java b/src/main/java/com/portingdeadmods/modjam/datagen/DataGatherer.java index 41a468a5..5df33034 100644 --- a/src/main/java/com/portingdeadmods/modjam/datagen/DataGatherer.java +++ b/src/main/java/com/portingdeadmods/modjam/datagen/DataGatherer.java @@ -35,5 +35,6 @@ public static void onGatherData(GatherDataEvent event) { BlockTagProvider blockTagProvider = new BlockTagProvider(output, lookupProvider, existingFileHelper); generator.addProvider(event.includeClient(), blockTagProvider); generator.addProvider(event.includeClient(), new ItemTagProvider(output, lookupProvider, blockTagProvider.contentsGetter())); + generator.addProvider(event.includeServer(),new LootModifierProvider(output,lookupProvider)); } } \ No newline at end of file diff --git a/src/main/java/com/portingdeadmods/modjam/datagen/LootModifierProvider.java b/src/main/java/com/portingdeadmods/modjam/datagen/LootModifierProvider.java new file mode 100644 index 00000000..445d5b46 --- /dev/null +++ b/src/main/java/com/portingdeadmods/modjam/datagen/LootModifierProvider.java @@ -0,0 +1,58 @@ +package com.portingdeadmods.modjam.datagen; + +import com.portingdeadmods.modjam.ModJam; +import com.portingdeadmods.modjam.loot.AddItemModifier; +import com.portingdeadmods.modjam.registries.MJBlocks; +import com.portingdeadmods.modjam.registries.MJLootTables; +import net.minecraft.core.HolderLookup; +import net.minecraft.core.component.DataComponents; +import net.minecraft.data.PackOutput; +import net.minecraft.resources.ResourceLocation; +import net.minecraft.world.item.ItemStack; +import net.minecraft.world.item.component.SeededContainerLoot; +import net.minecraft.world.level.storage.loot.predicates.LootItemCondition; +import net.minecraft.world.level.storage.loot.predicates.LootItemRandomChanceCondition; +import net.neoforged.neoforge.common.data.GlobalLootModifierProvider; +import net.neoforged.neoforge.common.loot.AddTableLootModifier; +import net.neoforged.neoforge.common.loot.LootTableIdCondition; + +import java.util.Random; +import java.util.concurrent.CompletableFuture; + +public class LootModifierProvider extends GlobalLootModifierProvider { + public LootModifierProvider(PackOutput output, CompletableFuture registries) { + super(output, registries, ModJam.MODID); + } + + @Override + protected void start() { + ItemStack crate = MJBlocks.CRATE.toStack(); + crate.set(DataComponents.CONTAINER_LOOT,new SeededContainerLoot(MJLootTables.CRATE,0)); + add("elder_guardian_modifier", + new AddItemModifier(new LootItemCondition[]{ + LootTableIdCondition.builder(ResourceLocation.parse("entities/elder_guardian")).build(), + LootItemRandomChanceCondition.randomChance(1.0f).build()} + ,crate)); + add("guardian_modifier", + new AddTableLootModifier(new LootItemCondition[]{ + LootTableIdCondition.builder(ResourceLocation.parse("entities/guardian")).build(), + LootItemRandomChanceCondition.randomChance(0.20f).build()} + ,MJLootTables.GUARDIAN)); + add("shipwreck_modifier", + new AddItemModifier(new LootItemCondition[]{ + LootTableIdCondition.builder(ResourceLocation.parse("chests/shipwreck_treasure")).build(), + LootItemRandomChanceCondition.randomChance(0.33f).build()} + ,crate)); + add("ocean_ruins_modifier", + new AddItemModifier(new LootItemCondition[]{ + LootTableIdCondition.builder(ResourceLocation.parse("chests/underwater_ruin_big")).or(LootTableIdCondition.builder(ResourceLocation.parse("chests/underwater_ruin_small"))).build(), + LootItemRandomChanceCondition.randomChance(0.33f).build()} + ,crate)); + add("suspicious_ruins_sand_modifier", + new AddItemModifier(new LootItemCondition[]{ + LootTableIdCondition.builder(ResourceLocation.parse("archaeology/ocean_ruin_warm")).build(), + LootItemRandomChanceCondition.randomChance(0.05f).build()} + ,crate)); + + } +} diff --git a/src/main/java/com/portingdeadmods/modjam/loot/AddItemModifier.java b/src/main/java/com/portingdeadmods/modjam/loot/AddItemModifier.java new file mode 100644 index 00000000..84fe6db1 --- /dev/null +++ b/src/main/java/com/portingdeadmods/modjam/loot/AddItemModifier.java @@ -0,0 +1,49 @@ +package com.portingdeadmods.modjam.loot; + +import com.google.common.base.Suppliers; +import com.mojang.serialization.MapCodec; +import com.mojang.serialization.codecs.RecordCodecBuilder; +import it.unimi.dsi.fastutil.objects.ObjectArrayList; +import net.minecraft.core.registries.BuiltInRegistries; +import net.minecraft.world.item.Item; +import net.minecraft.world.item.ItemStack; +import net.minecraft.world.level.storage.loot.LootContext; +import net.minecraft.world.level.storage.loot.predicates.LootItemCondition; +import net.neoforged.neoforge.common.loot.IGlobalLootModifier; +import net.neoforged.neoforge.common.loot.LootModifier; +import org.jetbrains.annotations.NotNull; + +import java.util.function.Supplier; + +public class AddItemModifier extends LootModifier { + + public static Supplier> CODEC_SUPPLIER = Suppliers.memoize(() -> RecordCodecBuilder + .mapCodec(instance -> AddItemModifier.codecStart(instance) + .and(ItemStack.CODEC.fieldOf("item") + .forGetter(addItemModifierInstance -> addItemModifierInstance.item)) + .apply(instance, AddItemModifier::new))); + + private final ItemStack item; + + public AddItemModifier(LootItemCondition[] conditionsIn, ItemStack item) { + super(conditionsIn); + this.item = item; + } + + @Override + protected @NotNull ObjectArrayList doApply(ObjectArrayList generatedLoot, LootContext context) { + for (LootItemCondition condition : this.conditions) { + if (!condition.test(context)) { + return generatedLoot; + } + } + + generatedLoot.add(item); + return generatedLoot; + } + + @Override + public MapCodec codec() { + return CODEC_SUPPLIER.get(); + } +} \ No newline at end of file diff --git a/src/main/java/com/portingdeadmods/modjam/registries/MJLootModifier.java b/src/main/java/com/portingdeadmods/modjam/registries/MJLootModifier.java new file mode 100644 index 00000000..b235748c --- /dev/null +++ b/src/main/java/com/portingdeadmods/modjam/registries/MJLootModifier.java @@ -0,0 +1,15 @@ +package com.portingdeadmods.modjam.registries; + +import com.mojang.serialization.MapCodec; +import com.portingdeadmods.modjam.ModJam; +import com.portingdeadmods.modjam.loot.AddItemModifier; +import net.neoforged.neoforge.common.loot.IGlobalLootModifier; +import net.neoforged.neoforge.registries.DeferredHolder; +import net.neoforged.neoforge.registries.DeferredRegister; +import net.neoforged.neoforge.registries.NeoForgeRegistries; + +public class MJLootModifier { + public static DeferredRegister> LOOT_MODIFIERS = DeferredRegister.create(NeoForgeRegistries.GLOBAL_LOOT_MODIFIER_SERIALIZERS, ModJam.MODID); + + public static final DeferredHolder, MapCodec> ADD_ITEM_MODIFIER = LOOT_MODIFIERS.register("add_item", AddItemModifier.CODEC_SUPPLIER); +} \ No newline at end of file diff --git a/src/main/java/com/portingdeadmods/modjam/registries/MJLootTables.java b/src/main/java/com/portingdeadmods/modjam/registries/MJLootTables.java new file mode 100644 index 00000000..42546e5c --- /dev/null +++ b/src/main/java/com/portingdeadmods/modjam/registries/MJLootTables.java @@ -0,0 +1,32 @@ +package com.portingdeadmods.modjam.registries; + +import com.portingdeadmods.modjam.ModJam; +import net.minecraft.core.registries.Registries; +import net.minecraft.resources.ResourceKey; +import net.minecraft.resources.ResourceLocation; +import net.minecraft.world.level.storage.loot.LootTable; + +import java.util.Collections; +import java.util.HashSet; +import java.util.Set; + +public class MJLootTables { + + private static final Set> LOCATIONS = new HashSet<>(); + private static final Set> IMMUTABLE_LOCATIONS = Collections.unmodifiableSet(LOCATIONS); + + public static final ResourceKey CRATE = register("chests/crate"); + public static final ResourceKey GUARDIAN = register("entities/guardian"); + + private static ResourceKey register(String name) { + return register(ResourceKey.create(Registries.LOOT_TABLE, ResourceLocation.fromNamespaceAndPath(ModJam.MODID,name))); + } + + private static ResourceKey register(ResourceKey name) { + if (LOCATIONS.add(name)) { + return name; + } else { + throw new IllegalArgumentException(name.location() + " is already a registered built-in loot table"); + } + } +} diff --git a/src/main/resources/data/modjam/loot_table/chests/crate.json b/src/main/resources/data/modjam/loot_table/chests/crate.json new file mode 100644 index 00000000..3d1e7b5f --- /dev/null +++ b/src/main/resources/data/modjam/loot_table/chests/crate.json @@ -0,0 +1,125 @@ +{ + "type": "minecraft:chest", + "pools": [ + { + "rolls": { + "min": 2, + "max": 5 + }, + "entries": [ + { + "type": "minecraft:item", + "name": "minecraft:gold_nugget", + "weight": 5, + "functions": [ + { + "function": "minecraft:set_count", + "count": { + "min": 2, + "max": 5 + } + } + ] + }, + { + "type": "minecraft:item", + "name": "minecraft:prismarine_shard", + "weight": 5, + "functions": [ + { + "function": "minecraft:set_count", + "count": { + "min": 1, + "max": 3 + } + } + ] + }, + { + "type": "minecraft:item", + "name": "minecraft:prismarine_crystals", + "weight": 5, + "functions": [ + { + "function": "minecraft:set_count", + "count": { + "min": 1, + "max": 3 + } + } + ] + }, + { + "type": "minecraft:item", + "name": "minecraft:iron_ingot", + "weight": 8, + "functions": [ + { + "function": "minecraft:set_count", + "count": { + "min": 1, + "max": 5 + } + } + ] + }, + { + "type": "minecraft:item", + "name": "modjam:aquarine_steel_ingot", + "weight": 2, + "functions": [ + { + "function": "minecraft:set_count", + "count": { + "min": 1, + "max": 3 + } + } + ] + }, + { + "type": "minecraft:item", + "name": "modjam:rusty_gear", + "weight": 4, + "functions": [ + { + "function": "minecraft:set_count", + "count": { + "min": 1, + "max": 2 + } + } + ] + }, + { + "type": "minecraft:item", + "name": "modjam:ancient_valve", + "weight": 4, + "functions": [ + { + "function": "minecraft:set_count", + "count": { + "min": 0, + "max": 1 + } + } + ] + }, + { + "type": "minecraft:item", + "name": "modjam:atlantic_gold_nugget", + "weight": 1, + "functions": [ + { + "function": "minecraft:set_count", + "count": { + "min": 1, + "max": 2 + } + } + ] + } + ] + } + ] +} diff --git a/src/main/resources/data/modjam/loot_table/entities/guardian.json b/src/main/resources/data/modjam/loot_table/entities/guardian.json new file mode 100644 index 00000000..1b2fad24 --- /dev/null +++ b/src/main/resources/data/modjam/loot_table/entities/guardian.json @@ -0,0 +1,35 @@ +{ + "type": "minecraft:entity", + "pools": [ + { + "rolls": 1, + "entries": [ + { + "type": "minecraft:item", + "name": "modjam:rusty_gear", + "functions": [ + { + "function": "minecraft:set_count", + "count": { + "min": 1, + "max": 3 + } + } + ], + "weight": 5 + }, + { + "type": "minecraft:item", + "name": "modjam:ancient_valve", + "functions": [ + { + "function": "minecraft:set_count", + "count": 1 + } + ], + "weight": 3 + } + ] + } + ] +} From bb057074720d0786bcb80deab5932e4a2f739782 Mon Sep 17 00:00:00 2001 From: thepigcat Date: Tue, 10 Sep 2024 12:09:02 +0200 Subject: [PATCH 2/4] more item textures --- .../5db5b310cf1abc4c7f33d2d565e2a2290a7f6c4d | 5 ++- .../models/item/etching_acid_bucket.json | 6 +++ .../jei/ItemTransformationRecipeCategory.java | 3 +- .../modjam/compat/jei/MJJeiPlugin.java | 12 +++++- .../modjam/events/MJClientEvents.java | 37 ++++++++++++++++-- .../textures/item/salt_water_bucket.png | Bin 0 -> 302 bytes 6 files changed, 55 insertions(+), 8 deletions(-) create mode 100644 src/generated/resources/assets/modjam/models/item/etching_acid_bucket.json create mode 100644 src/main/resources/assets/modjam/textures/item/salt_water_bucket.png diff --git a/src/generated/resources/.cache/5db5b310cf1abc4c7f33d2d565e2a2290a7f6c4d b/src/generated/resources/.cache/5db5b310cf1abc4c7f33d2d565e2a2290a7f6c4d index 2906f839..47f268b1 100644 --- a/src/generated/resources/.cache/5db5b310cf1abc4c7f33d2d565e2a2290a7f6c4d +++ b/src/generated/resources/.cache/5db5b310cf1abc4c7f33d2d565e2a2290a7f6c4d @@ -1,4 +1,4 @@ -// 1.21.1 2024-09-09T23:00:30.152337473 Item Models: modjam +// 1.21.1 2024-09-10T17:19:46.7624416 Item Models: modjam 51765874ad3111adf69684269ad9a422bfbaac4a assets/modjam/models/item/aquarine_steel_block.json e674d6859446f65b4ee805ed6e9f47d6cde82515 assets/modjam/models/item/aquarine_steel_ingot.json 098a336dd0b210f2b650174de2346a665b921edd assets/modjam/models/item/aquarine_steel_wrench.json @@ -13,8 +13,9 @@ a6585e714ae7922fe5d8319e566b7acc247e2cd1 assets/modjam/models/item/crowbar.json 2da9933c199f962b0af10b748a5bdea42b815a14 assets/modjam/models/item/drowned_lungs.json 945ba48b672ffdee7c76e0939012a2b60ce471a6 assets/modjam/models/item/eas_bucket.json 5b6b9e8621c065cb4167e4b6dfdfaecb0fd7186d assets/modjam/models/item/eas_vial.json +c78201ce0b7023d1bd6173df7f9263b243caaeb6 assets/modjam/models/item/etching_acid_bucket.json 054c0dfda629903fcf6880f0db40241af562a1a8 assets/modjam/models/item/gear.json f0f9891cd57b3a66f7440a71b925348bb8ea745b assets/modjam/models/item/glass_vial.json -dab337d602d93b0a4930b69e652b1155300c6502 assets/modjam/models/item/prism_monocle.json 0466424a99d558f8beb3c9944a82a36cabf4a2aa assets/modjam/models/item/prismarine_laser_relay.json +dab337d602d93b0a4930b69e652b1155300c6502 assets/modjam/models/item/prism_monocle.json 3a80dac2ed65f9c211115988d17e81af34d02e3d assets/modjam/models/item/rusty_gear.json diff --git a/src/generated/resources/assets/modjam/models/item/etching_acid_bucket.json b/src/generated/resources/assets/modjam/models/item/etching_acid_bucket.json new file mode 100644 index 00000000..9c0b83ae --- /dev/null +++ b/src/generated/resources/assets/modjam/models/item/etching_acid_bucket.json @@ -0,0 +1,6 @@ +{ + "parent": "minecraft:item/generated", + "textures": { + "layer0": "modjam:item/etching_acid_bucket" + } +} \ No newline at end of file diff --git a/src/main/java/com/portingdeadmods/modjam/compat/jei/ItemTransformationRecipeCategory.java b/src/main/java/com/portingdeadmods/modjam/compat/jei/ItemTransformationRecipeCategory.java index 3b6068b7..fe088332 100644 --- a/src/main/java/com/portingdeadmods/modjam/compat/jei/ItemTransformationRecipeCategory.java +++ b/src/main/java/com/portingdeadmods/modjam/compat/jei/ItemTransformationRecipeCategory.java @@ -30,7 +30,7 @@ public class ItemTransformationRecipeCategory implements IRecipeCategoryS0MfW z|Nk2|Zmd|bV#bUa)22;}YWiGJQBhP>t9O#ARjwGp44dK$Sqio=_o_*&vzU zu310bapH1_ASStLUsV`TRJJ6@FBoJ25v2h+;N@{vHz3OG%JBl}XIha0g63zXUT*M`3}#_C y;VR>OK Date: Tue, 10 Sep 2024 20:57:53 +0200 Subject: [PATCH 3/4] diving suit --- build.gradle | 3 + .../7383b985a2cdbb3a068dc5fd3ae4ba545545c370 | 2 +- .../9419a4a367f91ae64b7a192c54b5d646e8c9a939 | 4 +- .../resources/data/minecraft/recipe/air.json | 7 - .../loot_modifiers/guardian_modifier.json | 2 +- .../content/items/DivingSuitArmorItem.java | 46 +++++++ .../modjam/datagen/BlockModelProvider.java | 1 + .../modjam/events/MJClientEvents.java | 19 +-- .../modjam/registries/MJItems.java | 17 ++- .../models/block/prismarine_laser_relay.json | 128 ------------------ 10 files changed, 73 insertions(+), 156 deletions(-) delete mode 100644 src/generated/resources/data/minecraft/recipe/air.json create mode 100644 src/main/java/com/portingdeadmods/modjam/content/items/DivingSuitArmorItem.java delete mode 100644 src/main/resources/assets/modjam/models/block/prismarine_laser_relay.json diff --git a/build.gradle b/build.gradle index aeb5e5c4..5dfc97a9 100644 --- a/build.gradle +++ b/build.gradle @@ -99,6 +99,9 @@ tasks.withType(ProcessResources).configureEach { filesMatching(['META-INF/neoforge.mods.toml']) { expand replaceProperties } + + duplicatesStrategy = DuplicatesStrategy.EXCLUDE + } publishing { diff --git a/src/generated/resources/.cache/7383b985a2cdbb3a068dc5fd3ae4ba545545c370 b/src/generated/resources/.cache/7383b985a2cdbb3a068dc5fd3ae4ba545545c370 index 8ffb14ab..2a57a91d 100644 --- a/src/generated/resources/.cache/7383b985a2cdbb3a068dc5fd3ae4ba545545c370 +++ b/src/generated/resources/.cache/7383b985a2cdbb3a068dc5fd3ae4ba545545c370 @@ -1,4 +1,4 @@ -// 1.21.1 2024-09-09T19:42:22.399781792 Block States: modjam +// 1.21.1 2024-09-10T20:28:21.2955623 Block States: modjam af3ef9c17c60ced537516e8aa1215fcb76e3683e assets/modjam/blockstates/aquarine_steel_block.json 865a45a4d022b56bc54dc32dae4b666af2df7d6f assets/modjam/blockstates/aquatic_catalyst.json 6e42254717fc67a953282f50517eb06c02193129 assets/modjam/blockstates/chiseled_dark_prismarine.json diff --git a/src/generated/resources/.cache/9419a4a367f91ae64b7a192c54b5d646e8c9a939 b/src/generated/resources/.cache/9419a4a367f91ae64b7a192c54b5d646e8c9a939 index 74bf8fde..009975a4 100644 --- a/src/generated/resources/.cache/9419a4a367f91ae64b7a192c54b5d646e8c9a939 +++ b/src/generated/resources/.cache/9419a4a367f91ae64b7a192c54b5d646e8c9a939 @@ -1,6 +1,6 @@ -// 1.21.1 2024-09-09T22:07:45.6292483 Global Loot Modifiers : modjam +// 1.21.1 2024-09-10T20:26:46.030593 Global Loot Modifiers : modjam e7f11a46f5a3672b7ccab65e075c363596d0bf4b data/modjam/loot_modifiers/elder_guardian_modifier.json -153470fec00d9665888f06038bdd96b8249cae90 data/modjam/loot_modifiers/guardian_modifier.json +197ecc005cf8fcaa86f4fedcff635b94804f9aa2 data/modjam/loot_modifiers/guardian_modifier.json 4c83e5f61706ea5181128230627d9cfff7e3c15b data/modjam/loot_modifiers/ocean_ruins_modifier.json c011af8fc50a517e0473e9113f9a2672c854d882 data/modjam/loot_modifiers/shipwreck_modifier.json 655a48f63f1b41627dd1fc25c31ad537eb8da0ca data/modjam/loot_modifiers/suspicious_ruins_sand_modifier.json diff --git a/src/generated/resources/data/minecraft/recipe/air.json b/src/generated/resources/data/minecraft/recipe/air.json deleted file mode 100644 index 37d5fd6a..00000000 --- a/src/generated/resources/data/minecraft/recipe/air.json +++ /dev/null @@ -1,7 +0,0 @@ -{ - "type": "modjam:aquatic_catalyst_channeling", - "ingredient": { - "item": "minecraft:kelp" - }, - "power_amount": 100 -} \ No newline at end of file diff --git a/src/generated/resources/data/modjam/loot_modifiers/guardian_modifier.json b/src/generated/resources/data/modjam/loot_modifiers/guardian_modifier.json index 3d66a2a1..4030d0e8 100644 --- a/src/generated/resources/data/modjam/loot_modifiers/guardian_modifier.json +++ b/src/generated/resources/data/modjam/loot_modifiers/guardian_modifier.json @@ -6,7 +6,7 @@ "loot_table_id": "minecraft:entities/guardian" }, { - "chance": 0.20, + "chance": 0.2, "condition": "minecraft:random_chance" } ], diff --git a/src/main/java/com/portingdeadmods/modjam/content/items/DivingSuitArmorItem.java b/src/main/java/com/portingdeadmods/modjam/content/items/DivingSuitArmorItem.java new file mode 100644 index 00000000..ddff37ed --- /dev/null +++ b/src/main/java/com/portingdeadmods/modjam/content/items/DivingSuitArmorItem.java @@ -0,0 +1,46 @@ +package com.portingdeadmods.modjam.content.items; + +import com.portingdeadmods.modjam.registries.MJItems; +import net.minecraft.ChatFormatting; +import net.minecraft.core.Holder; +import net.minecraft.network.chat.Component; +import net.minecraft.world.entity.Entity; +import net.minecraft.world.entity.EquipmentSlot; +import net.minecraft.world.entity.player.Player; +import net.minecraft.world.item.ArmorItem; +import net.minecraft.world.item.ArmorMaterial; +import net.minecraft.world.item.ItemStack; +import net.minecraft.world.item.TooltipFlag; +import net.minecraft.world.level.Level; + +import java.util.List; + +public class DivingSuitArmorItem extends ArmorItem { + + public DivingSuitArmorItem(Holder material, Type type, Properties properties) { + super(material, type, properties); + } + + @Override + public int getMaxStackSize(ItemStack stack) { + return 1; + } + + @Override + public void inventoryTick(ItemStack stack, Level level, Entity entity, int slotId, boolean isSelected) { + if(entity instanceof Player player) { + if(player.getItemBySlot(EquipmentSlot.HEAD).is(MJItems.DIVING_HELMET) && player.getItemBySlot(EquipmentSlot.CHEST).is(MJItems.DIVING_CHESTPLATE) && player.getItemBySlot(EquipmentSlot.LEGS).is(MJItems.DIVING_LEGGINGS) && player.getItemBySlot(EquipmentSlot.FEET).is(MJItems.DIVING_BOOTS)) { + if(player.isUnderWater()) { + player.setAirSupply(player.getMaxAirSupply()); + } + } + } + } + + @Override + public void appendHoverText(ItemStack stack, TooltipContext context, List tooltipComponents, TooltipFlag tooltipFlag) { + if(stack.is(MJItems.DIVING_HELMET.get())) { + tooltipComponents.add(Component.literal("Allows you to see better underwater.").withStyle(ChatFormatting.GRAY)); + } + } +} diff --git a/src/main/java/com/portingdeadmods/modjam/datagen/BlockModelProvider.java b/src/main/java/com/portingdeadmods/modjam/datagen/BlockModelProvider.java index 3bda9a14..d2874ca0 100644 --- a/src/main/java/com/portingdeadmods/modjam/datagen/BlockModelProvider.java +++ b/src/main/java/com/portingdeadmods/modjam/datagen/BlockModelProvider.java @@ -54,6 +54,7 @@ public void facingBlock(Block block) { .modelForState().modelFile(model).rotationX(90).rotationY(270).addModel(); } + private void crateBlock(CrateBlock crateBlock) { VariantBlockStateBuilder builder = getVariantBuilder(crateBlock); builder.partialState().with(CrateBlock.RUSTY, false).with(BlockStateProperties.OPEN, false) diff --git a/src/main/java/com/portingdeadmods/modjam/events/MJClientEvents.java b/src/main/java/com/portingdeadmods/modjam/events/MJClientEvents.java index d5806d71..3839840c 100644 --- a/src/main/java/com/portingdeadmods/modjam/events/MJClientEvents.java +++ b/src/main/java/com/portingdeadmods/modjam/events/MJClientEvents.java @@ -12,6 +12,7 @@ import com.portingdeadmods.modjam.client.renderer.blockentities.DrainBERenderer; import com.portingdeadmods.modjam.client.screen.CrateScreen; import com.portingdeadmods.modjam.registries.MJBlockEntityTypes; +import com.portingdeadmods.modjam.registries.MJItems; import com.portingdeadmods.modjam.registries.MJMenuTypes; import net.minecraft.client.Camera; import net.minecraft.client.KeyMapping; @@ -22,6 +23,7 @@ import net.minecraft.resources.ResourceLocation; import net.minecraft.util.FastColor; import net.minecraft.world.entity.Entity; +import net.minecraft.world.entity.EquipmentSlot; import net.minecraft.world.entity.player.Player; import net.neoforged.api.distmarker.Dist; import net.neoforged.bus.api.SubscribeEvent; @@ -120,23 +122,14 @@ public static void registerMenus(RegisterMenuScreensEvent event){ @EventBusSubscriber(modid = ModJam.MODID, value = Dist.CLIENT, bus = EventBusSubscriber.Bus.GAME) public static final class ClientInGameBus { - @SubscribeEvent - public static void removeWaterFog(ClientTickEvent.Post event) { - Entity cameraEntity = Minecraft.getInstance().cameraEntity; - if(cameraEntity instanceof Player player){ - if(cameraEntity.isUnderWater()){ - RenderSystem.setShaderFogStart(-8.0f); - RenderSystem.setShaderFogEnd(250.0f); - RenderSystem.setShaderFogShape(FogShape.CYLINDER); - } - } - } - @SubscribeEvent public static void onRenderFog(ViewportEvent.RenderFog event) { Entity cameraEntity = Minecraft.getInstance().cameraEntity; if(cameraEntity instanceof Player player){ - if(cameraEntity.isUnderWater()){ + if(cameraEntity.isUnderWater() && player.getItemBySlot(EquipmentSlot.HEAD).is(MJItems.DIVING_HELMET.get())){ + event.setNearPlaneDistance(-8.0f); + event.setFarPlaneDistance(250.0f); + event.setFogShape(FogShape.CYLINDER); event.setCanceled(true); } } diff --git a/src/main/java/com/portingdeadmods/modjam/registries/MJItems.java b/src/main/java/com/portingdeadmods/modjam/registries/MJItems.java index 5eecfa26..e5b7b6d6 100644 --- a/src/main/java/com/portingdeadmods/modjam/registries/MJItems.java +++ b/src/main/java/com/portingdeadmods/modjam/registries/MJItems.java @@ -1,12 +1,10 @@ package com.portingdeadmods.modjam.registries; import com.portingdeadmods.modjam.ModJam; +import com.portingdeadmods.modjam.content.items.DivingSuitArmorItem; import com.portingdeadmods.modjam.content.items.PrismMonocleItem; import com.portingdeadmods.modjam.content.items.AquarineWrenchItem; -import net.minecraft.world.item.BlockItem; -import net.minecraft.world.item.BucketItem; -import net.minecraft.world.item.Item; -import net.minecraft.world.item.Items; +import net.minecraft.world.item.*; import net.minecraft.world.level.ItemLike; import net.neoforged.neoforge.registries.DeferredItem; import net.neoforged.neoforge.registries.DeferredRegister; @@ -52,6 +50,11 @@ public final class MJItems { public static final DeferredItem PRISM_MONOCLE = registerItem("prism_monocle", PrismMonocleItem::new, new Item.Properties()); + public static final DeferredItem DIVING_HELMET = registerItem("diving_helmet",() -> new DivingSuitArmorItem(ArmorMaterials.LEATHER, ArmorItem.Type.HELMET, new Item.Properties())); + public static final DeferredItem DIVING_CHESTPLATE = registerItem("diving_chestplate",() -> new DivingSuitArmorItem(ArmorMaterials.LEATHER, ArmorItem.Type.CHESTPLATE, new Item.Properties())); + public static final DeferredItem DIVING_LEGGINGS = registerItem("diving_leggings",() -> new DivingSuitArmorItem(ArmorMaterials.LEATHER, ArmorItem.Type.LEGGINGS, new Item.Properties())); + public static final DeferredItem DIVING_BOOTS = registerItem("diving_boots",() -> new DivingSuitArmorItem(ArmorMaterials.LEATHER, ArmorItem.Type.BOOTS, new Item.Properties())); + // BUCKETS public static final DeferredItem SALT_WATER_BUCKET = registerItemBucket("salt_water_bucket", () -> new BucketItem(MJFluids.SALT_WATER_SOURCE.get(), new Item.Properties().craftRemainder(Items.BUCKET).stacksTo(1))); @@ -74,6 +77,12 @@ private static DeferredItem registerItemBucket(String name, return ITEMS.register(name, item); } + public static DeferredItem registerItem(String name, Supplier item) { + DeferredItem toReturn = ITEMS.register(name, item); + CREATIVE_TAB_ITEMS.add(toReturn); + return toReturn; + } + public static DeferredItem registerItem(String name, Function itemConstructor, Item.Properties properties, boolean addToTab) { DeferredItem toReturn = ITEMS.registerItem(name, itemConstructor, properties); if (addToTab) { diff --git a/src/main/resources/assets/modjam/models/block/prismarine_laser_relay.json b/src/main/resources/assets/modjam/models/block/prismarine_laser_relay.json deleted file mode 100644 index 89a89265..00000000 --- a/src/main/resources/assets/modjam/models/block/prismarine_laser_relay.json +++ /dev/null @@ -1,128 +0,0 @@ -{ - "credit": "Made with Blockbench", - "render_type": "translucent", - "textures": { - "1": "modjam:block/lens", - "2": "block/prismarine_bricks", - "particle": "block/prismarine_bricks" - }, - "elements": [ - { - "from": [6, 0, 4], - "to": [10, 16, 6], - "rotation": {"angle": 0, "axis": "z", "origin": [10, 0, 7]}, - "faces": { - "north": {"uv": [6, 16, 10, 0], "rotation": 180, "texture": "#2"}, - "east": {"uv": [0, 0, 16, 2], "rotation": 270, "texture": "#2"}, - "south": {"uv": [0, 0, 16, 4], "rotation": 270, "texture": "#2"}, - "west": {"uv": [0, 0, 16, 2], "rotation": 270, "texture": "#2"}, - "up": {"uv": [2, 9, 4, 13], "rotation": 270, "texture": "#2"}, - "down": {"uv": [0, 0, 2, 4], "rotation": 270, "texture": "#2"} - } - }, - { - "from": [4, 0, 4], - "to": [6, 16, 12], - "rotation": {"angle": 0, "axis": "z", "origin": [6, 0, 7]}, - "faces": { - "north": {"uv": [4, 16, 6, 0], "texture": "#2"}, - "east": {"uv": [0, 2, 16, 10], "rotation": 270, "texture": "#2"}, - "south": {"uv": [3, 0, 5, 16], "texture": "#2"}, - "west": {"uv": [4, 0, 12, 16], "texture": "#2"}, - "up": {"uv": [0, 11, 8, 13], "rotation": 270, "texture": "#2"}, - "down": {"uv": [0, 0, 8, 2], "rotation": 270, "texture": "#2"} - } - }, - { - "from": [6, 0, 10], - "to": [10, 16, 12], - "rotation": {"angle": 0, "axis": "z", "origin": [10, 0, 13]}, - "faces": { - "north": {"uv": [0, 0, 16, 4], "rotation": 90, "texture": "#2"}, - "east": {"uv": [0, 0, 16, 2], "rotation": 270, "texture": "#2"}, - "south": {"uv": [5, 0, 9, 16], "texture": "#2"}, - "west": {"uv": [0, 0, 16, 2], "rotation": 270, "texture": "#2"}, - "up": {"uv": [0, 1, 2, 5], "rotation": 270, "texture": "#2"}, - "down": {"uv": [0, 0, 2, 4], "rotation": 270, "texture": "#2"} - } - }, - { - "from": [10, 0, 4], - "to": [12, 16, 12], - "rotation": {"angle": 0, "axis": "z", "origin": [12, 0, 7]}, - "faces": { - "north": {"uv": [5, 0, 7, 16], "rotation": 180, "texture": "#2"}, - "east": {"uv": [4, 16, 12, 0], "rotation": 180, "texture": "#2"}, - "south": {"uv": [9, 0, 11, 16], "texture": "#2"}, - "west": {"uv": [16, 6, 0, 14], "rotation": 90, "texture": "#2"}, - "up": {"uv": [0, 0, 8, 2], "rotation": 270, "texture": "#2"}, - "down": {"uv": [0, 0, 8, 2], "rotation": 270, "texture": "#2"} - } - }, - { - "from": [6, 10, 6], - "to": [10, 12, 10], - "rotation": {"angle": 0, "axis": "z", "origin": [10, 0, 11]}, - "faces": { - "north": {"uv": [0, 8, 2, 12], "rotation": 90, "texture": "#1"}, - "east": {"uv": [6, 8, 4, 12], "rotation": 270, "texture": "#1"}, - "south": {"uv": [8, 0, 10, 4], "rotation": 270, "texture": "#1"}, - "west": {"uv": [4, 12, 2, 8], "rotation": 270, "texture": "#1"}, - "up": {"uv": [0, 4, 4, 8], "rotation": 270, "texture": "#1"}, - "down": {"uv": [0, 4, 4, 8], "rotation": 270, "texture": "#1"} - } - }, - { - "from": [6, 4, 6], - "to": [10, 6, 10], - "rotation": {"angle": 0, "axis": "z", "origin": [10, -6, 11]}, - "faces": { - "north": {"uv": [8, 4, 10, 8], "rotation": 90, "texture": "#1"}, - "east": {"uv": [12, 0, 10, 4], "rotation": 270, "texture": "#1"}, - "south": {"uv": [6, 8, 8, 12], "rotation": 270, "texture": "#1"}, - "west": {"uv": [10, 12, 8, 8], "rotation": 270, "texture": "#1"}, - "up": {"uv": [4, 0, 8, 4], "rotation": 270, "texture": "#1"}, - "down": {"uv": [4, 0, 8, 4], "rotation": 270, "texture": "#1"} - } - } - ], - "display": { - "thirdperson_righthand": { - "rotation": [75, 45, 0], - "translation": [0, 2.5, 0], - "scale": [0.375, 0.375, 0.375] - }, - "thirdperson_lefthand": { - "rotation": [75, 45, 0], - "translation": [0, 2.5, 0], - "scale": [0.375, 0.375, 0.375] - }, - "firstperson_righthand": { - "rotation": [0, 45, 0], - "scale": [0.4, 0.4, 0.4] - }, - "firstperson_lefthand": { - "rotation": [0, 225, 0], - "scale": [0.4, 0.4, 0.4] - }, - "ground": { - "translation": [0, 3, 0], - "scale": [0.25, 0.25, 0.25] - }, - "gui": { - "rotation": [30, 225, 0], - "scale": [0.625, 0.625, 0.625] - }, - "fixed": { - "scale": [0.5, 0.5, 0.5] - } - }, - "groups": [ - { - "name": "main", - "origin": [8, 8, 8], - "color": 0, - "children": [0, 1, 2, 3, 4, 5] - } - ] -} \ No newline at end of file From f166a5d938cd27661d0a38b624bda631e412a2b8 Mon Sep 17 00:00:00 2001 From: Abdel Date: Tue, 10 Sep 2024 21:00:31 +0200 Subject: [PATCH 4/4] i think i fixed it --- .../models/block/prismarine_laser_relay.json | 614 ++++++++++++++++++ 1 file changed, 614 insertions(+) create mode 100644 src/main/resources/assets/modjam/models/block/prismarine_laser_relay.json diff --git a/src/main/resources/assets/modjam/models/block/prismarine_laser_relay.json b/src/main/resources/assets/modjam/models/block/prismarine_laser_relay.json new file mode 100644 index 00000000..393cccab --- /dev/null +++ b/src/main/resources/assets/modjam/models/block/prismarine_laser_relay.json @@ -0,0 +1,614 @@ +{ + "credit": "Made with Blockbench", + "render_type": "translucent", + "textures": { + "1": "modjam:block/lens", + "2": "block/prismarine_bricks", + "particle": "block/prismarine_bricks" + }, + "elements": [ + { + "from": [ + 6, + 0, + 4 + ], + "to": [ + 10, + 16, + 6 + ], + "rotation": { + "angle": 0, + "axis": "z", + "origin": [ + 10, + 0, + 7 + ] + }, + "faces": { + "north": { + "uv": [ + 6, + 16, + 10, + 0 + ], + "rotation": 180, + "texture": "#2" + }, + "east": { + "uv": [ + 0, + 0, + 16, + 2 + ], + "rotation": 270, + "texture": "#2" + }, + "south": { + "uv": [ + 0, + 0, + 16, + 4 + ], + "rotation": 270, + "texture": "#2" + }, + "west": { + "uv": [ + 0, + 0, + 16, + 2 + ], + "rotation": 270, + "texture": "#2" + }, + "up": { + "uv": [ + 2, + 9, + 4, + 13 + ], + "rotation": 270, + "texture": "#2" + }, + "down": { + "uv": [ + 0, + 0, + 2, + 4 + ], + "rotation": 270, + "texture": "#2" + } + } + }, + { + "from": [ + 4, + 0, + 4 + ], + "to": [ + 6, + 16, + 12 + ], + "rotation": { + "angle": 0, + "axis": "z", + "origin": [ + 6, + 0, + 7 + ] + }, + "faces": { + "north": { + "uv": [ + 4, + 16, + 6, + 0 + ], + "texture": "#2" + }, + "east": { + "uv": [ + 0, + 2, + 16, + 10 + ], + "rotation": 270, + "texture": "#2" + }, + "south": { + "uv": [ + 3, + 0, + 5, + 16 + ], + "texture": "#2" + }, + "west": { + "uv": [ + 4, + 0, + 12, + 16 + ], + "texture": "#2" + }, + "up": { + "uv": [ + 0, + 11, + 8, + 13 + ], + "rotation": 270, + "texture": "#2" + }, + "down": { + "uv": [ + 0, + 0, + 8, + 2 + ], + "rotation": 270, + "texture": "#2" + } + } + }, + { + "from": [ + 6, + 0, + 10 + ], + "to": [ + 10, + 16, + 12 + ], + "rotation": { + "angle": 0, + "axis": "z", + "origin": [ + 10, + 0, + 13 + ] + }, + "faces": { + "north": { + "uv": [ + 0, + 0, + 16, + 4 + ], + "rotation": 90, + "texture": "#2" + }, + "east": { + "uv": [ + 0, + 0, + 16, + 2 + ], + "rotation": 270, + "texture": "#2" + }, + "south": { + "uv": [ + 5, + 0, + 9, + 16 + ], + "texture": "#2" + }, + "west": { + "uv": [ + 0, + 0, + 16, + 2 + ], + "rotation": 270, + "texture": "#2" + }, + "up": { + "uv": [ + 0, + 1, + 2, + 5 + ], + "rotation": 270, + "texture": "#2" + }, + "down": { + "uv": [ + 0, + 0, + 2, + 4 + ], + "rotation": 270, + "texture": "#2" + } + } + }, + { + "from": [ + 10, + 0, + 4 + ], + "to": [ + 12, + 16, + 12 + ], + "rotation": { + "angle": 0, + "axis": "z", + "origin": [ + 12, + 0, + 7 + ] + }, + "faces": { + "north": { + "uv": [ + 5, + 0, + 7, + 16 + ], + "rotation": 180, + "texture": "#2" + }, + "east": { + "uv": [ + 4, + 16, + 12, + 0 + ], + "rotation": 180, + "texture": "#2" + }, + "south": { + "uv": [ + 9, + 0, + 11, + 16 + ], + "texture": "#2" + }, + "west": { + "uv": [ + 16, + 6, + 0, + 14 + ], + "rotation": 90, + "texture": "#2" + }, + "up": { + "uv": [ + 0, + 0, + 8, + 2 + ], + "rotation": 270, + "texture": "#2" + }, + "down": { + "uv": [ + 0, + 0, + 8, + 2 + ], + "rotation": 270, + "texture": "#2" + } + } + }, + { + "from": [ + 6, + 10, + 6 + ], + "to": [ + 10, + 12, + 10 + ], + "rotation": { + "angle": 0, + "axis": "z", + "origin": [ + 10, + 0, + 11 + ] + }, + "faces": { + "north": { + "uv": [ + 0, + 8, + 2, + 12 + ], + "rotation": 90, + "texture": "#1" + }, + "east": { + "uv": [ + 6, + 8, + 4, + 12 + ], + "rotation": 270, + "texture": "#1" + }, + "south": { + "uv": [ + 8, + 0, + 10, + 4 + ], + "rotation": 270, + "texture": "#1" + }, + "west": { + "uv": [ + 4, + 12, + 2, + 8 + ], + "rotation": 270, + "texture": "#1" + }, + "up": { + "uv": [ + 0, + 4, + 4, + 8 + ], + "rotation": 270, + "texture": "#1" + }, + "down": { + "uv": [ + 0, + 4, + 4, + 8 + ], + "rotation": 270, + "texture": "#1" + } + } + }, + { + "from": [ + 6, + 4, + 6 + ], + "to": [ + 10, + 6, + 10 + ], + "rotation": { + "angle": 0, + "axis": "z", + "origin": [ + 10, + -6, + 11 + ] + }, + "faces": { + "north": { + "uv": [ + 8, + 4, + 10, + 8 + ], + "rotation": 90, + "texture": "#1" + }, + "east": { + "uv": [ + 12, + 0, + 10, + 4 + ], + "rotation": 270, + "texture": "#1" + }, + "south": { + "uv": [ + 6, + 8, + 8, + 12 + ], + "rotation": 270, + "texture": "#1" + }, + "west": { + "uv": [ + 10, + 12, + 8, + 8 + ], + "rotation": 270, + "texture": "#1" + }, + "up": { + "uv": [ + 4, + 0, + 8, + 4 + ], + "rotation": 270, + "texture": "#1" + }, + "down": { + "uv": [ + 4, + 0, + 8, + 4 + ], + "rotation": 270, + "texture": "#1" + } + } + } + ], + "display": { + "thirdperson_righthand": { + "rotation": [ + 75, + 45, + 0 + ], + "translation": [ + 0, + 2.5, + 0 + ], + "scale": [ + 0.375, + 0.375, + 0.375 + ] + }, + "thirdperson_lefthand": { + "rotation": [ + 75, + 45, + 0 + ], + "translation": [ + 0, + 2.5, + 0 + ], + "scale": [ + 0.375, + 0.375, + 0.375 + ] + }, + "firstperson_righthand": { + "rotation": [ + 0, + 45, + 0 + ], + "scale": [ + 0.4, + 0.4, + 0.4 + ] + }, + "firstperson_lefthand": { + "rotation": [ + 0, + 225, + 0 + ], + "scale": [ + 0.4, + 0.4, + 0.4 + ] + }, + "ground": { + "translation": [ + 0, + 3, + 0 + ], + "scale": [ + 0.25, + 0.25, + 0.25 + ] + }, + "gui": { + "rotation": [ + 30, + 225, + 0 + ], + "scale": [ + 0.625, + 0.625, + 0.625 + ] + }, + "fixed": { + "scale": [ + 0.5, + 0.5, + 0.5 + ] + } + }, + "groups": [ + { + "name": "main", + "origin": [ + 8, + 8, + 8 + ], + "color": 0, + "children": [ + 0, + 1, + 2, + 3, + 4, + 5 + ] + } + ] +} \ No newline at end of file