From 778977a869fdc8f4ccd4827db4f91a27a7fa7f06 Mon Sep 17 00:00:00 2001 From: paulevsGitch Date: Thu, 18 Mar 2021 16:53:25 +0300 Subject: [PATCH] Silk moth AI upgrade, silk harvesting, hives --- .../betterend/blocks/SilkMothHiveBlock.java | 114 ++++++++++++++++++ .../betterend/blocks/SilkMothNestBlock.java | 34 +++++- .../ru/betterend/entity/SilkMothEntity.java | 47 ++++++-- .../ru/betterend/recipe/CraftingRecipes.java | 2 + .../java/ru/betterend/registry/EndBlocks.java | 4 +- .../ru/betterend/registry/EndEntities.java | 2 +- .../java/ru/betterend/registry/EndItems.java | 1 + .../betterend/blockstates/silk_moth_hive.json | 20 +++ .../models/block/silk_moth_hive.json | 12 ++ .../models/block/silk_moth_hive_silk.json | 12 ++ .../betterend/models/item/silk_moth_hive.json | 3 + .../textures/block/moth_hive_front.png | Bin 0 -> 311 bytes .../textures/block/moth_hive_front_silk.png | Bin 0 -> 319 bytes .../textures/block/moth_hive_side.png | Bin 0 -> 269 bytes .../textures/item/silk_moth_matrix.png | Bin 0 -> 424 bytes 15 files changed, 237 insertions(+), 14 deletions(-) create mode 100644 src/main/java/ru/betterend/blocks/SilkMothHiveBlock.java create mode 100644 src/main/resources/assets/betterend/blockstates/silk_moth_hive.json create mode 100644 src/main/resources/assets/betterend/models/block/silk_moth_hive.json create mode 100644 src/main/resources/assets/betterend/models/block/silk_moth_hive_silk.json create mode 100644 src/main/resources/assets/betterend/models/item/silk_moth_hive.json create mode 100644 src/main/resources/assets/betterend/textures/block/moth_hive_front.png create mode 100644 src/main/resources/assets/betterend/textures/block/moth_hive_front_silk.png create mode 100644 src/main/resources/assets/betterend/textures/block/moth_hive_side.png create mode 100644 src/main/resources/assets/betterend/textures/item/silk_moth_matrix.png diff --git a/src/main/java/ru/betterend/blocks/SilkMothHiveBlock.java b/src/main/java/ru/betterend/blocks/SilkMothHiveBlock.java new file mode 100644 index 00000000..a2cc925e --- /dev/null +++ b/src/main/java/ru/betterend/blocks/SilkMothHiveBlock.java @@ -0,0 +1,114 @@ +package ru.betterend.blocks; + +import java.util.Random; + +import net.fabricmc.fabric.api.object.builder.v1.block.FabricBlockSettings; +import net.fabricmc.fabric.api.tool.attribute.v1.FabricToolTags; +import net.minecraft.block.Block; +import net.minecraft.block.BlockState; +import net.minecraft.block.Material; +import net.minecraft.entity.ItemEntity; +import net.minecraft.entity.player.PlayerEntity; +import net.minecraft.item.ItemPlacementContext; +import net.minecraft.item.ItemStack; +import net.minecraft.server.world.ServerWorld; +import net.minecraft.sound.BlockSoundGroup; +import net.minecraft.sound.SoundCategory; +import net.minecraft.sound.SoundEvents; +import net.minecraft.state.StateManager; +import net.minecraft.state.property.DirectionProperty; +import net.minecraft.state.property.IntProperty; +import net.minecraft.state.property.Properties; +import net.minecraft.util.ActionResult; +import net.minecraft.util.BlockMirror; +import net.minecraft.util.BlockRotation; +import net.minecraft.util.Hand; +import net.minecraft.util.hit.BlockHitResult; +import net.minecraft.util.math.BlockPos; +import net.minecraft.util.math.Box; +import net.minecraft.util.math.Direction; +import net.minecraft.util.math.Vec3d; +import net.minecraft.world.World; +import ru.betterend.blocks.basis.BlockBase; +import ru.betterend.entity.SilkMothEntity; +import ru.betterend.registry.EndEntities; +import ru.betterend.registry.EndItems; +import ru.betterend.util.BlocksHelper; +import ru.betterend.util.MHelper; + +public class SilkMothHiveBlock extends BlockBase { + public static final DirectionProperty FACING = Properties.HORIZONTAL_FACING; + public static final IntProperty FULLNESS = BlockProperties.FULLNESS; + + public SilkMothHiveBlock() { + super(FabricBlockSettings.of(Material.WOOD).hardness(0.5F).resistance(0.1F).sounds(BlockSoundGroup.WOOL).nonOpaque().ticksRandomly().breakByHand(true)); + this.setDefaultState(getDefaultState().with(FULLNESS, 0)); + } + + @Override + protected void appendProperties(StateManager.Builder stateManager) { + stateManager.add(FACING, FULLNESS); + } + + @Override + public BlockState getPlacementState(ItemPlacementContext ctx) { + Direction dir = ctx.getPlayerFacing().getOpposite(); + return this.getDefaultState().with(FACING, dir); + } + + @Override + public BlockState rotate(BlockState state, BlockRotation rotation) { + return BlocksHelper.rotateHorizontal(state, rotation, FACING); + } + + @Override + public BlockState mirror(BlockState state, BlockMirror mirror) { + return BlocksHelper.mirrorHorizontal(state, mirror, FACING); + } + + @Override + public void randomTick(BlockState state, ServerWorld world, BlockPos pos, Random random) { + Direction dir = state.get(FACING); + BlockPos spawn = pos.offset(dir); + if (!world.getBlockState(spawn).isAir()) { + return; + } + int count = world.getEntitiesByType(EndEntities.SILK_MOTH, new Box(pos).expand(16), (entity) -> { return true; }).size(); + if (count > 6) { + return; + } + SilkMothEntity moth = new SilkMothEntity(EndEntities.SILK_MOTH, world); + moth.refreshPositionAndAngles(spawn.getX() + 0.5, spawn.getY() + 0.5, spawn.getZ() + 0.5, dir.asRotation(), 0); + moth.setVelocity(new Vec3d(dir.getOffsetX() * 0.4, 0, dir.getOffsetZ() * 0.4)); + moth.setHive(world, pos); + world.spawnEntity(moth); + world.playSound(null, pos, SoundEvents.BLOCK_BEEHIVE_EXIT, SoundCategory.BLOCKS, 1, 1); + } + + @Override + public ActionResult onUse(BlockState state, World world, BlockPos pos, PlayerEntity player, Hand hand, BlockHitResult hit) { + if (hand == Hand.MAIN_HAND) { + ItemStack stack = player.getMainHandStack(); + if (stack.getItem().isIn(FabricToolTags.SHEARS) && state.get(FULLNESS) == 3) { + BlocksHelper.setWithUpdate(world, pos, state.with(FULLNESS, 0)); + Direction dir = state.get(FACING); + double px = pos.getX() + dir.getOffsetX() + 0.5; + double py = pos.getY() + dir.getOffsetY() + 0.5; + double pz = pos.getZ() + dir.getOffsetZ() + 0.5; + ItemStack drop = new ItemStack(EndItems.SILK_FIBER, MHelper.randRange(8, 16, world.getRandom())); + ItemEntity entity = new ItemEntity(world, px, py, pz, drop); + world.spawnEntity(entity); + if (world.getRandom().nextInt(4) == 0) { + drop = new ItemStack(EndItems.SILK_MOTH_MATRIX); + entity = new ItemEntity(world, px, py, pz, drop); + world.spawnEntity(entity); + } + if (!player.isCreative()) { + stack.setDamage(stack.getDamage() + 1); + } + return ActionResult.SUCCESS; + } + } + return ActionResult.FAIL; + } +} diff --git a/src/main/java/ru/betterend/blocks/SilkMothNestBlock.java b/src/main/java/ru/betterend/blocks/SilkMothNestBlock.java index 7ed3e427..09a3a197 100644 --- a/src/main/java/ru/betterend/blocks/SilkMothNestBlock.java +++ b/src/main/java/ru/betterend/blocks/SilkMothNestBlock.java @@ -5,11 +5,13 @@ import java.util.List; import java.util.Random; import net.fabricmc.fabric.api.object.builder.v1.block.FabricBlockSettings; +import net.fabricmc.fabric.api.tool.attribute.v1.FabricToolTags; import net.minecraft.block.Block; import net.minecraft.block.BlockState; import net.minecraft.block.Blocks; import net.minecraft.block.Material; import net.minecraft.block.ShapeContext; +import net.minecraft.entity.ItemEntity; import net.minecraft.entity.player.PlayerEntity; import net.minecraft.item.ItemPlacementContext; import net.minecraft.item.ItemStack; @@ -24,8 +26,11 @@ import net.minecraft.state.property.DirectionProperty; import net.minecraft.state.property.IntProperty; import net.minecraft.state.property.Properties; import net.minecraft.tag.BlockTags; +import net.minecraft.util.ActionResult; import net.minecraft.util.BlockMirror; import net.minecraft.util.BlockRotation; +import net.minecraft.util.Hand; +import net.minecraft.util.hit.BlockHitResult; import net.minecraft.util.math.BlockPos; import net.minecraft.util.math.Box; import net.minecraft.util.math.Direction; @@ -39,7 +44,9 @@ import ru.betterend.client.render.ERenderLayer; import ru.betterend.entity.SilkMothEntity; import ru.betterend.interfaces.IRenderTypeable; import ru.betterend.registry.EndEntities; +import ru.betterend.registry.EndItems; import ru.betterend.util.BlocksHelper; +import ru.betterend.util.MHelper; public class SilkMothNestBlock extends BlockBase implements IRenderTypeable { public static final BooleanProperty ACTIVE = BlockProperties.ACTIVE; @@ -128,7 +135,7 @@ public class SilkMothNestBlock extends BlockBase implements IRenderTypeable { return; } int count = world.getEntitiesByType(EndEntities.SILK_MOTH, new Box(pos).expand(16), (entity) -> { return true; }).size(); - if (count > 8) { + if (count > 6) { return; } SilkMothEntity moth = new SilkMothEntity(EndEntities.SILK_MOTH, world); @@ -138,4 +145,29 @@ public class SilkMothNestBlock extends BlockBase implements IRenderTypeable { world.spawnEntity(moth); world.playSound(null, pos, SoundEvents.BLOCK_BEEHIVE_EXIT, SoundCategory.BLOCKS, 1, 1); } + + @Override + public ActionResult onUse(BlockState state, World world, BlockPos pos, PlayerEntity player, Hand hand, BlockHitResult hit) { + if (hand == Hand.MAIN_HAND) { + ItemStack stack = player.getMainHandStack(); + if (stack.getItem().isIn(FabricToolTags.SHEARS) && state.get(ACTIVE) && state.get(FULLNESS) == 3) { + BlocksHelper.setWithUpdate(world, pos, state.with(FULLNESS, 0)); + Direction dir = state.get(FACING); + double px = pos.getX() + dir.getOffsetX() + 0.5; + double py = pos.getY() + dir.getOffsetY() + 0.5; + double pz = pos.getZ() + dir.getOffsetZ() + 0.5; + ItemStack drop = new ItemStack(EndItems.SILK_FIBER, MHelper.randRange(1, 4, world.getRandom())); + ItemEntity entity = new ItemEntity(world, px, py, pz, drop); + world.spawnEntity(entity); + drop = new ItemStack(EndItems.SILK_MOTH_MATRIX, MHelper.randRange(1, 3, world.getRandom())); + entity = new ItemEntity(world, px, py, pz, drop); + world.spawnEntity(entity); + if (!player.isCreative()) { + stack.setDamage(stack.getDamage() + 1); + } + return ActionResult.SUCCESS; + } + } + return ActionResult.FAIL; + } } diff --git a/src/main/java/ru/betterend/entity/SilkMothEntity.java b/src/main/java/ru/betterend/entity/SilkMothEntity.java index 96ee96f7..8329821e 100644 --- a/src/main/java/ru/betterend/entity/SilkMothEntity.java +++ b/src/main/java/ru/betterend/entity/SilkMothEntity.java @@ -1,6 +1,7 @@ package ru.betterend.entity; import java.util.EnumSet; +import java.util.List; import java.util.Random; import org.jetbrains.annotations.Nullable; @@ -34,8 +35,10 @@ import net.minecraft.nbt.NbtHelper; import net.minecraft.server.world.ServerWorld; import net.minecraft.sound.SoundCategory; import net.minecraft.sound.SoundEvents; +import net.minecraft.state.property.Properties; import net.minecraft.util.Identifier; import net.minecraft.util.math.BlockPos; +import net.minecraft.util.math.Box; import net.minecraft.util.math.Vec3d; import net.minecraft.util.registry.Registry; import net.minecraft.util.registry.RegistryKey; @@ -44,7 +47,6 @@ import net.minecraft.world.ServerWorldAccess; import net.minecraft.world.World; import ru.betterend.BetterEnd; import ru.betterend.blocks.BlockProperties; -import ru.betterend.blocks.SilkMothNestBlock; import ru.betterend.registry.EndBlocks; import ru.betterend.registry.EndEntities; import ru.betterend.registry.EndItems; @@ -177,7 +179,13 @@ public class SilkMothEntity extends AnimalEntity implements Flutterer { public static boolean canSpawn(EntityType type, ServerWorldAccess world, SpawnReason spawnReason, BlockPos pos, Random random) { int y = world.getChunk(pos).sampleHeightmap(Type.WORLD_SURFACE, pos.getX() & 15, pos.getY() & 15); - return y > 0 && pos.getY() >= y; + return y > 0 && pos.getY() >= y && notManyEntities(world, pos, 32, 1); + } + + private static boolean notManyEntities(ServerWorldAccess world, BlockPos pos, int radius, int maxCount) { + Box box = new Box(pos).expand(radius); + List list = world.getEntitiesByClass(SilkMothEntity.class, box, (entity) -> true); + return list.size() <= maxCount; } class MothLookControl extends LookControl { @@ -207,7 +215,13 @@ public class SilkMothEntity extends AnimalEntity implements Flutterer { @Override public void start() { - Vec3d vec3d = this.getRandomLocation(); + Vec3d vec3d = null; + if (SilkMothEntity.this.hivePos != null && SilkMothEntity.this.hiveWorld == SilkMothEntity.this.world) { + if (SilkMothEntity.this.getPos().squaredDistanceTo(SilkMothEntity.this.hivePos.getX(), SilkMothEntity.this.hivePos.getY(), SilkMothEntity.this.hivePos.getZ()) > 16) { + vec3d = SilkMothEntity.this.getPos().add(random.nextGaussian() * 2, 0, random.nextGaussian() * 2); + } + } + vec3d = vec3d == null ? this.getRandomLocation() : vec3d; if (vec3d != null) { try { SilkMothEntity.this.navigation.startMovingAlong(SilkMothEntity.this.navigation.findPathTo(new BlockPos(vec3d), 1), 1.0D); @@ -235,22 +249,23 @@ public class SilkMothEntity extends AnimalEntity implements Flutterer { && SilkMothEntity.this.hiveWorld == SilkMothEntity.this.world && SilkMothEntity.this.navigation.isIdle() && SilkMothEntity.this.random.nextInt(16) == 0 - && SilkMothEntity.this.getPos().squaredDistanceTo(SilkMothEntity.this.hivePos.getX(), SilkMothEntity.this.hivePos.getY(), SilkMothEntity.this.hivePos.getZ()) < 32; + && SilkMothEntity.this.getPos().squaredDistanceTo(SilkMothEntity.this.hivePos.getX(), SilkMothEntity.this.hivePos.getY(), SilkMothEntity.this.hivePos.getZ()) < 64; } @Override public boolean shouldContinue() { - return SilkMothEntity.this.navigation.isFollowingPath() && world.getBlockState(entrance).isAir() && world.getBlockState(hivePos).isOf(EndBlocks.SILK_MOTH_NEST); + return SilkMothEntity.this.navigation.isFollowingPath() && world.getBlockState(entrance).isAir() && (world.getBlockState(hivePos).isOf(EndBlocks.SILK_MOTH_NEST) || world.getBlockState(hivePos).isOf(EndBlocks.SILK_MOTH_HIVE)); } @Override public void start() { BlockState state = SilkMothEntity.this.world.getBlockState(SilkMothEntity.this.hivePos); - if (!state.isOf(EndBlocks.SILK_MOTH_NEST)) { + if (!state.isOf(EndBlocks.SILK_MOTH_NEST) && !state.isOf(EndBlocks.SILK_MOTH_HIVE)) { SilkMothEntity.this.hivePos = null; + return; } try { - SilkMothEntity.this.entrance = SilkMothEntity.this.hivePos.offset(state.get(SilkMothNestBlock.FACING)); + SilkMothEntity.this.entrance = SilkMothEntity.this.hivePos.offset(state.get(Properties.HORIZONTAL_FACING)); SilkMothEntity.this.navigation.startMovingAlong(SilkMothEntity.this.navigation.findPathTo(entrance, 1), 1.0D); } catch (Exception e) {} @@ -259,20 +274,30 @@ public class SilkMothEntity extends AnimalEntity implements Flutterer { @Override public void tick() { super.tick(); + if (SilkMothEntity.this.entrance == null) { + return; + } double dx = Math.abs(SilkMothEntity.this.entrance.getX() - SilkMothEntity.this.getX()); double dy = Math.abs(SilkMothEntity.this.entrance.getY() - SilkMothEntity.this.getY()); double dz = Math.abs(SilkMothEntity.this.entrance.getZ() - SilkMothEntity.this.getZ()); if (dx + dy + dz < 1) { BlockState state = SilkMothEntity.this.world.getBlockState(hivePos); - if (state.isOf(EndBlocks.SILK_MOTH_NEST)) { + if (state.isOf(EndBlocks.SILK_MOTH_NEST) || state.isOf(EndBlocks.SILK_MOTH_HIVE)) { int fullness = state.get(BlockProperties.FULLNESS); - if (fullness < 3 && SilkMothEntity.this.random.nextBoolean()) { - fullness ++; - BlocksHelper.setWithUpdate(SilkMothEntity.this.hiveWorld, SilkMothEntity.this.hivePos, state); + boolean isHive = state.isOf(EndBlocks.SILK_MOTH_HIVE); + if (fullness < 3 && (isHive || SilkMothEntity.this.random.nextBoolean())) { + fullness += isHive ? MHelper.randRange(1, 2, random) : 1; + if (fullness > 3) { + fullness = 3; + } + BlocksHelper.setWithUpdate(SilkMothEntity.this.hiveWorld, SilkMothEntity.this.hivePos, state.with(BlockProperties.FULLNESS, fullness)); } SilkMothEntity.this.world.playSound(null, SilkMothEntity.this.entrance, SoundEvents.BLOCK_BEEHIVE_ENTER, SoundCategory.BLOCKS, 1, 1); SilkMothEntity.this.remove(); } + else { + SilkMothEntity.this.hivePos = null; + } } } } diff --git a/src/main/java/ru/betterend/recipe/CraftingRecipes.java b/src/main/java/ru/betterend/recipe/CraftingRecipes.java index 7fe05063..dd3045a0 100644 --- a/src/main/java/ru/betterend/recipe/CraftingRecipes.java +++ b/src/main/java/ru/betterend/recipe/CraftingRecipes.java @@ -189,6 +189,8 @@ public class CraftingRecipes { GridRecipe.make("charcoal_block", EndBlocks.CHARCOAL_BLOCK).setShape("###", "###", "###").addMaterial('#', Items.CHARCOAL).build(); GridRecipe.make("end_stone_furnace", EndBlocks.END_STONE_FURNACE).setShape("###", "# #", "###").addMaterial('#', Blocks.END_STONE).build(); GridRecipe.make("filalux_lantern", EndBlocks.FILALUX_LANTERN).setShape("###", "###", "###").addMaterial('#', EndBlocks.FILALUX).build(); + + GridRecipe.make("silk_moth_hive", EndBlocks.SILK_MOTH_HIVE).setShape("###", "LML", "###").addMaterial('#', EndBlocks.TENANEA.planks).addMaterial('L', EndBlocks.TENANEA_LEAVES).addMaterial('M', EndItems.SILK_MOTH_MATRIX).build(); } private static void registerLantern(String name, Block lantern, Block slab) { diff --git a/src/main/java/ru/betterend/registry/EndBlocks.java b/src/main/java/ru/betterend/registry/EndBlocks.java index 28fb95fa..1fac2cb8 100644 --- a/src/main/java/ru/betterend/registry/EndBlocks.java +++ b/src/main/java/ru/betterend/registry/EndBlocks.java @@ -86,6 +86,7 @@ import ru.betterend.blocks.RespawnObeliskBlock; import ru.betterend.blocks.RunedFlavolite; import ru.betterend.blocks.ShadowBerryBlock; import ru.betterend.blocks.ShadowGrassBlock; +import ru.betterend.blocks.SilkMothHiveBlock; import ru.betterend.blocks.SilkMothNestBlock; import ru.betterend.blocks.SmallAmaranitaBlock; import ru.betterend.blocks.SmallJellyshroomBlock; @@ -353,7 +354,8 @@ public class EndBlocks { public static final Block FILALUX_LANTERN = registerBlock("filalux_lantern", new FilaluxLanternBlock()); // Mob-Related - public static final Block SILK_MOTH_NEST = registerBlock("silk_moth_nest", new SilkMothNestBlock()); + public static final Block SILK_MOTH_NEST = registerBlock("silk_moth_nest", new SilkMothNestBlock()); + public static final Block SILK_MOTH_HIVE = registerBlock("silk_moth_hive", new SilkMothHiveBlock()); // Ores // public static final Block ENDER_ORE = registerBlock("ender_ore", new EndOreBlock(EndItems.ENDER_SHARD, 1, 3, 5)); diff --git a/src/main/java/ru/betterend/registry/EndEntities.java b/src/main/java/ru/betterend/registry/EndEntities.java index d89d2d46..9863bd9b 100644 --- a/src/main/java/ru/betterend/registry/EndEntities.java +++ b/src/main/java/ru/betterend/registry/EndEntities.java @@ -28,7 +28,7 @@ public class EndEntities { public static final EntityType END_FISH = register("end_fish", SpawnGroup.WATER_AMBIENT, 0.5F, 0.5F, EndFishEntity::new, EndFishEntity.createMobAttributes(), true, MHelper.color(3, 50, 76), MHelper.color(120, 206, 255)); public static final EntityType SHADOW_WALKER = register("shadow_walker", SpawnGroup.MONSTER, 0.6F, 1.95F, ShadowWalkerEntity::new, ShadowWalkerEntity.createMobAttributes(), true, MHelper.color(30, 30, 30), MHelper.color(5, 5, 5)); public static final EntityType CUBOZOA = register("cubozoa", SpawnGroup.WATER_AMBIENT, 0.6F, 1F, CubozoaEntity::new, CubozoaEntity.createMobAttributes(), true, MHelper.color(151, 77, 181), MHelper.color(93, 176, 238)); - public static final EntityType SILK_MOTH = register("silk_moth", SpawnGroup.AMBIENT, 0.6F, 0.6F, SilkMothEntity::new, SilkMothEntity.createMobAttributes(), true, MHelper.color(0, 0, 0), MHelper.color(225, 225, 225)); + public static final EntityType SILK_MOTH = register("silk_moth", SpawnGroup.AMBIENT, 0.6F, 0.6F, SilkMothEntity::new, SilkMothEntity.createMobAttributes(), true, MHelper.color(198, 138, 204), MHelper.color(242, 220, 236)); public static void register() { SpawnHelper.restrictionAir(DRAGONFLY, DragonflyEntity::canSpawn); diff --git a/src/main/java/ru/betterend/registry/EndItems.java b/src/main/java/ru/betterend/registry/EndItems.java index 9cff5332..d8365766 100644 --- a/src/main/java/ru/betterend/registry/EndItems.java +++ b/src/main/java/ru/betterend/registry/EndItems.java @@ -74,6 +74,7 @@ public class EndItems { public final static Item LEATHER_WRAPPED_STICK = registerItem("leather_wrapped_stick"); public final static Item SILK_FIBER = registerItem("silk_fiber"); public final static Item LUMECORN_ROD = registerItem("lumecorn_rod"); + public final static Item SILK_MOTH_MATRIX = registerItem("silk_moth_matrix"); // Armor // public static final Item AETERNIUM_HELMET = registerItem("aeternium_helmet", new EndArmorItem(EndArmorMaterial.AETERNIUM, EquipmentSlot.HEAD, makeItemSettings().fireproof())); diff --git a/src/main/resources/assets/betterend/blockstates/silk_moth_hive.json b/src/main/resources/assets/betterend/blockstates/silk_moth_hive.json new file mode 100644 index 00000000..ea609405 --- /dev/null +++ b/src/main/resources/assets/betterend/blockstates/silk_moth_hive.json @@ -0,0 +1,20 @@ +{ + "variants": { + "facing=north,fullness=0": { "model": "betterend:block/silk_moth_hive" }, + "facing=south,fullness=0": { "model": "betterend:block/silk_moth_hive", "y": 180 }, + "facing=east,fullness=0": { "model": "betterend:block/silk_moth_hive", "y": 90 }, + "facing=west,fullness=0": { "model": "betterend:block/silk_moth_hive", "y": 270 }, + "facing=north,fullness=1": { "model": "betterend:block/silk_moth_hive" }, + "facing=south,fullness=1": { "model": "betterend:block/silk_moth_hive", "y": 180 }, + "facing=east,fullness=1": { "model": "betterend:block/silk_moth_hive", "y": 90 }, + "facing=west,fullness=1": { "model": "betterend:block/silk_moth_hive", "y": 270 }, + "facing=north,fullness=2": { "model": "betterend:block/silk_moth_hive" }, + "facing=south,fullness=2": { "model": "betterend:block/silk_moth_hive", "y": 180 }, + "facing=east,fullness=2": { "model": "betterend:block/silk_moth_hive", "y": 90 }, + "facing=west,fullness=2": { "model": "betterend:block/silk_moth_hive", "y": 270 }, + "facing=north,fullness=3": { "model": "betterend:block/silk_moth_hive_silk" }, + "facing=south,fullness=3": { "model": "betterend:block/silk_moth_hive_silk", "y": 180 }, + "facing=east,fullness=3": { "model": "betterend:block/silk_moth_hive_silk", "y": 90 }, + "facing=west,fullness=3": { "model": "betterend:block/silk_moth_hive_silk", "y": 270 } + } +} diff --git a/src/main/resources/assets/betterend/models/block/silk_moth_hive.json b/src/main/resources/assets/betterend/models/block/silk_moth_hive.json new file mode 100644 index 00000000..884ce086 --- /dev/null +++ b/src/main/resources/assets/betterend/models/block/silk_moth_hive.json @@ -0,0 +1,12 @@ +{ + "parent": "block/cube", + "textures": { + "down": "betterend:block/moth_hive_side", + "east": "betterend:block/moth_hive_side", + "north": "betterend:block/moth_hive_front", + "particle": "betterend:block/moth_hive_side", + "south": "betterend:block/moth_hive_side", + "up": "betterend:block/moth_hive_side", + "west": "betterend:block/moth_hive_side" + } +} diff --git a/src/main/resources/assets/betterend/models/block/silk_moth_hive_silk.json b/src/main/resources/assets/betterend/models/block/silk_moth_hive_silk.json new file mode 100644 index 00000000..3ca4a0d6 --- /dev/null +++ b/src/main/resources/assets/betterend/models/block/silk_moth_hive_silk.json @@ -0,0 +1,12 @@ +{ + "parent": "block/cube", + "textures": { + "down": "betterend:block/moth_hive_side", + "east": "betterend:block/moth_hive_side", + "north": "betterend:block/moth_hive_front_silk", + "particle": "betterend:block/moth_hive_side", + "south": "betterend:block/moth_hive_side", + "up": "betterend:block/moth_hive_side", + "west": "betterend:block/moth_hive_side" + } +} diff --git a/src/main/resources/assets/betterend/models/item/silk_moth_hive.json b/src/main/resources/assets/betterend/models/item/silk_moth_hive.json new file mode 100644 index 00000000..64cd5bc7 --- /dev/null +++ b/src/main/resources/assets/betterend/models/item/silk_moth_hive.json @@ -0,0 +1,3 @@ +{ + "parent": "betterend:block/silk_moth_hive" +} diff --git a/src/main/resources/assets/betterend/textures/block/moth_hive_front.png b/src/main/resources/assets/betterend/textures/block/moth_hive_front.png new file mode 100644 index 0000000000000000000000000000000000000000..78faf2cb82447f3c304131d927c27db574734156 GIT binary patch literal 311 zcmeAS@N?(olHy`uVBq!ia0vp^0wB!73?$#)eFPFj1;yj><+zZGtUZ&C|L{bYuq>I!oLr1f7d-Z|9fix>OCVVf)5S4F;&O7t)~fI8LRZJc zNW{$P-8+Z1wO4Y^^L=v-KmRusZfpJiUvgTe~DWM4fhcn3I$T~Q5GhzyoC zp85^sa~60+7BevL9R^{>5$W?wxu(|GC>i76tirlOJ(tdb(9 zt*vgI4r-N9Thh8qVs~4ik&l5HFE4K?n~_4$93ElCph-NF6@t3J1c&AhJ=PgO)Yv7U q>DcD!;H_?GplO)VbZ4Q81_#64&l)qT-tBG$Im^@4&t;ucLK6UH=25W# literal 0 HcmV?d00001 diff --git a/src/main/resources/assets/betterend/textures/item/silk_moth_matrix.png b/src/main/resources/assets/betterend/textures/item/silk_moth_matrix.png new file mode 100644 index 0000000000000000000000000000000000000000..c87a143654302a9c2dcadc8b86699eb40d7896f4 GIT binary patch literal 424 zcmV;Z0ayNsP)Px$Vo5|nR5*>zl08ntKoCYB2*q-+qK%skR4aFppdw95O2iG|2&AG$6eu-SI6`s- zE&**yTCyqDE6YD}hzLcnl|`n8sb)qqZ@!sb_-os1NmYLwS(Qj#1?@5@Dktm0Vs+Bd(gv+ zEz_s*ChQ7lEk{8$U29!8SAN(Plv#p_t)s>Pc!wQC(8j#I)Xl~i`n?u<6>xNVj@Apz zw;BhqOAVs|=Is^PN|9cUUIi$n@O_{D@RBl1(0bwCz{D1<7lhFOr4*njih_@o=5sj* zrD|0+%@IM{1(aC=fRxhN-xvdF?#4~8;2m}lfYur*WnC=R3-+Ty9ZN5#4BFTw&nBDdFH}dW3Lo!B^^vRG|FAEU%g`3U S>rQ