diff --git a/src/generated/resources/assets/aether_ii/blockstates/brettl_rope.json b/src/generated/resources/assets/aether_ii/blockstates/brettl_rope.json new file mode 100644 index 0000000000..b96c20161e --- /dev/null +++ b/src/generated/resources/assets/aether_ii/blockstates/brettl_rope.json @@ -0,0 +1,142 @@ +{ + "multipart": [ + { + "apply": { + "model": "aether_ii:block/brettl_rope_knot" + }, + "when": { + "rope_knot": "true" + } + }, + { + "apply": { + "model": "aether_ii:block/brettl_rope_spool_floor" + }, + "when": { + "rope_end": "spooled" + } + }, + { + "apply": { + "model": "aether_ii:block/brettl_rope_fray" + }, + "when": { + "rope_end": "frayed" + } + }, + { + "apply": { + "model": "aether_ii:block/brettl_rope_connection_upper" + }, + "when": { + "up": "true" + } + }, + { + "apply": { + "model": "aether_ii:block/brettl_rope_cap_upper" + }, + "when": { + "down": "false", + "up": "true" + } + }, + { + "apply": { + "model": "aether_ii:block/brettl_rope_connection_lower" + }, + "when": { + "down": "true" + } + }, + { + "apply": { + "model": "aether_ii:block/brettl_rope_cap_lower" + }, + "when": { + "down": "true", + "up": "false" + } + }, + { + "apply": { + "model": "aether_ii:block/brettl_rope_connection_upper", + "x": 90 + }, + "when": { + "north": "true" + } + }, + { + "apply": { + "model": "aether_ii:block/brettl_rope_cap_upper", + "x": 90 + }, + "when": { + "north": "true", + "south": "false" + } + }, + { + "apply": { + "model": "aether_ii:block/brettl_rope_connection_upper", + "x": 90, + "y": 90 + }, + "when": { + "east": "true" + } + }, + { + "apply": { + "model": "aether_ii:block/brettl_rope_cap_upper", + "x": 90, + "y": 90 + }, + "when": { + "east": "true", + "west": "false" + } + }, + { + "apply": { + "model": "aether_ii:block/brettl_rope_connection_lower", + "x": 90 + }, + "when": { + "south": "true" + } + }, + { + "apply": { + "model": "aether_ii:block/brettl_rope_cap_lower", + "x": 90 + }, + "when": { + "north": "false", + "south": "true" + } + }, + { + "apply": { + "model": "aether_ii:block/brettl_rope_connection_lower", + "x": 90, + "y": 90 + }, + "when": { + "west": "true" + } + }, + { + "apply": { + "model": "aether_ii:block/brettl_rope_cap_lower", + "x": 90, + "y": 90 + }, + "when": { + "east": "false", + "west": "true" + } + } + ] +} \ No newline at end of file diff --git a/src/generated/resources/assets/aether_ii/blockstates/brettl_rope_stake.json b/src/generated/resources/assets/aether_ii/blockstates/brettl_rope_stake.json new file mode 100644 index 0000000000..7ec06a0152 --- /dev/null +++ b/src/generated/resources/assets/aether_ii/blockstates/brettl_rope_stake.json @@ -0,0 +1,238 @@ +{ + "multipart": [ + { + "apply": { + "model": "aether_ii:block/brettl_rope_stake_short", + "x": 180 + }, + "when": { + "facing": "up" + } + }, + { + "apply": { + "model": "aether_ii:block/brettl_rope_stake" + }, + "when": { + "facing": "down" + } + }, + { + "apply": { + "model": "aether_ii:block/brettl_rope_stake", + "x": 90, + "y": 180 + }, + "when": { + "facing": "north" + } + }, + { + "apply": { + "model": "aether_ii:block/brettl_rope_stake", + "x": 90, + "y": 270 + }, + "when": { + "facing": "east" + } + }, + { + "apply": { + "model": "aether_ii:block/brettl_rope_stake", + "x": 90 + }, + "when": { + "facing": "south" + } + }, + { + "apply": { + "model": "aether_ii:block/brettl_rope_stake", + "x": 90, + "y": 90 + }, + "when": { + "facing": "west" + } + }, + { + "apply": { + "model": "aether_ii:block/brettl_rope_knot" + }, + "when": { + "facing": "up" + } + }, + { + "apply": { + "model": "aether_ii:block/brettl_rope_knot" + }, + "when": { + "facing": "down" + } + }, + { + "apply": { + "model": "aether_ii:block/brettl_rope_knot", + "x": 90, + "y": 180 + }, + "when": { + "facing": "north" + } + }, + { + "apply": { + "model": "aether_ii:block/brettl_rope_knot", + "x": 90, + "y": 270 + }, + "when": { + "facing": "east" + } + }, + { + "apply": { + "model": "aether_ii:block/brettl_rope_knot", + "x": 90 + }, + "when": { + "facing": "south" + } + }, + { + "apply": { + "model": "aether_ii:block/brettl_rope_knot", + "x": 90, + "y": 90 + }, + "when": { + "facing": "west" + } + }, + { + "apply": { + "model": "aether_ii:block/brettl_rope_spool_middle" + }, + "when": { + "facing": "up", + "stake_spool": "center" + } + }, + { + "apply": { + "model": "aether_ii:block/brettl_rope_spool_middle" + }, + "when": { + "facing": "down", + "stake_spool": "center" + } + }, + { + "apply": { + "model": "aether_ii:block/brettl_rope_spool_middle", + "x": 90, + "y": 180 + }, + "when": { + "facing": "north", + "stake_spool": "center" + } + }, + { + "apply": { + "model": "aether_ii:block/brettl_rope_spool_middle", + "x": 90, + "y": 270 + }, + "when": { + "facing": "east", + "stake_spool": "center" + } + }, + { + "apply": { + "model": "aether_ii:block/brettl_rope_spool_middle", + "x": 90 + }, + "when": { + "facing": "south", + "stake_spool": "center" + } + }, + { + "apply": { + "model": "aether_ii:block/brettl_rope_spool_middle", + "x": 90, + "y": 90 + }, + "when": { + "facing": "west", + "stake_spool": "center" + } + }, + { + "apply": { + "model": "aether_ii:block/brettl_rope_connection_lower" + }, + "when": { + "facing": "up", + "stake_spool": "floor|none_connected" + } + }, + { + "apply": { + "model": "aether_ii:block/brettl_rope_connection_spool_floor" + }, + "when": { + "facing": "down", + "stake_spool": "floor" + } + }, + { + "apply": { + "model": "aether_ii:block/brettl_rope_connection_lower" + }, + "when": { + "facing": "north", + "stake_spool": "floor|none_connected" + } + }, + { + "apply": { + "model": "aether_ii:block/brettl_rope_connection_lower" + }, + "when": { + "facing": "east", + "stake_spool": "floor|none_connected" + } + }, + { + "apply": { + "model": "aether_ii:block/brettl_rope_connection_lower" + }, + "when": { + "facing": "south", + "stake_spool": "floor|none_connected" + } + }, + { + "apply": { + "model": "aether_ii:block/brettl_rope_connection_lower" + }, + "when": { + "facing": "west", + "stake_spool": "floor|none_connected" + } + }, + { + "apply": { + "model": "aether_ii:block/brettl_rope_spool_floor" + }, + "when": { + "stake_spool": "floor" + } + } + ] +} \ No newline at end of file diff --git a/src/generated/resources/assets/aether_ii/items/brettl_rope_bolt.json b/src/generated/resources/assets/aether_ii/items/brettl_rope_bolt.json new file mode 100644 index 0000000000..e0ddaa5abc --- /dev/null +++ b/src/generated/resources/assets/aether_ii/items/brettl_rope_bolt.json @@ -0,0 +1,6 @@ +{ + "model": { + "type": "minecraft:model", + "model": "aether_ii:item/brettl_rope_bolt" + } +} \ No newline at end of file diff --git a/src/generated/resources/assets/aether_ii/items/brettl_rope_stake.json b/src/generated/resources/assets/aether_ii/items/brettl_rope_stake.json new file mode 100644 index 0000000000..049ccd03c2 --- /dev/null +++ b/src/generated/resources/assets/aether_ii/items/brettl_rope_stake.json @@ -0,0 +1,6 @@ +{ + "model": { + "type": "minecraft:model", + "model": "aether_ii:item/brettl_rope_stake" + } +} \ No newline at end of file diff --git a/src/generated/resources/assets/aether_ii/lang/en_us.json b/src/generated/resources/assets/aether_ii/lang/en_us.json index f4ad931bcd..086ff49c1e 100644 --- a/src/generated/resources/assets/aether_ii/lang/en_us.json +++ b/src/generated/resources/assets/aether_ii/lang/en_us.json @@ -425,6 +425,8 @@ "block.aether_ii.brettl_grass_bundle": "Brettl Grass Bundle", "block.aether_ii.brettl_plant": "Brettl Plant", "block.aether_ii.brettl_plant_tip": "Brettl Plant Tip", + "block.aether_ii.brettl_rope": "Brettl Rope", + "block.aether_ii.brettl_rope_stake": "Climbing Rope", "block.aether_ii.brexallen_vase": "Brexallen Vase", "block.aether_ii.brown_arilum_lantern": "Brown Arilum Lantern", "block.aether_ii.brown_cloudwool": "Brown Cloudwool", @@ -997,6 +999,7 @@ "entity.aether_ii.arkenium_taluton": "Arkenium Taluton", "entity.aether_ii.bladeshroom_hunter": "Bladeshroom Hunter", "entity.aether_ii.blue_swet": "Blue Swet", + "entity.aether_ii.brettl_rope_bolt": "Climbing Rope Bolt", "entity.aether_ii.carrion_sprout": "Carrion Sprout", "entity.aether_ii.cockatrice": "Cockatrice", "entity.aether_ii.detonation_projectile": "Detonation Projectile", @@ -1179,7 +1182,7 @@ "item.aether_ii.blueberry_moa_feed": "Blueberry Moa Feed", "item.aether_ii.brettl_cane": "Brettl Cane", "item.aether_ii.brettl_grass": "Brettl Grass", - "item.aether_ii.brettl_rope": "Brettl Rope", + "item.aether_ii.brettl_rope_bolt": "Climbing Rope Bolt", "item.aether_ii.broken_item": "Broken Item", "item.aether_ii.broken_item_template": "Broken %s", "item.aether_ii.burrukai_plate": "Burrukai Plate", diff --git a/src/generated/resources/assets/aether_ii/models/item/brettl_rope_bolt.json b/src/generated/resources/assets/aether_ii/models/item/brettl_rope_bolt.json new file mode 100644 index 0000000000..7dcbf13d4c --- /dev/null +++ b/src/generated/resources/assets/aether_ii/models/item/brettl_rope_bolt.json @@ -0,0 +1,6 @@ +{ + "parent": "minecraft:item/generated", + "textures": { + "layer0": "aether_ii:item/brettl_rope_bolt" + } +} \ No newline at end of file diff --git a/src/generated/resources/assets/aether_ii/models/item/brettl_rope_stake.json b/src/generated/resources/assets/aether_ii/models/item/brettl_rope_stake.json new file mode 100644 index 0000000000..8eab36f721 --- /dev/null +++ b/src/generated/resources/assets/aether_ii/models/item/brettl_rope_stake.json @@ -0,0 +1,6 @@ +{ + "parent": "aether_ii:item/mirrored_flat_item", + "textures": { + "layer0": "aether_ii:item/brettl_rope_stake" + } +} \ No newline at end of file diff --git a/src/generated/resources/data/aether_ii/advancement/recipes/misc/brettl_rope_bolt.json b/src/generated/resources/data/aether_ii/advancement/recipes/misc/brettl_rope_bolt.json new file mode 100644 index 0000000000..c80afc9dc7 --- /dev/null +++ b/src/generated/resources/data/aether_ii/advancement/recipes/misc/brettl_rope_bolt.json @@ -0,0 +1,32 @@ +{ + "parent": "minecraft:recipes/root", + "criteria": { + "has_brettl_rope_stake": { + "conditions": { + "items": [ + { + "items": "aether_ii:brettl_rope_stake" + } + ] + }, + "trigger": "minecraft:inventory_changed" + }, + "has_the_recipe": { + "conditions": { + "recipe": "aether_ii:brettl_rope_bolt" + }, + "trigger": "minecraft:recipe_unlocked" + } + }, + "requirements": [ + [ + "has_the_recipe", + "has_brettl_rope_stake" + ] + ], + "rewards": { + "recipes": [ + "aether_ii:brettl_rope_bolt" + ] + } +} \ No newline at end of file diff --git a/src/generated/resources/data/aether_ii/advancement/recipes/misc/brettl_rope_stake.json b/src/generated/resources/data/aether_ii/advancement/recipes/misc/brettl_rope_stake.json new file mode 100644 index 0000000000..3525768471 --- /dev/null +++ b/src/generated/resources/data/aether_ii/advancement/recipes/misc/brettl_rope_stake.json @@ -0,0 +1,32 @@ +{ + "parent": "minecraft:recipes/root", + "criteria": { + "has_brettl_rope": { + "conditions": { + "items": [ + { + "items": "aether_ii:brettl_rope" + } + ] + }, + "trigger": "minecraft:inventory_changed" + }, + "has_the_recipe": { + "conditions": { + "recipe": "aether_ii:brettl_rope_stake" + }, + "trigger": "minecraft:recipe_unlocked" + } + }, + "requirements": [ + [ + "has_the_recipe", + "has_brettl_rope" + ] + ], + "rewards": { + "recipes": [ + "aether_ii:brettl_rope_stake" + ] + } +} \ No newline at end of file diff --git a/src/generated/resources/data/aether_ii/loot_table/blocks/brettl_rope.json b/src/generated/resources/data/aether_ii/loot_table/blocks/brettl_rope.json new file mode 100644 index 0000000000..03ce84e463 --- /dev/null +++ b/src/generated/resources/data/aether_ii/loot_table/blocks/brettl_rope.json @@ -0,0 +1,4 @@ +{ + "type": "minecraft:block", + "random_sequence": "aether_ii:blocks/brettl_rope" +} \ No newline at end of file diff --git a/src/generated/resources/data/aether_ii/loot_table/blocks/brettl_rope_stake.json b/src/generated/resources/data/aether_ii/loot_table/blocks/brettl_rope_stake.json new file mode 100644 index 0000000000..6825903f50 --- /dev/null +++ b/src/generated/resources/data/aether_ii/loot_table/blocks/brettl_rope_stake.json @@ -0,0 +1,30 @@ +{ + "type": "minecraft:block", + "pools": [ + { + "bonus_rolls": 0.0, + "conditions": [ + { + "condition": "minecraft:survives_explosion" + } + ], + "entries": [ + { + "type": "minecraft:item", + "conditions": [ + { + "block": "aether_ii:brettl_rope_stake", + "condition": "minecraft:block_state_property", + "properties": { + "stake_spool": "center" + } + } + ], + "name": "aether_ii:brettl_rope_stake" + } + ], + "rolls": 1.0 + } + ], + "random_sequence": "aether_ii:blocks/brettl_rope_stake" +} \ No newline at end of file diff --git a/src/generated/resources/data/aether_ii/recipe/brettl_rope_bolt.json b/src/generated/resources/data/aether_ii/recipe/brettl_rope_bolt.json new file mode 100644 index 0000000000..db8ce666bb --- /dev/null +++ b/src/generated/resources/data/aether_ii/recipe/brettl_rope_bolt.json @@ -0,0 +1,11 @@ +{ + "type": "minecraft:crafting_shapeless", + "category": "misc", + "ingredients": [ + "aether_ii:scatterglass_bolt", + "aether_ii:brettl_rope_stake" + ], + "result": { + "id": "aether_ii:brettl_rope_bolt" + } +} \ No newline at end of file diff --git a/src/generated/resources/data/aether_ii/recipe/brettl_rope_stake.json b/src/generated/resources/data/aether_ii/recipe/brettl_rope_stake.json new file mode 100644 index 0000000000..92101da022 --- /dev/null +++ b/src/generated/resources/data/aether_ii/recipe/brettl_rope_stake.json @@ -0,0 +1,17 @@ +{ + "type": "minecraft:crafting_shaped", + "category": "misc", + "key": { + "#": "aether_ii:brettl_rope", + "/": "aether_ii:skyroot_stick" + }, + "pattern": [ + "#/", + "# ", + "# " + ], + "result": { + "count": 4, + "id": "aether_ii:brettl_rope_stake" + } +} \ No newline at end of file diff --git a/src/generated/resources/data/aether_ii/tags/entity_type/aether_mobs.json b/src/generated/resources/data/aether_ii/tags/entity_type/aether_mobs.json index c35a97656f..538bc75bd2 100644 --- a/src/generated/resources/data/aether_ii/tags/entity_type/aether_mobs.json +++ b/src/generated/resources/data/aether_ii/tags/entity_type/aether_mobs.json @@ -38,6 +38,7 @@ "aether_ii:prismallard_egg", "aether_ii:lasso_loop", "aether_ii:scatterglass_bolt", + "aether_ii:brettl_rope_bolt", "aether_ii:amber_dart", "aether_ii:toxic_dart", "aether_ii:zephyr_webbing_ball", diff --git a/src/generated/resources/data/aether_ii/tags/item/crossbow_ammo.json b/src/generated/resources/data/aether_ii/tags/item/crossbow_ammo.json new file mode 100644 index 0000000000..e25382eda8 --- /dev/null +++ b/src/generated/resources/data/aether_ii/tags/item/crossbow_ammo.json @@ -0,0 +1,6 @@ +{ + "values": [ + "aether_ii:scatterglass_bolt", + "aether_ii:brettl_rope_bolt" + ] +} \ No newline at end of file diff --git a/src/generated/resources/data/minecraft/tags/block/wooden_slabs.json b/src/generated/resources/data/minecraft/tags/block/wooden_slabs.json index d7c1e27ac6..6f7a2ccc75 100644 --- a/src/generated/resources/data/minecraft/tags/block/wooden_slabs.json +++ b/src/generated/resources/data/minecraft/tags/block/wooden_slabs.json @@ -3,6 +3,7 @@ "aether_ii:skyroot_slab", "aether_ii:greatroot_slab", "aether_ii:wisproot_slab", - "aether_ii:wisproot_slab" + "aether_ii:wisproot_slab", + "aether_ii:amberoot_slab" ] } \ No newline at end of file diff --git a/src/generated/resources/data/minecraft/tags/entity_type/arrows.json b/src/generated/resources/data/minecraft/tags/entity_type/arrows.json index cebc73966a..fb23131ccd 100644 --- a/src/generated/resources/data/minecraft/tags/entity_type/arrows.json +++ b/src/generated/resources/data/minecraft/tags/entity_type/arrows.json @@ -1,6 +1,7 @@ { "values": [ "aether_ii:scatterglass_bolt", + "aether_ii:brettl_rope_bolt", "aether_ii:amber_dart" ] } \ No newline at end of file diff --git a/src/generated/resources/data/minecraft/tags/item/wooden_slabs.json b/src/generated/resources/data/minecraft/tags/item/wooden_slabs.json index d7c1e27ac6..6f7a2ccc75 100644 --- a/src/generated/resources/data/minecraft/tags/item/wooden_slabs.json +++ b/src/generated/resources/data/minecraft/tags/item/wooden_slabs.json @@ -3,6 +3,7 @@ "aether_ii:skyroot_slab", "aether_ii:greatroot_slab", "aether_ii:wisproot_slab", - "aether_ii:wisproot_slab" + "aether_ii:wisproot_slab", + "aether_ii:amberoot_slab" ] } \ No newline at end of file diff --git a/src/main/java/com/aetherteam/aetherii/AetherIITags.java b/src/main/java/com/aetherteam/aetherii/AetherIITags.java index ca0b2acc1c..9449391b19 100644 --- a/src/main/java/com/aetherteam/aetherii/AetherIITags.java +++ b/src/main/java/com/aetherteam/aetherii/AetherIITags.java @@ -278,6 +278,7 @@ public static class Items { public static final TagKey IRRADIATED_ITEM = tag("irradiated_item"); public static final TagKey ENGRAVED_DISCS = tag("engraved_discs"); public static final TagKey ALKAHEST_RESISTANT_ITEM = tag("alkahest_resistant_item"); + public static final TagKey CROSSBOW_AMMO = tag("crossbow_ammo"); public static final TagKey PLANT_DAMAGING_ITEMS = tag("plant_damaging_items"); public static final TagKey SLIDER_DAMAGING_ITEMS = tag("slider_damaging_items"); public static final TagKey UNBREAKABLE_LOOT = tag("unbreakable_loot"); diff --git a/src/main/java/com/aetherteam/aetherii/block/AetherIIBlockStateProperties.java b/src/main/java/com/aetherteam/aetherii/block/AetherIIBlockStateProperties.java index 733a1b5e7c..8af83c6cf0 100644 --- a/src/main/java/com/aetherteam/aetherii/block/AetherIIBlockStateProperties.java +++ b/src/main/java/com/aetherteam/aetherii/block/AetherIIBlockStateProperties.java @@ -19,6 +19,9 @@ public class AetherIIBlockStateProperties { public static final BooleanProperty BRETTL_GROWN = BooleanProperty.create("grown"); public static final BooleanProperty EMPTY = BooleanProperty.create("empty"); public static final BooleanProperty IGNITED = BooleanProperty.create("ignited"); + public static final BooleanProperty ROPE_KNOT = BooleanProperty.create("rope_knot"); + public static final EnumProperty ROPE_END = EnumProperty.create("rope_end", RopeEndState.class); + public static final EnumProperty STAKE_SPOOL = EnumProperty.create("stake_spool", StakeSpoolState.class); public enum Mossy implements StringRepresentable { BRYALINN, @@ -56,4 +59,27 @@ public String getSerializedName() { return this.name().toLowerCase(Locale.ROOT); } } + + public enum StakeSpoolState implements StringRepresentable { + NONE, + NONE_CONNECTED, + CENTER, + FLOOR; + + @Override + public String getSerializedName() { + return this.name().toLowerCase(Locale.ROOT); + } + } + + public enum RopeEndState implements StringRepresentable { + NONE, + SPOOLED, + FRAYED; + + @Override + public String getSerializedName() { + return this.name().toLowerCase(Locale.ROOT); + } + } } \ No newline at end of file diff --git a/src/main/java/com/aetherteam/aetherii/block/AetherIIBlocks.java b/src/main/java/com/aetherteam/aetherii/block/AetherIIBlocks.java index 1666156a8b..c3c6f04462 100644 --- a/src/main/java/com/aetherteam/aetherii/block/AetherIIBlocks.java +++ b/src/main/java/com/aetherteam/aetherii/block/AetherIIBlocks.java @@ -740,6 +740,8 @@ public class AetherIIBlocks extends AetherIIBlockBuilders { public static final DeferredBlock SKYROOT_CHEST = register("skyroot_chest", (properties) -> new SkyrootChestBlock(properties, AetherIIBlockEntityTypes.SKYROOT_CHEST::get), () -> Block.Properties.ofFullCopy(Blocks.CHEST)); public static final DeferredBlock SKYROOT_BARREL = register("skyroot_barrel", BarrelBlock::new, () -> Block.Properties.ofFullCopy(Blocks.BARREL)); public static final DeferredBlock SKYROOT_LADDER = register("skyroot_ladder", LadderBlock::new, () -> Block.Properties.ofFullCopy(Blocks.LADDER).strength(0.4F).sound(SoundType.LADDER).noOcclusion()); + public static final DeferredBlock BRETTL_ROPE_STAKE = register("brettl_rope_stake", RopeStakeBlock::new, () -> Block.Properties.of().mapColor(MapColor.COLOR_BROWN).instrument(NoteBlockInstrument.GUITAR).strength(2.0F).sound(SoundType.WOOL), AetherIIBlocks.brettlRopeStakeItem()); + public static final DeferredBlock BRETTL_ROPE = register("brettl_rope", RopeBlock::new, () -> Block.Properties.of().mapColor(MapColor.COLOR_BROWN).instrument(NoteBlockInstrument.GUITAR).strength(0.2F).sound(SoundType.WOOL).ignitedByLava()); public static final DeferredBlock CLOUDWOOL_BEDROLL = register("cloudwool_bedroll", BedrollBlock::new, () -> Block.Properties.of().mapColor(MapColor.WOOL).sound(SoundType.WOOL).strength(0.2F).noOcclusion().ignitedByLava().pushReaction(PushReaction.DESTROY), AetherIIBlocks.bedrollBlockItem()); public static final DeferredBlock SKYROOT_BED = register("skyroot_bed", (properties) -> new SkyrootBedBlock(DyeColor.WHITE, properties), () -> Block.Properties.ofFullCopy(Blocks.WHITE_BED), AetherIIBlocks.bedBlockItem()); @@ -925,6 +927,10 @@ private static BiFunction stan return (standingBlock, properties) -> new StandingAndWallBlockItem(standingBlock, Objects.requireNonNull(wallBlock.get().get()), attachmentDirection, properties); } + private static BiFunction brettlRopeStakeItem() { + return (block, properties) -> new BlockItem(block, properties.stacksTo(16)); + } + private static BiFunction bedrollBlockItem() { return (bedrollBlock, properties) -> new BedItem(bedrollBlock, properties.stacksTo(4)); } diff --git a/src/main/java/com/aetherteam/aetherii/block/utility/RopeBlock.java b/src/main/java/com/aetherteam/aetherii/block/utility/RopeBlock.java new file mode 100644 index 0000000000..2b1e517aea --- /dev/null +++ b/src/main/java/com/aetherteam/aetherii/block/utility/RopeBlock.java @@ -0,0 +1,276 @@ +package com.aetherteam.aetherii.block.utility; + +import com.aetherteam.aetherii.block.AetherIIBlockStateProperties; +import com.aetherteam.aetherii.block.AetherIIBlocks; +import net.minecraft.core.BlockPos; +import net.minecraft.core.Direction; +import net.minecraft.server.level.ServerLevel; +import net.minecraft.tags.FluidTags; +import net.minecraft.util.RandomSource; +import net.minecraft.world.InteractionResult; +import net.minecraft.world.entity.LivingEntity; +import net.minecraft.world.entity.player.Player; +import net.minecraft.world.item.context.BlockPlaceContext; +import net.minecraft.world.level.*; +import net.minecraft.world.level.block.*; +import net.minecraft.world.level.block.state.BlockState; +import net.minecraft.world.level.block.state.StateDefinition; +import net.minecraft.world.level.block.state.properties.BlockStateProperties; +import net.minecraft.world.level.block.state.properties.BooleanProperty; +import net.minecraft.world.level.block.state.properties.EnumProperty; +import net.minecraft.world.level.material.FluidState; +import net.minecraft.world.level.material.Fluids; +import net.minecraft.world.phys.BlockHitResult; +import net.minecraft.world.phys.shapes.CollisionContext; +import net.minecraft.world.phys.shapes.Shapes; +import net.minecraft.world.phys.shapes.VoxelShape; + +import java.util.ArrayList; +import java.util.List; +import java.util.Map; +import java.util.function.Function; + +public class RopeBlock extends Block implements SimpleWaterloggedBlock { + public static final EnumProperty END = AetherIIBlockStateProperties.ROPE_END; + public static final BooleanProperty KNOT = AetherIIBlockStateProperties.ROPE_KNOT; + public static final BooleanProperty UP = BlockStateProperties.UP; + public static final BooleanProperty DOWN = BlockStateProperties.DOWN; + public static final BooleanProperty NORTH = BlockStateProperties.NORTH; + public static final BooleanProperty EAST = BlockStateProperties.EAST; + public static final BooleanProperty SOUTH = BlockStateProperties.SOUTH; + public static final BooleanProperty WEST = BlockStateProperties.WEST; + public static final BooleanProperty WATERLOGGED = BlockStateProperties.WATERLOGGED; + public static final Map PROPERTY_BY_DIRECTION = PipeBlock.PROPERTY_BY_DIRECTION; + public static final Map SHAPE_CONNECTIONS = Shapes.rotateAll(Block.box(6, 6, 0, 10, 10, 8)); + public static final Map SHAPE_OCCLUSION_CONNECTIONS = Shapes.rotateAll(Block.box(7, 7, 0, 9, 9, 8)); + public static final VoxelShape SHAPE_KNOT = Block.box(6, 6, 6, 10, 10, 10); + public static final VoxelShape SHAPE_FLOOR_SPOOL = Block.box(4, 0, 4, 12, 2, 12); + public static final int DELAY = 4; + private final Function shapes; + private final Function collisionShapes; + private final Function occlusionShapes; + + public RopeBlock(Properties properties) { + super(properties); + this.registerDefaultState(this.stateDefinition.any().setValue(END, AetherIIBlockStateProperties.RopeEndState.NONE).setValue(KNOT, false).setValue(UP, false).setValue(DOWN, false).setValue(NORTH, false).setValue(EAST, false).setValue(SOUTH, false).setValue(WEST, false).setValue(WATERLOGGED, false)); + this.shapes = this.makeShapes(); + this.collisionShapes = this.makeCollisionShapes(); + this.occlusionShapes = this.makeOcclusionShapes(); + } + + private Function makeShapes() { + return this.getShapeForEachState((state) -> { + VoxelShape shape = Shapes.empty(); + for (Map.Entry entry : PROPERTY_BY_DIRECTION.entrySet()) { + if (state.getValue(entry.getValue())) { + shape = Shapes.or(shape, SHAPE_CONNECTIONS.get(entry.getKey())); + } + } + if (state.getValue(KNOT)) { + shape = Shapes.or(shape, SHAPE_KNOT); + } + if (state.getValue(END) == AetherIIBlockStateProperties.RopeEndState.SPOOLED) { + shape = Shapes.or(shape, SHAPE_FLOOR_SPOOL); + } + return shape; + }, WATERLOGGED); + } + + private Function makeCollisionShapes() { + return this.getShapeForEachState((state) -> { + VoxelShape shape = Shapes.empty(); + for (Map.Entry entry : PROPERTY_BY_DIRECTION.entrySet()) { + if (entry.getKey().getAxis().getPlane() == Direction.Plane.HORIZONTAL && state.getValue(entry.getValue())) { + shape = Shapes.or(shape, SHAPE_CONNECTIONS.get(entry.getKey())); + } + } + if (state.getValue(KNOT)) { + shape = Shapes.or(shape, SHAPE_KNOT); + } + return shape; + }, WATERLOGGED); + } + + private Function makeOcclusionShapes() { + return this.getShapeForEachState((state) -> { + VoxelShape shape = Shapes.empty(); + for (Map.Entry entry : PROPERTY_BY_DIRECTION.entrySet()) { + if (state.getValue(entry.getValue())) { + shape = Shapes.or(shape, SHAPE_OCCLUSION_CONNECTIONS.get(entry.getKey())); + } + } + return shape; + }, WATERLOGGED); + } + + @Override + protected InteractionResult useWithoutItem(BlockState state, Level level, BlockPos pos, Player player, BlockHitResult hitResult) { + boolean canUnknot = false; + List directionStates = this.getDirectionStates(state); + for (Direction entry : directionStates) { + if (directionStates.contains(entry.getOpposite()) && directionStates.size() == 2) { + canUnknot = true; + break; + } + } + if (state.getValue(KNOT) && canUnknot) { + level.setBlock(pos, state.setValue(KNOT, false), 1 | 2); + return InteractionResult.SUCCESS; + } else if (!state.getValue(KNOT)) { + BlockState newState = state.setValue(KNOT, true).setValue(END, AetherIIBlockStateProperties.RopeEndState.NONE); + for (Map.Entry entry : PROPERTY_BY_DIRECTION.entrySet()) { + if (!newState.getValue(entry.getValue())) { + BlockPos neighborPos = pos.relative(entry.getKey()); + BlockState neighborState = level.getBlockState(neighborPos); + newState = newState.setValue(entry.getValue(), neighborState.isFaceSturdy(level, neighborPos, entry.getKey().getOpposite(), SupportType.CENTER)); + } + } + level.setBlock(pos, newState, 1 | 2); + return InteractionResult.SUCCESS; + } + return super.useWithoutItem(state, level, pos, player, hitResult); + } + + @Override + protected void tick(BlockState state, ServerLevel level, BlockPos pos, RandomSource random) { + BlockPos belowPos = pos.below(); + BlockState belowState = level.getBlockState(belowPos); + if (!belowState.isFaceSturdy(level, belowPos, Direction.UP) && !belowState.isSolid()) { + if (RopeStakeBlock.checkForStake(level, pos)) { + RopeBlock.placeRope(level, belowPos, AetherIIBlocks.BRETTL_ROPE.get().defaultBlockState().setValue(RopeBlock.UP, true)); + } else { + level.setBlock(pos, state.setValue(END, AetherIIBlockStateProperties.RopeEndState.FRAYED), 1 | 2); + } + } else { + level.setBlock(pos, state.setValue(RopeBlock.DOWN, true).setValue(END, AetherIIBlockStateProperties.RopeEndState.SPOOLED), 1 | 2); + } + } + + @Override + public void destroy(LevelAccessor level, BlockPos pos, BlockState state) { + BlockPos abovePos = pos.above(); + BlockState aboveState = level.getBlockState(abovePos); + if (aboveState.is(this) && !aboveState.getValue(KNOT)) { + level.setBlock(abovePos, aboveState.setValue(END, AetherIIBlockStateProperties.RopeEndState.FRAYED), 1 | 2); + } else if (aboveState.is(AetherIIBlocks.BRETTL_ROPE_STAKE) && aboveState.getValue(RopeStakeBlock.SPOOL) == AetherIIBlockStateProperties.StakeSpoolState.NONE_CONNECTED) { + level.setBlock(abovePos, aboveState.setValue(RopeStakeBlock.SPOOL, AetherIIBlockStateProperties.StakeSpoolState.NONE), 1 | 2); + } + } + + @Override + protected BlockState updateShape(BlockState state, LevelReader levelReader, ScheduledTickAccess scheduledTickAccess, BlockPos pos, Direction direction, BlockPos neighborPos, BlockState neighborState, RandomSource randomSource) { + if (state.getValue(WATERLOGGED)) { + scheduledTickAccess.scheduleTick(pos, Fluids.WATER, Fluids.WATER.getTickDelay(levelReader)); + } + if (!state.getValue(KNOT)) { + if (state.getValue(PROPERTY_BY_DIRECTION.get(direction)) && neighborState.isEmpty()) { + if (direction == Direction.UP || (direction.getAxis().getPlane() == Direction.Plane.HORIZONTAL && !neighborState.isFaceSturdy(levelReader, pos.relative(direction), direction.getOpposite(), SupportType.CENTER))) { + return Blocks.AIR.defaultBlockState(); + } + } + } + if ((state.getValue(KNOT) && (neighborState.getValueOrElse(KNOT, true) || this.getExistingConnectionAxis(neighborState) == direction.getAxis())) || this.getExistingConnectionAxis(state) == direction.getAxis()) { + if (state.getValue(END) == AetherIIBlockStateProperties.RopeEndState.SPOOLED) { + scheduledTickAccess.scheduleTick(pos, this, DELAY); + } + state = state.setValue(PROPERTY_BY_DIRECTION.get(direction), neighborState.isFaceSturdy(levelReader, neighborPos, direction.getOpposite(), SupportType.CENTER) || neighborState.is(this)).setValue(END, AetherIIBlockStateProperties.RopeEndState.NONE); + } + return state; + } + + @Override + public BlockState getStateForPlacement(BlockPlaceContext context) { + Level level = context.getLevel(); + BlockPos pos = context.getClickedPos(); + FluidState fluidState = level.getFluidState(pos); + BlockState blockState = this.defaultBlockState().setValue(KNOT, true); + for (Map.Entry entry : PROPERTY_BY_DIRECTION.entrySet()) { + BlockPos neighborPos = pos.relative(entry.getKey()); + BlockState neighborState = level.getBlockState(neighborPos); + blockState = blockState.setValue(entry.getValue(), neighborState.isFaceSturdy(level, neighborPos, entry.getKey().getOpposite(), SupportType.CENTER)); + } + return blockState.setValue(WATERLOGGED, fluidState.is(Fluids.WATER)); + } + + @Override + protected FluidState getFluidState(BlockState state) { + return state.getValue(WATERLOGGED) ? Fluids.WATER.getSource(false) : super.getFluidState(state); + } + + @Override + protected void createBlockStateDefinition(StateDefinition.Builder builder) { + builder.add(END, KNOT, UP, DOWN, NORTH, EAST, SOUTH, WEST, WATERLOGGED); + } + + private Direction.Axis getExistingConnectionAxis(BlockState state) { + Direction.Axis axis = null; + for (Map.Entry entry : PROPERTY_BY_DIRECTION.entrySet()) { + if (state.getValueOrElse(entry.getValue(), false)) { + axis = entry.getKey().getAxis(); + } + } + return axis; + } + + private List getDirectionStates(BlockState state) { + List directions = new ArrayList<>(); + for (Map.Entry entry : PROPERTY_BY_DIRECTION.entrySet()) { + if (state.getValueOrElse(entry.getValue(), false)) { + directions.add(entry.getKey()); + } + } + return directions; + } + + @Override + protected VoxelShape getShape(BlockState state, BlockGetter level, BlockPos pos, CollisionContext context) { + return this.shapes.apply(state); + } + + @Override + protected VoxelShape getCollisionShape(BlockState state, BlockGetter level, BlockPos pos, CollisionContext context) { + VoxelShape shape = this.collisionShapes.apply(state); + if (context.isAbove(shape, pos, true) && !context.isDescending()) { + return shape; + } else { + return Shapes.empty(); + } + } + + @Override + protected VoxelShape getOcclusionShape(BlockState state) { + return this.occlusionShapes.apply(state); + } + + @Override + protected float getShadeBrightness(BlockState state, BlockGetter level, BlockPos pos) { + return 1.0F; + } + + @Override + protected boolean propagatesSkylightDown(BlockState state) { + return true; + } + + @Override + public boolean isLadder(BlockState state, LevelReader level, BlockPos pos, LivingEntity entity) { + return true; + } + + @Override + public boolean isScaffolding(BlockState state, LevelReader level, BlockPos pos, LivingEntity entity) { + return true; + } + + public static void placeRope(Level level, BlockPos pos, BlockState state) { + BlockState existingBlock = level.getBlockState(pos); + if (!existingBlock.is(state.getBlock())) { + if (existingBlock.getFluidState().is(FluidTags.WATER)) { + state = state.setValue(WATERLOGGED, true); + } + level.destroyBlock(pos, true); + level.setBlock(pos, state, 1 | 2); + } + level.scheduleTick(pos, state.getBlock(), RopeBlock.DELAY); + } +} diff --git a/src/main/java/com/aetherteam/aetherii/block/utility/RopeStakeBlock.java b/src/main/java/com/aetherteam/aetherii/block/utility/RopeStakeBlock.java new file mode 100644 index 0000000000..7bb0c96770 --- /dev/null +++ b/src/main/java/com/aetherteam/aetherii/block/utility/RopeStakeBlock.java @@ -0,0 +1,199 @@ +package com.aetherteam.aetherii.block.utility; + +import com.aetherteam.aetherii.block.AetherIIBlockStateProperties; +import com.aetherteam.aetherii.block.AetherIIBlocks; +import net.minecraft.core.BlockPos; +import net.minecraft.core.Direction; +import net.minecraft.server.level.ServerLevel; +import net.minecraft.util.RandomSource; +import net.minecraft.world.InteractionResult; +import net.minecraft.world.entity.LivingEntity; +import net.minecraft.world.entity.player.Player; +import net.minecraft.world.item.context.BlockPlaceContext; +import net.minecraft.world.level.BlockGetter; +import net.minecraft.world.level.Level; +import net.minecraft.world.level.LevelReader; +import net.minecraft.world.level.ScheduledTickAccess; +import net.minecraft.world.level.block.Block; +import net.minecraft.world.level.block.Blocks; +import net.minecraft.world.level.block.SimpleWaterloggedBlock; +import net.minecraft.world.level.block.SupportType; +import net.minecraft.world.level.block.state.BlockState; +import net.minecraft.world.level.block.state.StateDefinition; +import net.minecraft.world.level.block.state.properties.BlockStateProperties; +import net.minecraft.world.level.block.state.properties.BooleanProperty; +import net.minecraft.world.level.block.state.properties.EnumProperty; +import net.minecraft.world.level.material.FluidState; +import net.minecraft.world.level.material.Fluids; +import net.minecraft.world.phys.BlockHitResult; +import net.minecraft.world.phys.shapes.CollisionContext; +import net.minecraft.world.phys.shapes.Shapes; +import net.minecraft.world.phys.shapes.VoxelShape; + +import java.util.Map; +import java.util.function.Function; + +public class RopeStakeBlock extends Block implements SimpleWaterloggedBlock { + public static final EnumProperty CONNECTION = BlockStateProperties.FACING; + public static final EnumProperty SPOOL = AetherIIBlockStateProperties.STAKE_SPOOL; + public static final BooleanProperty WATERLOGGED = BlockStateProperties.WATERLOGGED; + public static final Map SHAPE_STAKES = Shapes.rotateAll(Block.box(6, 6, 0, 10, 10, 13)); + public static final Map SHAPE_OCCLUSION_STAKES = Shapes.rotateAll(Block.box(7, 7, 0, 9, 9, 13)); + public static final Map SHAPE_CENTER_SPOOLS = Shapes.rotateAll(Block.box(4, 4, 7, 12, 12, 9)); + public static final VoxelShape SHAPE_CONNECTION = Block.box(6, 0, 6, 10, 8, 10); + public static final VoxelShape SHAPE_FLOOR_SPOOL = Block.box(4, 0, 4, 12, 2, 12); + public static final int MAX_ROPE_LENGTH = 16; + private final Function shapes; + + public RopeStakeBlock(Properties properties) { + super(properties); + this.registerDefaultState(this.stateDefinition.any().setValue(CONNECTION, Direction.NORTH).setValue(SPOOL, AetherIIBlockStateProperties.StakeSpoolState.NONE).setValue(WATERLOGGED, false)); + this.shapes = this.makeShapes(); + } + + private Function makeShapes() { + return this.getShapeForEachState((state) -> { + Direction connection = state.getValue(CONNECTION); + VoxelShape shape = SHAPE_STAKES.get(connection); + if (state.getValue(SPOOL) == AetherIIBlockStateProperties.StakeSpoolState.CENTER) { + shape = Shapes.or(shape, SHAPE_CENTER_SPOOLS.get(connection)); + } else if (state.getValue(SPOOL) == AetherIIBlockStateProperties.StakeSpoolState.FLOOR) { + shape = Shapes.or(shape, SHAPE_FLOOR_SPOOL); + shape = Shapes.or(shape, SHAPE_CONNECTION); + } else if (state.getValue(SPOOL) == AetherIIBlockStateProperties.StakeSpoolState.NONE_CONNECTED) { + shape = Shapes.or(shape, SHAPE_CONNECTION); + } + return shape; + }, WATERLOGGED); + } + + @Override + protected InteractionResult useWithoutItem(BlockState state, Level level, BlockPos pos, Player player, BlockHitResult hitResult) { + if (state.getValue(SPOOL) == AetherIIBlockStateProperties.StakeSpoolState.CENTER) { + BlockState newState = state.setValue(SPOOL, AetherIIBlockStateProperties.StakeSpoolState.NONE_CONNECTED); + level.setBlock(pos, newState, 1 | 2); + level.scheduleTick(pos, this, RopeBlock.DELAY); + return InteractionResult.SUCCESS; + } else if (state.getValue(SPOOL) == AetherIIBlockStateProperties.StakeSpoolState.NONE_CONNECTED) { + boolean canRespool = true; + for (int i = 1; i < MAX_ROPE_LENGTH; ++i) { + BlockPos belowPos = pos.below(i); + BlockState belowState = level.getBlockState(belowPos); + if (belowState.getValueOrElse(RopeBlock.KNOT, true)) { + canRespool = false; + break; + } + } + if (canRespool) { + BlockState newState = state.setValue(SPOOL, AetherIIBlockStateProperties.StakeSpoolState.CENTER); + level.setBlock(pos, newState, 1 | 2); + level.destroyBlock(pos.below(), false); + return InteractionResult.SUCCESS; + } + } + return InteractionResult.PASS; + } + + @Override + protected void tick(BlockState state, ServerLevel level, BlockPos pos, RandomSource random) { + BlockPos belowPos = pos.below(); + BlockState belowState = level.getBlockState(belowPos); + if (!belowState.isFaceSturdy(level, belowPos, Direction.UP)) { + RopeBlock.placeRope(level, belowPos, AetherIIBlocks.BRETTL_ROPE.get().defaultBlockState().setValue(RopeBlock.UP, true)); + } else { + level.setBlock(pos, state.setValue(RopeStakeBlock.SPOOL, AetherIIBlockStateProperties.StakeSpoolState.FLOOR), 1 | 2); + } + } + + @Override + protected BlockState updateShape(BlockState state, LevelReader levelReader, ScheduledTickAccess scheduledTickAccess, BlockPos pos, Direction direction, BlockPos neighborPos, BlockState neighborState, RandomSource randomSource) { + if (state.getValue(WATERLOGGED)) { + scheduledTickAccess.scheduleTick(pos, Fluids.WATER, Fluids.WATER.getTickDelay(levelReader)); + } + if (direction == state.getValue(CONNECTION) && !neighborState.isFaceSturdy(levelReader, pos.relative(direction.getOpposite()), direction.getOpposite(), SupportType.CENTER)) { + return Blocks.AIR.defaultBlockState(); + } + if (direction == Direction.DOWN && neighborState.isAir()) { + if (state.getValue(SPOOL) == AetherIIBlockStateProperties.StakeSpoolState.FLOOR) { + state = state.setValue(SPOOL, AetherIIBlockStateProperties.StakeSpoolState.NONE_CONNECTED); + scheduledTickAccess.scheduleTick(pos, this, RopeBlock.DELAY); + } + } + return state; + } + + @Override + protected boolean canSurvive(BlockState state, LevelReader level, BlockPos pos) { + Direction direction = state.getValue(CONNECTION); + BlockPos relativePos = pos.relative(direction); + BlockState relativeState = level.getBlockState(relativePos); + return relativeState.isFaceSturdy(level, relativePos, direction.getOpposite(), SupportType.CENTER); + } + + @Override + public BlockState getStateForPlacement(BlockPlaceContext context) { + FluidState replacedFluidState = context.getLevel().getFluidState(context.getClickedPos()); + return this.defaultBlockState().setValue(CONNECTION, context.getClickedFace().getOpposite()).setValue(SPOOL, AetherIIBlockStateProperties.StakeSpoolState.CENTER).setValue(WATERLOGGED, replacedFluidState.is(Fluids.WATER)); + } + + @Override + protected FluidState getFluidState(BlockState state) { + return state.getValue(WATERLOGGED) ? Fluids.WATER.getSource(false) : super.getFluidState(state); + } + + @Override + protected void createBlockStateDefinition(StateDefinition.Builder builder) { + builder.add(CONNECTION, SPOOL, WATERLOGGED); + } + + @Override + protected VoxelShape getShape(BlockState state, BlockGetter level, BlockPos pos, CollisionContext context) { + return this.shapes.apply(state); + } + + @Override + protected VoxelShape getCollisionShape(BlockState state, BlockGetter level, BlockPos pos, CollisionContext context) { + VoxelShape shape = SHAPE_STAKES.get(state.getValue(CONNECTION)); + if (context.isAbove(shape, pos, true) && !context.isDescending()) { + return shape; + } else { + return Shapes.empty(); + } + } + + @Override + protected VoxelShape getOcclusionShape(BlockState state) { + return SHAPE_OCCLUSION_STAKES.get(state.getValue(CONNECTION)); + } + + @Override + protected float getShadeBrightness(BlockState state, BlockGetter level, BlockPos pos) { + return 1.0F; + } + + @Override + protected boolean propagatesSkylightDown(BlockState state) { + return true; + } + + @Override + public boolean isLadder(BlockState state, LevelReader level, BlockPos pos, LivingEntity entity) { + return true; + } + + @Override + public boolean isScaffolding(BlockState state, LevelReader level, BlockPos pos, LivingEntity entity) { + return true; + } + + public static boolean checkForStake(LevelReader levelReader, BlockPos pos) { + for (int i = 1; i < MAX_ROPE_LENGTH; ++i) { + BlockPos abovePos = pos.above(i); + BlockState aboveState = levelReader.getBlockState(abovePos); + if (aboveState.is(AetherIIBlocks.BRETTL_ROPE_STAKE)) { + return true; + } + } + return false; + } +} diff --git a/src/main/java/com/aetherteam/aetherii/client/renderer/AetherIIRenderers.java b/src/main/java/com/aetherteam/aetherii/client/renderer/AetherIIRenderers.java index 8faca8b37a..9d82c4bcee 100644 --- a/src/main/java/com/aetherteam/aetherii/client/renderer/AetherIIRenderers.java +++ b/src/main/java/com/aetherteam/aetherii/client/renderer/AetherIIRenderers.java @@ -191,6 +191,7 @@ public static void registerEntityRenderers(EntityRenderersEvent.RegisterRenderer event.registerEntityRenderer(AetherIIEntityTypes.PRISMALLARD_EGG.get(), ThrownItemRenderer::new); event.registerEntityRenderer(AetherIIEntityTypes.LASSO_LOOP.get(), LassoLoopRenderer::new); event.registerEntityRenderer(AetherIIEntityTypes.SCATTERGLASS_BOLT.get(), ScatterglassBoltRenderer::new); + event.registerEntityRenderer(AetherIIEntityTypes.BRETTL_ROPE_BOLT.get(), BrettlRopeBoltRenderer::new); event.registerEntityRenderer(AetherIIEntityTypes.AMBER_DART.get(), AmberDartRenderer::new); event.registerEntityRenderer(AetherIIEntityTypes.TOXIC_DART.get(), ToxicDartRenderer::new); event.registerEntityRenderer(AetherIIEntityTypes.VENOMOUS_DART.get(), VenomousDartRenderer::new); diff --git a/src/main/java/com/aetherteam/aetherii/client/renderer/entity/BrettlRopeBoltRenderer.java b/src/main/java/com/aetherteam/aetherii/client/renderer/entity/BrettlRopeBoltRenderer.java new file mode 100644 index 0000000000..13359de0f5 --- /dev/null +++ b/src/main/java/com/aetherteam/aetherii/client/renderer/entity/BrettlRopeBoltRenderer.java @@ -0,0 +1,25 @@ +package com.aetherteam.aetherii.client.renderer.entity; + +import com.aetherteam.aetherii.AetherII; +import com.aetherteam.aetherii.entity.projectile.BrettlRopeBolt; +import net.minecraft.client.renderer.entity.ArrowRenderer; +import net.minecraft.client.renderer.entity.EntityRendererProvider; +import net.minecraft.client.renderer.entity.state.ArrowRenderState; +import net.minecraft.resources.Identifier; + +public class BrettlRopeBoltRenderer extends ArrowRenderer { + public static final Identifier BRETTL_ROPE_BOLT_TEXTURE = Identifier.fromNamespaceAndPath(AetherII.MODID, "textures/entity/projectile/brettl_rope_bolt.png"); + + public BrettlRopeBoltRenderer(EntityRendererProvider.Context context) { + super(context); + } + + public ArrowRenderState createRenderState() { + return new ArrowRenderState(); + } + + @Override + public Identifier getTextureLocation(ArrowRenderState renderState) { + return BRETTL_ROPE_BOLT_TEXTURE; + } +} diff --git a/src/main/java/com/aetherteam/aetherii/data/generators/AetherIILanguageData.java b/src/main/java/com/aetherteam/aetherii/data/generators/AetherIILanguageData.java index 04f211e270..75a3073895 100644 --- a/src/main/java/com/aetherteam/aetherii/data/generators/AetherIILanguageData.java +++ b/src/main/java/com/aetherteam/aetherii/data/generators/AetherIILanguageData.java @@ -750,6 +750,8 @@ private void addBlocks() { this.addBlock(AetherIIBlocks.SKYROOT_CHEST, "Skyroot Chest"); this.addBlock(AetherIIBlocks.SKYROOT_BARREL, "Skyroot Barrel"); this.addBlock(AetherIIBlocks.SKYROOT_LADDER, "Skyroot Ladder"); + this.addBlock(AetherIIBlocks.BRETTL_ROPE_STAKE, "Climbing Rope"); + this.addBlock(AetherIIBlocks.BRETTL_ROPE, "Brettl Rope"); this.addBlock(AetherIIBlocks.CLOUDWOOL_BEDROLL, "Cloudwool Bedroll"); this.addBlock(AetherIIBlocks.SKYROOT_BED, "Skyroot Bed"); @@ -952,6 +954,7 @@ private void addItems() { this.addEffectDarts(AetherIIItems.AMBER_DARTS, "crystallized", "Crystallized Darts"); this.addItem(AetherIIItems.SCATTERGLASS_BOLT, "Scatterglass Bolt"); + this.addItem(AetherIIItems.BRETTL_ROPE_BOLT, "Climbing Rope Bolt"); this.addItem(AetherIIItems.HAMMER_OF_DEMOLITION, "Hammer of Demolition"); @@ -1043,7 +1046,6 @@ private void addItems() { this.addItem(AetherIIItems.VALKYRIE_WINGS, "Valkyrie Wings"); this.addItem(AetherIIItems.BRETTL_CANE, "Brettl Cane"); this.addItem(AetherIIItems.BRETTL_GRASS, "Brettl Grass"); - this.addItem(AetherIIItems.BRETTL_ROPE, "Brettl Rope"); this.addItem(AetherIIItems.AECHOR_PETAL, "Aechor Petal"); this.addItem(AetherIIItems.ARILUM_BULBS, "Arilum Bulbs"); this.addItem(AetherIIItems.ARCTIC_SNOWBALL, "Arctic Snowball"); @@ -1463,6 +1465,7 @@ private void addEntityTypes() { this.addEntityType(AetherIIEntityTypes.PRISMALLARD_EGG, "Prismallard Egg"); this.addEntityType(AetherIIEntityTypes.LASSO_LOOP, "Lasso Loop"); this.addEntityType(AetherIIEntityTypes.SCATTERGLASS_BOLT, "Scatterglass Bolt"); + this.addEntityType(AetherIIEntityTypes.BRETTL_ROPE_BOLT, "Climbing Rope Bolt"); this.addEntityType(AetherIIEntityTypes.AMBER_DART, "Amber Dart"); this.addEntityType(AetherIIEntityTypes.ZEPHYR_WEBBING_BALL, "Zephyr Webbing Ball"); this.addEntityType(AetherIIEntityTypes.TEMPEST_THUNDERBALL, "Tempest Thunderball"); diff --git a/src/main/java/com/aetherteam/aetherii/data/generators/AetherIIRecipeData.java b/src/main/java/com/aetherteam/aetherii/data/generators/AetherIIRecipeData.java index 9b900c17ed..7f26be6ebf 100644 --- a/src/main/java/com/aetherteam/aetherii/data/generators/AetherIIRecipeData.java +++ b/src/main/java/com/aetherteam/aetherii/data/generators/AetherIIRecipeData.java @@ -1549,6 +1549,11 @@ protected void buildRecipes() { .pattern(" F ") .unlockedBy("has_scatterglass_shard", has(AetherIIItems.SCATTERGLASS_SHARD)) .save(this.output); + ShapelessRecipeBuilder.shapeless(getter, RecipeCategory.MISC, AetherIIItems.BRETTL_ROPE_BOLT.get(), 1) + .requires(AetherIIItems.SCATTERGLASS_BOLT) + .requires(AetherIIBlocks.BRETTL_ROPE_STAKE) + .unlockedBy("has_brettl_rope_stake", has(AetherIIBlocks.BRETTL_ROPE_STAKE)) + .save(this.output); // Armor @@ -1701,7 +1706,7 @@ protected void buildRecipes() { .pattern("###") .unlockedBy("has_brettl_cane", has(AetherIIItems.BRETTL_CANE)) .save(this.output, this.name("paper_from_brettl_cane")); - ShapedRecipeBuilder.shaped(getter, RecipeCategory.MISC, AetherIIItems.BRETTL_ROPE.get(), 2) + ShapedRecipeBuilder.shaped(getter, RecipeCategory.MISC, AetherIIBlocks.BRETTL_ROPE.get(), 2) .define('#', AetherIIItems.BRETTL_GRASS) .pattern(" #") .pattern(" # ") @@ -2185,7 +2190,7 @@ protected void buildRecipes() { AetherIIItems.SKYROOT_BUCKET, 0.0F).group("misc_tools").save(this.output, this.name("uncraft_skyroot_bucket")); this.hourglassUncraftingItem( Items.AIR, List.of(), - AetherIIItems.BRETTL_ROPE, List.of(this.hourglass(2, 75), this.hourglass(3, 25)), + AetherIIBlocks.BRETTL_ROPE, List.of(this.hourglass(2, 75), this.hourglass(3, 25)), Items.AIR, List.of(), AetherIIItems.BRETTL_LASSO, 0.0F).group("misc_tools").save(this.output, this.name("uncraft_brettl_lasso")); this.hourglassUncraftingItem( @@ -2378,11 +2383,19 @@ protected void buildRecipes() { .unlockedBy("has_cloudtwine", this.has(AetherIIItems.CLOUDTWINE)) .save(this.output); ShapedRecipeBuilder.shaped(getter, RecipeCategory.MISC, AetherIIItems.BRETTL_LASSO.get()) - .define('#', AetherIIItems.BRETTL_ROPE) + .define('#', AetherIIBlocks.BRETTL_ROPE) .pattern(" ##") .pattern(" ##") .pattern("# ") - .unlockedBy("has_brettl_rope", has(AetherIIItems.BRETTL_ROPE)) + .unlockedBy("has_brettl_rope", has(AetherIIBlocks.BRETTL_ROPE)) + .save(this.output); + ShapedRecipeBuilder.shaped(getter, RecipeCategory.MISC, AetherIIBlocks.BRETTL_ROPE_STAKE.get(), 4) + .define('#', AetherIIBlocks.BRETTL_ROPE) + .define('/', AetherIIItems.SKYROOT_STICK) + .pattern("#/") + .pattern("# ") + .pattern("# ") + .unlockedBy("has_brettl_rope", has(AetherIIBlocks.BRETTL_ROPE)) .save(this.output); ShapedRecipeBuilder.shaped(getter, RecipeCategory.MISC, AetherIIItems.MOA_SADDLE.get()) .define('#', AetherIIItems.BEAST_PELT) diff --git a/src/main/java/com/aetherteam/aetherii/data/generators/loot/AetherIIBlockLoot.java b/src/main/java/com/aetherteam/aetherii/data/generators/loot/AetherIIBlockLoot.java index b92698ca53..9392111655 100644 --- a/src/main/java/com/aetherteam/aetherii/data/generators/loot/AetherIIBlockLoot.java +++ b/src/main/java/com/aetherteam/aetherii/data/generators/loot/AetherIIBlockLoot.java @@ -1,6 +1,8 @@ package com.aetherteam.aetherii.data.generators.loot; +import com.aetherteam.aetherii.block.AetherIIBlockStateProperties; import com.aetherteam.aetherii.block.AetherIIBlocks; +import com.aetherteam.aetherii.block.utility.RopeStakeBlock; import com.aetherteam.aetherii.data.providers.AetherIIBlockLootSubProvider; import com.aetherteam.aetherii.item.AetherIIItems; import com.aetherteam.aetherii.item.components.AetherIIDataComponents; @@ -703,6 +705,8 @@ public void generate() { this.dropSelf(AetherIIBlocks.SKYROOT_CHEST.get()); this.dropSelf(AetherIIBlocks.SKYROOT_BARREL.get()); this.dropSelf(AetherIIBlocks.SKYROOT_LADDER.get()); + this.add(AetherIIBlocks.BRETTL_ROPE_STAKE.get(), (rope) -> this.createSinglePropConditionTable(rope, RopeStakeBlock.SPOOL, AetherIIBlockStateProperties.StakeSpoolState.CENTER)); + this.dropNone(AetherIIBlocks.BRETTL_ROPE.get()); this.add(AetherIIBlocks.CLOUDWOOL_BEDROLL.get(), (bed) -> this.createSinglePropConditionTable(bed, BedBlock.PART, BedPart.HEAD)); this.add(AetherIIBlocks.SKYROOT_BED.get(), (bed) -> this.createSinglePropConditionTable(bed, BedBlock.PART, BedPart.HEAD)); diff --git a/src/main/java/com/aetherteam/aetherii/data/generators/loot/AetherIIChestLoot.java b/src/main/java/com/aetherteam/aetherii/data/generators/loot/AetherIIChestLoot.java index 4fce3abdb0..75f395b02c 100644 --- a/src/main/java/com/aetherteam/aetherii/data/generators/loot/AetherIIChestLoot.java +++ b/src/main/java/com/aetherteam/aetherii/data/generators/loot/AetherIIChestLoot.java @@ -177,7 +177,7 @@ public void generate(BiConsumer, LootTable.Builder> build ) .withPool(LootPool.lootPool().setRolls(UniformGenerator.between(1.0F, 2.0F)) - .add(LootItem.lootTableItem(AetherIIItems.BRETTL_ROPE).apply(SetItemCountFunction.setCount(UniformGenerator.between(2.0F, 3.0F)))) + .add(LootItem.lootTableItem(AetherIIBlocks.BRETTL_ROPE).apply(SetItemCountFunction.setCount(UniformGenerator.between(2.0F, 3.0F)))) .add(LootItem.lootTableItem(AetherIIItems.CLOUDTWINE).apply(SetItemCountFunction.setCount(UniformGenerator.between(1.0F, 2.0F)))) ) ); diff --git a/src/main/java/com/aetherteam/aetherii/data/generators/models/AetherIIBlockModels.java b/src/main/java/com/aetherteam/aetherii/data/generators/models/AetherIIBlockModels.java index 1dc228df76..b6ca7fea2d 100644 --- a/src/main/java/com/aetherteam/aetherii/data/generators/models/AetherIIBlockModels.java +++ b/src/main/java/com/aetherteam/aetherii/data/generators/models/AetherIIBlockModels.java @@ -462,6 +462,8 @@ public void run() { this.createChest(AetherIIBlocks.SKYROOT_CHEST.get(), AetherIIBlocks.SKYROOT_PLANKS.get(), Identifier.fromNamespaceAndPath(AetherII.MODID, "skyroot_chest"), true); this.createBarrel(AetherIIBlocks.SKYROOT_BARREL.get()); this.createLadder(AetherIIBlocks.SKYROOT_LADDER.get()); + this.createClimbingRopeStake(AetherIIBlocks.BRETTL_ROPE_STAKE.get()); + this.createClimbingRope(AetherIIBlocks.BRETTL_ROPE.get()); this.createBedroll(AetherIIBlocks.CLOUDWOOL_BEDROLL.get()); this.createBed(AetherIIBlocks.SKYROOT_BED.get(), AetherIIBlocks.SKYROOT_PLANKS.get(), "undyed"); diff --git a/src/main/java/com/aetherteam/aetherii/data/generators/models/AetherIIItemModels.java b/src/main/java/com/aetherteam/aetherii/data/generators/models/AetherIIItemModels.java index 9b02637b1f..fb5bc6ba35 100644 --- a/src/main/java/com/aetherteam/aetherii/data/generators/models/AetherIIItemModels.java +++ b/src/main/java/com/aetherteam/aetherii/data/generators/models/AetherIIItemModels.java @@ -83,6 +83,7 @@ public void run() { this.generateDarts(AetherIIItems.AMBER_DARTS.get()); this.generateFlatItem(AetherIIItems.SCATTERGLASS_BOLT.get(), ModelTemplates.FLAT_ITEM); + this.generateFlatItem(AetherIIItems.BRETTL_ROPE_BOLT.get(), ModelTemplates.FLAT_ITEM); this.generateHammerOfDemolition(AetherIIItems.HAMMER_OF_DEMOLITION.get()); this.generateBrokenItem(AetherIIItems.HAMMER_OF_DEMOLITION.get()); @@ -180,7 +181,6 @@ public void run() { this.generateFlatItem(AetherIIItems.VALKYRIE_WINGS.get(), ModelTemplates.FLAT_ITEM); this.generateFlatItem(AetherIIItems.BRETTL_CANE.get(), ModelTemplates.FLAT_ITEM); this.generateFlatItem(AetherIIItems.BRETTL_GRASS.get(), ModelTemplates.FLAT_ITEM); - this.generateFlatItem(AetherIIItems.BRETTL_ROPE.get(), ModelTemplates.FLAT_ITEM); this.generateFlatItem(AetherIIItems.ARILUM_BULBS.get(), ModelTemplates.FLAT_ITEM); this.generateFlatItem(AetherIIItems.AECHOR_PETAL.get(), ModelTemplates.FLAT_ITEM); this.generateFlatItem(AetherIIItems.ARCTIC_SNOWBALL.get(), ModelTemplates.FLAT_ITEM); diff --git a/src/main/java/com/aetherteam/aetherii/data/generators/tags/AetherIIEntityTypeTagData.java b/src/main/java/com/aetherteam/aetherii/data/generators/tags/AetherIIEntityTypeTagData.java index eea14d93aa..1d54390979 100644 --- a/src/main/java/com/aetherteam/aetherii/data/generators/tags/AetherIIEntityTypeTagData.java +++ b/src/main/java/com/aetherteam/aetherii/data/generators/tags/AetherIIEntityTypeTagData.java @@ -59,6 +59,7 @@ public void addTags(HolderLookup.Provider provider) { AetherIIEntityTypes.PRISMALLARD_EGG.get(), AetherIIEntityTypes.LASSO_LOOP.get(), AetherIIEntityTypes.SCATTERGLASS_BOLT.get(), + AetherIIEntityTypes.BRETTL_ROPE_BOLT.get(), AetherIIEntityTypes.AMBER_DART.get(), AetherIIEntityTypes.TOXIC_DART.get(), AetherIIEntityTypes.ZEPHYR_WEBBING_BALL.get(), @@ -140,6 +141,7 @@ public void addTags(HolderLookup.Provider provider) { // Vanilla this.tag(EntityTypeTags.ARROWS).add( AetherIIEntityTypes.SCATTERGLASS_BOLT.get(), + AetherIIEntityTypes.BRETTL_ROPE_BOLT.get(), AetherIIEntityTypes.AMBER_DART.get() ); this.tag(EntityTypeTags.IMPACT_PROJECTILES).add( diff --git a/src/main/java/com/aetherteam/aetherii/data/generators/tags/AetherIIItemTagData.java b/src/main/java/com/aetherteam/aetherii/data/generators/tags/AetherIIItemTagData.java index cd83213ce1..b8b48c9086 100644 --- a/src/main/java/com/aetherteam/aetherii/data/generators/tags/AetherIIItemTagData.java +++ b/src/main/java/com/aetherteam/aetherii/data/generators/tags/AetherIIItemTagData.java @@ -512,6 +512,10 @@ protected TagAppender tag(TagKey blockKey, TagKey ite AetherIIItems.ARKENIUM_CHIP.get(), AetherIIItems.BROKEN_ITEM.get() ); + this.tag(AetherIITags.Items.CROSSBOW_AMMO).add( + AetherIIItems.SCATTERGLASS_BOLT.get(), + AetherIIItems.BRETTL_ROPE_BOLT.get() + ); this.tag(AetherIITags.Items.PLANT_DAMAGING_ITEMS).addTags( AetherIITags.Items.TOOLS_TROWELS ); diff --git a/src/main/java/com/aetherteam/aetherii/data/providers/AetherIIBlockItemTagProvider.java b/src/main/java/com/aetherteam/aetherii/data/providers/AetherIIBlockItemTagProvider.java index 31db871a62..415d640ea5 100644 --- a/src/main/java/com/aetherteam/aetherii/data/providers/AetherIIBlockItemTagProvider.java +++ b/src/main/java/com/aetherteam/aetherii/data/providers/AetherIIBlockItemTagProvider.java @@ -497,7 +497,8 @@ public void run() { AetherIIBlocks.SKYROOT_SLAB.get(), AetherIIBlocks.GREATROOT_SLAB.get(), AetherIIBlocks.WISPROOT_SLAB.get(), - AetherIIBlocks.WISPROOT_SLAB.get() + AetherIIBlocks.WISPROOT_SLAB.get(), + AetherIIBlocks.AMBEROOT_SLAB.get() ); this.tag(BlockTags.WOODEN_FENCES, ItemTags.WOODEN_FENCES).add( AetherIIBlocks.SKYROOT_FENCE.get(), diff --git a/src/main/java/com/aetherteam/aetherii/data/providers/AetherIIBlockModelSubProvider.java b/src/main/java/com/aetherteam/aetherii/data/providers/AetherIIBlockModelSubProvider.java index 2c3b486d7c..0b7c7e77e2 100644 --- a/src/main/java/com/aetherteam/aetherii/data/providers/AetherIIBlockModelSubProvider.java +++ b/src/main/java/com/aetherteam/aetherii/data/providers/AetherIIBlockModelSubProvider.java @@ -6,10 +6,7 @@ import com.aetherteam.aetherii.block.furniture.OutpostCampfireBlock; import com.aetherteam.aetherii.block.miscellaneous.FacingPillarBlock; import com.aetherteam.aetherii.block.natural.*; -import com.aetherteam.aetherii.block.utility.AmberHourglassBlock; -import com.aetherteam.aetherii.block.utility.AnimalStashBlock; -import com.aetherteam.aetherii.block.utility.ArkeniumForgeBlock; -import com.aetherteam.aetherii.block.utility.BedrollBlock; +import com.aetherteam.aetherii.block.utility.*; import com.aetherteam.aetherii.client.AetherIIColorResolvers; import com.aetherteam.aetherii.client.renderer.block.model.builder.TrunkModelBuilder; import com.aetherteam.aetherii.client.renderer.item.color.AetherGrassColorSource; @@ -1172,6 +1169,76 @@ public void createCampfire(Block block) { this.blockStateOutput.accept(MultiVariantGenerator.dispatch(block).with(createBooleanModelDispatch(BlockStateProperties.LIT, campfire, campfireOff)).with(ROTATION_HORIZONTAL_FACING_ALT)); } + public void createClimbingRopeStake(Block block) { + MultiVariant stake = plainVariant(AetherIIModelTemplates.decorateBlockModelLocation("brettl_rope_stake")); + MultiVariant stakeShort = plainVariant(AetherIIModelTemplates.decorateBlockModelLocation("brettl_rope_stake_short")); + MultiVariant knot = plainVariant(AetherIIModelTemplates.decorateBlockModelLocation("brettl_rope_knot")); + MultiVariant connection = plainVariant(AetherIIModelTemplates.decorateBlockModelLocation("brettl_rope_connection_lower")); + MultiVariant connectionSpoolFloor = plainVariant(AetherIIModelTemplates.decorateBlockModelLocation("brettl_rope_connection_spool_floor")); + MultiVariant spoolMiddle = plainVariant(AetherIIModelTemplates.decorateBlockModelLocation("brettl_rope_spool_middle")); + MultiVariant spoolFloor = plainVariant(AetherIIModelTemplates.decorateBlockModelLocation("brettl_rope_spool_floor")); + + MultiPartGenerator model = MultiPartGenerator.multiPart(block) + .with(condition().term(RopeStakeBlock.CONNECTION, Direction.UP), stakeShort.with(X_ROT_180)) + .with(condition().term(RopeStakeBlock.CONNECTION, Direction.DOWN), stake) + .with(condition().term(RopeStakeBlock.CONNECTION, Direction.NORTH), stake.with(X_ROT_90).with(Y_ROT_180)) + .with(condition().term(RopeStakeBlock.CONNECTION, Direction.EAST), stake.with(X_ROT_90).with(Y_ROT_270)) + .with(condition().term(RopeStakeBlock.CONNECTION, Direction.SOUTH), stake.with(X_ROT_90)) + .with(condition().term(RopeStakeBlock.CONNECTION, Direction.WEST), stake.with(X_ROT_90).with(Y_ROT_90)) + .with(condition().term(RopeStakeBlock.CONNECTION, Direction.UP), knot) + .with(condition().term(RopeStakeBlock.CONNECTION, Direction.DOWN), knot) + .with(condition().term(RopeStakeBlock.CONNECTION, Direction.NORTH), knot.with(X_ROT_90).with(Y_ROT_180)) + .with(condition().term(RopeStakeBlock.CONNECTION, Direction.EAST), knot.with(X_ROT_90).with(Y_ROT_270)) + .with(condition().term(RopeStakeBlock.CONNECTION, Direction.SOUTH), knot.with(X_ROT_90)) + .with(condition().term(RopeStakeBlock.CONNECTION, Direction.WEST), knot.with(X_ROT_90).with(Y_ROT_90)) + .with(condition().term(RopeStakeBlock.CONNECTION, Direction.UP).term(RopeStakeBlock.SPOOL, AetherIIBlockStateProperties.StakeSpoolState.CENTER), spoolMiddle) + .with(condition().term(RopeStakeBlock.CONNECTION, Direction.DOWN).term(RopeStakeBlock.SPOOL, AetherIIBlockStateProperties.StakeSpoolState.CENTER), spoolMiddle) + .with(condition().term(RopeStakeBlock.CONNECTION, Direction.NORTH).term(RopeStakeBlock.SPOOL, AetherIIBlockStateProperties.StakeSpoolState.CENTER), spoolMiddle.with(X_ROT_90).with(Y_ROT_180)) + .with(condition().term(RopeStakeBlock.CONNECTION, Direction.EAST).term(RopeStakeBlock.SPOOL, AetherIIBlockStateProperties.StakeSpoolState.CENTER), spoolMiddle.with(X_ROT_90).with(Y_ROT_270)) + .with(condition().term(RopeStakeBlock.CONNECTION, Direction.SOUTH).term(RopeStakeBlock.SPOOL, AetherIIBlockStateProperties.StakeSpoolState.CENTER), spoolMiddle.with(X_ROT_90)) + .with(condition().term(RopeStakeBlock.CONNECTION, Direction.WEST).term(RopeStakeBlock.SPOOL, AetherIIBlockStateProperties.StakeSpoolState.CENTER), spoolMiddle.with(X_ROT_90).with(Y_ROT_90)) + .with(condition().term(RopeStakeBlock.CONNECTION, Direction.UP).term(RopeStakeBlock.SPOOL, AetherIIBlockStateProperties.StakeSpoolState.FLOOR, AetherIIBlockStateProperties.StakeSpoolState.NONE_CONNECTED), connection) + .with(condition().term(RopeStakeBlock.CONNECTION, Direction.DOWN).term(RopeStakeBlock.SPOOL, AetherIIBlockStateProperties.StakeSpoolState.FLOOR), connectionSpoolFloor) + .with(condition().term(RopeStakeBlock.CONNECTION, Direction.NORTH).term(RopeStakeBlock.SPOOL, AetherIIBlockStateProperties.StakeSpoolState.FLOOR, AetherIIBlockStateProperties.StakeSpoolState.NONE_CONNECTED), connection) + .with(condition().term(RopeStakeBlock.CONNECTION, Direction.EAST).term(RopeStakeBlock.SPOOL, AetherIIBlockStateProperties.StakeSpoolState.FLOOR, AetherIIBlockStateProperties.StakeSpoolState.NONE_CONNECTED), connection) + .with(condition().term(RopeStakeBlock.CONNECTION, Direction.SOUTH).term(RopeStakeBlock.SPOOL, AetherIIBlockStateProperties.StakeSpoolState.FLOOR, AetherIIBlockStateProperties.StakeSpoolState.NONE_CONNECTED), connection) + .with(condition().term(RopeStakeBlock.CONNECTION, Direction.WEST).term(RopeStakeBlock.SPOOL, AetherIIBlockStateProperties.StakeSpoolState.FLOOR, AetherIIBlockStateProperties.StakeSpoolState.NONE_CONNECTED), connection) + .with(condition().term(RopeStakeBlock.SPOOL, AetherIIBlockStateProperties.StakeSpoolState.FLOOR), spoolFloor); + + this.itemModelOutput.accept(block.asItem(), ItemModelUtils.plainModel(AetherIIModelTemplates.MIRRORED_FLAT_ITEM.create(ModelLocationUtils.getModelLocation(block.asItem()), TextureMapping.layer0(block.asItem()), this.modelOutput))); + this.blockStateOutput.accept(model); + } + + public void createClimbingRope(Block block) { + MultiVariant connectionLower = plainVariant(AetherIIModelTemplates.decorateBlockModelLocation("brettl_rope_connection_lower")); + MultiVariant capLower = plainVariant(AetherIIModelTemplates.decorateBlockModelLocation("brettl_rope_cap_lower")); + MultiVariant connectionUpper = plainVariant(AetherIIModelTemplates.decorateBlockModelLocation("brettl_rope_connection_upper")); + MultiVariant capUpper = plainVariant(AetherIIModelTemplates.decorateBlockModelLocation("brettl_rope_cap_upper")); + MultiVariant knot = plainVariant(AetherIIModelTemplates.decorateBlockModelLocation("brettl_rope_knot")); + MultiVariant spoolFloor = plainVariant(AetherIIModelTemplates.decorateBlockModelLocation("brettl_rope_spool_floor")); + MultiVariant fray = plainVariant(AetherIIModelTemplates.decorateBlockModelLocation("brettl_rope_fray")); + + MultiPartGenerator model = MultiPartGenerator.multiPart(block) + .with(condition().term(RopeBlock.KNOT, true), knot) + .with(condition().term(RopeBlock.END, AetherIIBlockStateProperties.RopeEndState.SPOOLED), spoolFloor) + .with(condition().term(RopeBlock.END, AetherIIBlockStateProperties.RopeEndState.FRAYED), fray) + .with(condition().term(RopeBlock.UP, true), connectionUpper) + .with(condition().term(RopeBlock.UP, true).term(RopeBlock.DOWN, false), capUpper) + .with(condition().term(RopeBlock.DOWN, true), connectionLower) + .with(condition().term(RopeBlock.DOWN, true).term(RopeBlock.UP, false), capLower) + .with(condition().term(RopeBlock.NORTH, true), connectionUpper.with(X_ROT_90)) + .with(condition().term(RopeBlock.NORTH, true).term(RopeBlock.SOUTH, false), capUpper.with(X_ROT_90)) + .with(condition().term(RopeBlock.EAST, true), connectionUpper.with(X_ROT_90).with(Y_ROT_90)) + .with(condition().term(RopeBlock.EAST, true).term(RopeBlock.WEST, false), capUpper.with(X_ROT_90).with(Y_ROT_90)) + .with(condition().term(RopeBlock.SOUTH, true), connectionLower.with(X_ROT_90)) + .with(condition().term(RopeBlock.SOUTH, true).term(RopeBlock.NORTH, false), capLower.with(X_ROT_90)) + .with(condition().term(RopeBlock.WEST, true), connectionLower.with(X_ROT_90).with(Y_ROT_90)) + .with(condition().term(RopeBlock.WEST, true).term(RopeBlock.EAST, false), capLower.with(X_ROT_90).with(Y_ROT_90)); + + this.registerSimpleFlatItemModel(block.asItem()); //todo rotate item model 90 degrees in hand + this.blockStateOutput.accept(model); + } + public void createVase(Block block, Block particle) { this.createParticleOnlyBlock(block, particle); Identifier location = Identifier.fromNamespaceAndPath(AetherII.MODID, "textures/entity/vases/" + block.builtInRegistryHolder().getKey().identifier().getPath() + ".png"); diff --git a/src/main/java/com/aetherteam/aetherii/data/resources/builders/models/AetherIIModelTemplates.java b/src/main/java/com/aetherteam/aetherii/data/resources/builders/models/AetherIIModelTemplates.java index f47b5f7635..38c1681357 100644 --- a/src/main/java/com/aetherteam/aetherii/data/resources/builders/models/AetherIIModelTemplates.java +++ b/src/main/java/com/aetherteam/aetherii/data/resources/builders/models/AetherIIModelTemplates.java @@ -316,6 +316,7 @@ public class AetherIIModelTemplates { public static final ModelTemplate ANIMAL_STASH = create("template_animal_stash", TextureSlot.TEXTURE, TextureSlot.PARTICLE).extend().build(); public static final ModelTemplate ANIMAL_STASH_OPEN = create("template_animal_stash_open", TextureSlot.TEXTURE, TextureSlot.PARTICLE).extend().build(); + public static final ModelTemplate MIRRORED_FLAT_ITEM = createItem("mirrored_flat_item", TextureSlot.LAYER0); public static final ModelTemplate DART_SHOOTER = createItem("handheld_dart_shooter", TextureSlot.LAYER0); public static final ModelTemplate DART_SHOOTER_TWO_LAYER = createItem("handheld_dart_shooter", TextureSlot.LAYER0, TextureSlot.LAYER1); public static final ModelTemplate USING_DART_SHOOTER_TWO_LAYER = createItem("using_dart_shooter", TextureSlot.LAYER0, TextureSlot.LAYER1); diff --git a/src/main/java/com/aetherteam/aetherii/data/resources/registries/AetherIIEntityIds.java b/src/main/java/com/aetherteam/aetherii/data/resources/registries/AetherIIEntityIds.java index a4662e3987..16e1a8b5ff 100644 --- a/src/main/java/com/aetherteam/aetherii/data/resources/registries/AetherIIEntityIds.java +++ b/src/main/java/com/aetherteam/aetherii/data/resources/registries/AetherIIEntityIds.java @@ -65,6 +65,7 @@ public class AetherIIEntityIds { public static final ResourceKey> LASSO_LOOP = createKey("lasso_loop"); public static final ResourceKey> SCATTERGLASS_BOLT = createKey("scatterglass_bolt"); + public static final ResourceKey> BRETTL_ROPE_BOLT = createKey("brettl_rope_bolt"); public static final ResourceKey> AMBER_DART = createKey("amber_dart"); public static final ResourceKey> TOXIC_DART = createKey("toxic_dart"); diff --git a/src/main/java/com/aetherteam/aetherii/entity/AetherIIEntityTypes.java b/src/main/java/com/aetherteam/aetherii/entity/AetherIIEntityTypes.java index 4d4b21f1f0..7a2e35233f 100644 --- a/src/main/java/com/aetherteam/aetherii/entity/AetherIIEntityTypes.java +++ b/src/main/java/com/aetherteam/aetherii/entity/AetherIIEntityTypes.java @@ -139,6 +139,8 @@ public class AetherIIEntityTypes { public static final DeferredHolder, EntityType> SCATTERGLASS_BOLT = ENTITY_TYPES.register("scatterglass_bolt", () -> EntityType.Builder.of(ScatterglassBolt::new, MobCategory.MISC).sized(0.5F, 0.5F).clientTrackingRange(4).updateInterval(20).noLootTable().build(AetherIIEntityIds.SCATTERGLASS_BOLT)); + public static final DeferredHolder, EntityType> BRETTL_ROPE_BOLT = ENTITY_TYPES.register("brettl_rope_bolt", + () -> EntityType.Builder.of(BrettlRopeBolt::new, MobCategory.MISC).sized(0.5F, 0.5F).clientTrackingRange(4).updateInterval(20).noLootTable().build(AetherIIEntityIds.BRETTL_ROPE_BOLT)); public static final DeferredHolder, EntityType> AMBER_DART = ENTITY_TYPES.register("amber_dart", () -> EntityType.Builder.of(AmberDart::new, MobCategory.MISC).sized(0.5F, 0.5F).clientTrackingRange(4).updateInterval(20).noLootTable().build(AetherIIEntityIds.AMBER_DART)); diff --git a/src/main/java/com/aetherteam/aetherii/entity/projectile/BrettlRopeBolt.java b/src/main/java/com/aetherteam/aetherii/entity/projectile/BrettlRopeBolt.java new file mode 100644 index 0000000000..4b74f05538 --- /dev/null +++ b/src/main/java/com/aetherteam/aetherii/entity/projectile/BrettlRopeBolt.java @@ -0,0 +1,65 @@ +package com.aetherteam.aetherii.entity.projectile; + +import com.aetherteam.aetherii.AetherII; +import com.aetherteam.aetherii.block.AetherIIBlockStateProperties; +import com.aetherteam.aetherii.block.AetherIIBlocks; +import com.aetherteam.aetherii.block.utility.RopeBlock; +import com.aetherteam.aetherii.block.utility.RopeStakeBlock; +import com.aetherteam.aetherii.entity.AetherIIEntityTypes; +import com.aetherteam.aetherii.item.AetherIIItems; +import net.minecraft.core.BlockPos; +import net.minecraft.core.Direction; +import net.minecraft.server.level.ServerLevel; +import net.minecraft.world.entity.EntityType; +import net.minecraft.world.entity.LivingEntity; +import net.minecraft.world.entity.projectile.arrow.AbstractArrow; +import net.minecraft.world.item.ItemStack; +import net.minecraft.world.level.Level; +import net.minecraft.world.level.block.SupportType; +import net.minecraft.world.level.block.state.BlockState; +import net.minecraft.world.level.material.FluidState; +import net.minecraft.world.level.material.Fluids; +import net.minecraft.world.phys.BlockHitResult; +import net.minecraft.world.phys.EntityHitResult; + +public class BrettlRopeBolt extends AbstractArrow { + private static final ItemStack BRETTL_ROPE_BOLT = new ItemStack(AetherIIItems.BRETTL_ROPE_BOLT.get()); + + public BrettlRopeBolt(EntityType entityType, Level level) { + super(entityType, level); + } + + public BrettlRopeBolt(Level level, double x, double y, double z, ItemStack pickupStack, ItemStack weaponStack) { + super(AetherIIEntityTypes.BRETTL_ROPE_BOLT.get(), x, y, z, level, pickupStack, weaponStack); + } + + public BrettlRopeBolt(Level level, LivingEntity owner, ItemStack pickupStack, ItemStack weaponStack) { + super(AetherIIEntityTypes.BRETTL_ROPE_BOLT.get(), owner, level, pickupStack, weaponStack); + } + + @Override + protected void onHitEntity(EntityHitResult result) { } + + @Override + protected void onHitBlock(BlockHitResult result) { + super.onHitBlock(result); + BlockPos pos = result.getBlockPos(); + Direction direction = result.getDirection(); + BlockPos placementPos = pos.relative(direction); + FluidState replacedFluidState = this.level().getFluidState(placementPos); + BlockState relativeState = this.level().getBlockState(pos); + BlockState blockState = AetherIIBlocks.BRETTL_ROPE_STAKE.get().defaultBlockState().setValue(RopeStakeBlock.CONNECTION, direction.getOpposite()).setValue(RopeStakeBlock.SPOOL, AetherIIBlockStateProperties.StakeSpoolState.NONE_CONNECTED).setValue(RopeStakeBlock.WATERLOGGED, replacedFluidState.is(Fluids.WATER)); + this.discard(); + if (direction != Direction.UP && relativeState.isFaceSturdy(this.level(), pos, direction, SupportType.CENTER)) { + this.level().setBlock(placementPos, blockState, 1 | 2); + this.level().scheduleTick(placementPos, AetherIIBlocks.BRETTL_ROPE_STAKE.get(), RopeBlock.DELAY); + } else if (this.level() instanceof ServerLevel serverLevel) { + this.spawnAtLocation(serverLevel, this.getDefaultPickupItem()); + } + } + + @Override + protected ItemStack getDefaultPickupItem() { + return BRETTL_ROPE_BOLT; + } +} diff --git a/src/main/java/com/aetherteam/aetherii/item/AetherIICreativeTabs.java b/src/main/java/com/aetherteam/aetherii/item/AetherIICreativeTabs.java index a69c13211a..d3e782fead 100644 --- a/src/main/java/com/aetherteam/aetherii/item/AetherIICreativeTabs.java +++ b/src/main/java/com/aetherteam/aetherii/item/AetherIICreativeTabs.java @@ -584,6 +584,7 @@ public class AetherIICreativeTabs { output.accept(AetherIIBlocks.ALKAHEST_PURIFIER.get()); output.accept(AetherIIBlocks.AMBROSIUM_CAMPFIRE.get()); output.accept(AetherIIBlocks.SKYROOT_LADDER.get()); + output.accept(AetherIIBlocks.BRETTL_ROPE_STAKE.get()); output.accept(AetherIIBlocks.SKYROOT_BOOKSHELF.get()); output.accept(AetherIIBlocks.GREATROOT_BOOKSHELF.get()); output.accept(AetherIIBlocks.WISPROOT_BOOKSHELF.get()); @@ -710,6 +711,7 @@ public class AetherIICreativeTabs { output.accept(AetherIIItems.SHIFTING_GLASS.get()); output.accept(AetherIIItems.AERBUNNY_BELL.get()); output.accept(AetherIIItems.BEAST_PELT_BUNDLE.get()); + output.accept(AetherIIBlocks.BRETTL_ROPE_STAKE.get()); output.accept(AetherIIItems.BRETTL_LASSO.get()); output.accept(AetherIIItems.MOA_SADDLE.get()); output.accept(AetherIIItems.MOA_SADDLEBAG.get()); @@ -759,6 +761,7 @@ public class AetherIICreativeTabs { output.accept(AetherIIItems.ARKENIUM_CROSSBOW.get()); output.accept(AetherIIItems.GRAVITITE_CROSSBOW.get()); output.accept(AetherIIItems.SCATTERGLASS_BOLT.get()); + output.accept(AetherIIItems.BRETTL_ROPE_BOLT.get()); output.accept(AetherIIItems.DART_SHOOTER.get()); output.accept(new ItemStack(AetherIIItems.AMBER_DARTS, 1, DataComponentPatch.builder().set(AetherIIDataComponents.BUILDUP_CONTENTS.get(), new BuildupContents(EffectBuildupPresets.VULNERABILITY)).build())); output.accept(new ItemStack(AetherIIItems.AMBER_DARTS, 1, DataComponentPatch.builder().set(AetherIIDataComponents.BUILDUP_CONTENTS.get(), new BuildupContents(EffectBuildupPresets.TOXIN)).build())); @@ -875,7 +878,7 @@ public class AetherIICreativeTabs { output.accept(AetherIIItems.ARCTIC_SNOWBALL.get()); output.accept(AetherIIItems.VALKYRIE_WINGS.get()); output.accept(AetherIIItems.BRETTL_GRASS.get()); - output.accept(AetherIIItems.BRETTL_ROPE.get()); + output.accept(AetherIIBlocks.BRETTL_ROPE.get()); output.accept(AetherIIItems.CLOUDTWINE.get()); output.accept(AetherIIItems.BEAST_PELT.get()); output.accept(AetherIIItems.BURRUKAI_PLATE.get()); diff --git a/src/main/java/com/aetherteam/aetherii/item/AetherIIItems.java b/src/main/java/com/aetherteam/aetherii/item/AetherIIItems.java index 636bfaa85b..d714645fb1 100644 --- a/src/main/java/com/aetherteam/aetherii/item/AetherIIItems.java +++ b/src/main/java/com/aetherteam/aetherii/item/AetherIIItems.java @@ -186,6 +186,7 @@ public class AetherIIItems { public static final DeferredItem AMBER_DARTS = register("amber_darts", AmberDartsItem::new, () -> new Item.Properties().component(AetherIIDataComponents.BUILDUP_CONTENTS, new BuildupContents(EffectBuildupPresets.VULNERABILITY)).stacksTo(16)); public static final DeferredItem SCATTERGLASS_BOLT = register("scatterglass_bolt", ScatterglassBoltItem::new); + public static final DeferredItem BRETTL_ROPE_BOLT = register("brettl_rope_bolt", BrettlRopeBoltItem::new); public static final DeferredItem HAMMER_OF_DEMOLITION = register("hammer_of_demolition", HammerOfDemolitionItem::new, () -> new Item.Properties().rarity(Rarity.RARE).component(AetherIIDataComponents.CHARMS, new Charms(new Charms.CharmHolder(Charms.Type.WEAPON, Charms.Tier.TWO), new Charms.CharmHolder(Charms.Type.WEAPON, Charms.Tier.TWO)))); @@ -277,7 +278,6 @@ public class AetherIIItems { public static final DeferredItem AECHOR_PETAL = register("aechor_petal"); public static final DeferredItem BRETTL_CANE = register("brettl_cane", (properties) -> new BlockItem(AetherIIBlocks.BRETTL_PLANT_TIP.get(), properties.useItemDescriptionPrefix())); public static final DeferredItem BRETTL_GRASS = register("brettl_grass"); - public static final DeferredItem BRETTL_ROPE = register("brettl_rope"); public static final DeferredItem ARILUM_BULBS = register("arilum_bulbs", (properties) -> new BlockItem(AetherIIBlocks.ARILUM_SHOOT.get(), properties.useItemDescriptionPrefix())); public static final DeferredItem ARCTIC_SNOWBALL = register("arctic_snowball", ArcticSnowballItem::new); public static final DeferredItem SWET_GEL = register("swet_gel", SwetGelItem::new); diff --git a/src/main/java/com/aetherteam/aetherii/item/equipment/weapons/BrettlRopeBoltItem.java b/src/main/java/com/aetherteam/aetherii/item/equipment/weapons/BrettlRopeBoltItem.java new file mode 100644 index 0000000000..8928f557ca --- /dev/null +++ b/src/main/java/com/aetherteam/aetherii/item/equipment/weapons/BrettlRopeBoltItem.java @@ -0,0 +1,21 @@ +package com.aetherteam.aetherii.item.equipment.weapons; + +import com.aetherteam.aetherii.entity.projectile.BrettlRopeBolt; +import com.aetherteam.aetherii.entity.projectile.ScatterglassBolt; +import net.minecraft.world.entity.LivingEntity; +import net.minecraft.world.entity.projectile.arrow.AbstractArrow; +import net.minecraft.world.item.ArrowItem; +import net.minecraft.world.item.ItemStack; +import net.minecraft.world.level.Level; +import org.jetbrains.annotations.Nullable; + +public class BrettlRopeBoltItem extends ArrowItem { + public BrettlRopeBoltItem(Properties properties) { + super(properties); + } + + @Override + public AbstractArrow createArrow(Level level, ItemStack stack, LivingEntity shooter, @Nullable ItemStack weaponStack) { + return new BrettlRopeBolt(level, shooter, stack.copyWithCount(1), weaponStack); + } +} diff --git a/src/main/java/com/aetherteam/aetherii/item/equipment/weapons/TieredCrossbowItem.java b/src/main/java/com/aetherteam/aetherii/item/equipment/weapons/TieredCrossbowItem.java index 13f4bdaf54..92dd3f6063 100644 --- a/src/main/java/com/aetherteam/aetherii/item/equipment/weapons/TieredCrossbowItem.java +++ b/src/main/java/com/aetherteam/aetherii/item/equipment/weapons/TieredCrossbowItem.java @@ -1,5 +1,6 @@ package com.aetherteam.aetherii.item.equipment.weapons; +import com.aetherteam.aetherii.AetherIITags; import com.aetherteam.aetherii.attachment.AetherIIDataAttachments; import com.aetherteam.aetherii.item.AetherIIItems; import net.minecraft.core.Holder; @@ -28,7 +29,7 @@ import java.util.function.Predicate; public class TieredCrossbowItem extends CrossbowItem { - public static final Predicate BOLT_ONLY = stack -> stack.is(AetherIIItems.SCATTERGLASS_BOLT); + public static final Predicate BOLT_ONLY = stack -> stack.is(AetherIITags.Items.CROSSBOW_AMMO); public TieredCrossbowItem(ToolMaterial tier, Properties properties) { super(properties.durability(tier.durability())); diff --git a/src/main/java/com/aetherteam/aetherii/mixin/mixins/common/LivingEntityMixin.java b/src/main/java/com/aetherteam/aetherii/mixin/mixins/common/LivingEntityMixin.java index 4263ee0aeb..78890e8b59 100644 --- a/src/main/java/com/aetherteam/aetherii/mixin/mixins/common/LivingEntityMixin.java +++ b/src/main/java/com/aetherteam/aetherii/mixin/mixins/common/LivingEntityMixin.java @@ -3,6 +3,7 @@ import com.aetherteam.aetherii.AetherIITags; import com.aetherteam.aetherii.advancement.trigger.AetherIIAdvancementTriggers; import com.aetherteam.aetherii.block.AetherIIBlocks; +import com.llamalad7.mixinextras.injector.wrapmethod.WrapMethod; import com.llamalad7.mixinextras.injector.wrapoperation.Operation; import com.llamalad7.mixinextras.injector.wrapoperation.WrapOperation; import net.minecraft.core.BlockPos; @@ -10,6 +11,7 @@ import net.minecraft.tags.TagKey; import net.minecraft.world.entity.LivingEntity; import net.minecraft.world.level.material.Fluid; +import net.minecraft.world.phys.Vec3; import org.spongepowered.asm.mixin.Mixin; import org.spongepowered.asm.mixin.injection.At; import org.spongepowered.asm.mixin.injection.ModifyArgs; @@ -27,6 +29,15 @@ private boolean baseTick(LivingEntity livingEntity, TagKey type, Operatio } } + @WrapOperation(method = "causeFallDamage(DFLnet/minecraft/world/damagesource/DamageSource;)Z", at = @At(value = "INVOKE", target = "Lnet/minecraft/world/entity/LivingEntity;calculateFallDamage(DF)I")) + private int causeFallDamage(LivingEntity livingEntity, double fallDistance, float damageModifier, Operation original) { + int damage = original.call(livingEntity, fallDistance, damageModifier); + if (livingEntity instanceof ServerPlayer serverPlayer) { + AetherIIAdvancementTriggers.FALL_ON_GROUND.get().trigger(serverPlayer, fallDistance, damage); + } + return damage; + } + @ModifyArgs(method = "travelInAir(Lnet/minecraft/world/phys/Vec3;)V", at = @At(value = "INVOKE", target = "Lnet/minecraft/world/entity/LivingEntity;setDeltaMovement(DDD)V")) private void travelInAir(Args args) { LivingEntity livingEntity = (LivingEntity) (Object) this; @@ -36,12 +47,12 @@ private void travelInAir(Args args) { } } - @WrapOperation(method = "causeFallDamage(DFLnet/minecraft/world/damagesource/DamageSource;)Z", at = @At(value = "INVOKE", target = "Lnet/minecraft/world/entity/LivingEntity;calculateFallDamage(DF)I")) - private int causeFallDamage(LivingEntity livingEntity, double fallDistance, float damageModifier, Operation original) { - int damage = original.call(livingEntity, fallDistance, damageModifier); - if (livingEntity instanceof ServerPlayer serverPlayer) { - AetherIIAdvancementTriggers.FALL_ON_GROUND.get().trigger(serverPlayer, fallDistance, damage); + @WrapMethod(method = "handleOnClimbable(Lnet/minecraft/world/phys/Vec3;)Lnet/minecraft/world/phys/Vec3;") + private Vec3 handleOnClimbable(Vec3 delta, Operation original) { + LivingEntity livingEntity = (LivingEntity) (Object) this; + if (livingEntity.getInBlockState().is(AetherIIBlocks.BRETTL_ROPE_STAKE) || livingEntity.getInBlockState().is(AetherIIBlocks.BRETTL_ROPE) && livingEntity.verticalCollisionBelow) { + return delta; } - return damage; + return original.call(delta); } } diff --git a/src/main/resources/assets/aether_ii/models/block/brettl_rope_cap_lower.json b/src/main/resources/assets/aether_ii/models/block/brettl_rope_cap_lower.json new file mode 100644 index 0000000000..2d7b8e32cf --- /dev/null +++ b/src/main/resources/assets/aether_ii/models/block/brettl_rope_cap_lower.json @@ -0,0 +1,28 @@ +{ + "format_version": "1.21.11", + "credit": "Made with Blockbench", + "textures": { + "particle": "aether_ii:block/climbing_rope", + "texture": "aether_ii:block/climbing_rope" + }, + "elements": [ + { + "name": "rope_end", + "from": [7, 0, 7], + "to": [9, 8, 9], + "rotation": {"angle": 0, "axis": "y", "origin": [8, 0, 8]}, + "faces": { + "up": {"uv": [12, 14, 14, 16], "texture": "#texture"} + } + } + ], + "groups": [ + { + "name": "rope_end", + "origin": [8, 0, 8], + "scope": 0, + "color": 0, + "children": [0] + } + ] +} \ No newline at end of file diff --git a/src/main/resources/assets/aether_ii/models/block/brettl_rope_cap_upper.json b/src/main/resources/assets/aether_ii/models/block/brettl_rope_cap_upper.json new file mode 100644 index 0000000000..1c755ec01f --- /dev/null +++ b/src/main/resources/assets/aether_ii/models/block/brettl_rope_cap_upper.json @@ -0,0 +1,28 @@ +{ + "format_version": "1.21.11", + "credit": "Made with Blockbench", + "textures": { + "texture": "aether_ii:block/climbing_rope", + "particle": "aether_ii:block/climbing_rope" + }, + "elements": [ + { + "name": "rope_end", + "from": [7, 8, 7], + "to": [9, 16, 9], + "rotation": {"angle": 0, "axis": "y", "origin": [8, 8, 8]}, + "faces": { + "down": {"uv": [10, 14, 12, 16], "texture": "#texture"} + } + } + ], + "groups": [ + { + "name": "rope_end", + "origin": [8, 8, 8], + "scope": 0, + "color": 0, + "children": [0, 1] + } + ] +} \ No newline at end of file diff --git a/src/main/resources/assets/aether_ii/models/block/brettl_rope_connection_lower.json b/src/main/resources/assets/aether_ii/models/block/brettl_rope_connection_lower.json new file mode 100644 index 0000000000..277f9df3ff --- /dev/null +++ b/src/main/resources/assets/aether_ii/models/block/brettl_rope_connection_lower.json @@ -0,0 +1,32 @@ +{ + "format_version": "1.21.11", + "credit": "Made with Blockbench", + "textures": { + "particle": "aether_ii:block/climbing_rope", + "texture": "aether_ii:block/climbing_rope" + }, + "elements": [ + { + "name": "rope_end", + "from": [7, 0, 7], + "to": [9, 8, 9], + "rotation": {"angle": 0, "axis": "y", "origin": [8, 0, 8]}, + "faces": { + "north": {"uv": [14, 0, 16, 8], "texture": "#texture"}, + "east": {"uv": [14, 0, 16, 8], "texture": "#texture"}, + "south": {"uv": [14, 0, 16, 8], "texture": "#texture"}, + "west": {"uv": [14, 0, 16, 8], "texture": "#texture"}, + "down": {"uv": [10, 14, 12, 16], "texture": "#texture", "cullface": "down"} + } + } + ], + "groups": [ + { + "name": "rope_end", + "origin": [8, 0, 8], + "scope": 0, + "color": 0, + "children": [0] + } + ] +} \ No newline at end of file diff --git a/src/main/resources/assets/aether_ii/models/block/brettl_rope_connection_spool_floor.json b/src/main/resources/assets/aether_ii/models/block/brettl_rope_connection_spool_floor.json new file mode 100644 index 0000000000..afa6fdc44a --- /dev/null +++ b/src/main/resources/assets/aether_ii/models/block/brettl_rope_connection_spool_floor.json @@ -0,0 +1,33 @@ +{ + "format_version": "1.21.11", + "credit": "Made with Blockbench", + "textures": { + "texture": "aether_ii:block/climbing_rope", + "particle": "aether_ii:block/climbing_rope" + }, + "elements": [ + { + "name": "rope_to_spool", + "from": [8, 2, 8], + "to": [10, 6, 10], + "rotation": {"angle": 0, "axis": "y", "origin": [8, 8, 8]}, + "faces": { + "north": {"uv": [14, 12, 16, 16], "texture": "#texture"}, + "east": {"uv": [14, 12, 16, 16], "texture": "#texture"}, + "south": {"uv": [14, 12, 16, 16], "texture": "#texture"}, + "west": {"uv": [14, 12, 16, 16], "texture": "#texture"}, + "up": {"uv": [12, 14, 14, 16], "texture": "#texture"}, + "down": {"uv": [12, 14, 14, 16], "texture": "#texture"} + } + } + ], + "groups": [ + { + "name": "stake_top_unspooled_stopped", + "origin": [8, 8, 8], + "scope": 0, + "color": 0, + "children": [0] + } + ] +} \ No newline at end of file diff --git a/src/main/resources/assets/aether_ii/models/block/brettl_rope_connection_upper.json b/src/main/resources/assets/aether_ii/models/block/brettl_rope_connection_upper.json new file mode 100644 index 0000000000..800d0f47f0 --- /dev/null +++ b/src/main/resources/assets/aether_ii/models/block/brettl_rope_connection_upper.json @@ -0,0 +1,32 @@ +{ + "format_version": "1.21.11", + "credit": "Made with Blockbench", + "textures": { + "texture": "aether_ii:block/climbing_rope", + "particle": "aether_ii:block/climbing_rope" + }, + "elements": [ + { + "name": "rope_end", + "from": [7, 8, 7], + "to": [9, 16, 9], + "rotation": {"angle": 0, "axis": "y", "origin": [8, 8, 8]}, + "faces": { + "north": {"uv": [14, 0, 16, 8], "texture": "#texture"}, + "east": {"uv": [14, 0, 16, 8], "texture": "#texture"}, + "south": {"uv": [14, 0, 16, 8], "texture": "#texture"}, + "west": {"uv": [14, 0, 16, 8], "texture": "#texture"}, + "up": {"uv": [12, 14, 14, 16], "texture": "#texture", "cullface": "up"} + } + } + ], + "groups": [ + { + "name": "rope_end", + "origin": [8, 8, 8], + "scope": 0, + "color": 0, + "children": [0] + } + ] +} \ No newline at end of file diff --git a/src/main/resources/assets/aether_ii/models/block/brettl_rope_fray.json b/src/main/resources/assets/aether_ii/models/block/brettl_rope_fray.json new file mode 100644 index 0000000000..d50d6b05c5 --- /dev/null +++ b/src/main/resources/assets/aether_ii/models/block/brettl_rope_fray.json @@ -0,0 +1,47 @@ +{ + "format_version": "1.21.11", + "credit": "Made with Blockbench", + "textures": { + "texture": "aether_ii:block/climbing_rope", + "particle": "aether_ii:block/climbing_rope" + }, + "elements": [ + { + "name": "rope_fray_2", + "from": [8, 5, 5], + "to": [8, 8, 11], + "rotation": {"x": 0, "y": 135, "z": 0, "origin": [8, 8, 8]}, + "faces": { + "north": {"uv": [0, 0, 0, 3], "texture": "#texture"}, + "east": {"uv": [7, 10, 13, 13], "texture": "#texture"}, + "south": {"uv": [0, 2, 0, 5], "texture": "#texture"}, + "west": {"uv": [7, 10, 13, 13], "texture": "#texture"}, + "up": {"uv": [0, 0, 0, 8], "texture": "#texture"}, + "down": {"uv": [0, 0, 0, 8], "texture": "#texture"} + } + }, + { + "name": "rope_fray_3", + "from": [8, 5, 5], + "to": [8, 8, 11], + "rotation": {"angle": 45, "axis": "y", "origin": [8, 8, 8]}, + "faces": { + "north": {"uv": [0, 0, 0, 3], "texture": "#texture"}, + "east": {"uv": [7, 10, 13, 13], "texture": "#texture"}, + "south": {"uv": [0, 2, 0, 5], "texture": "#texture"}, + "west": {"uv": [7, 10, 13, 13], "texture": "#texture"}, + "up": {"uv": [0, 0, 0, 8], "texture": "#texture"}, + "down": {"uv": [0, 0, 0, 8], "texture": "#texture"} + } + } + ], + "groups": [ + { + "name": "rope_end", + "origin": [8, 8, 8], + "scope": 0, + "color": 0, + "children": [0, 1] + } + ] +} \ No newline at end of file diff --git a/src/main/resources/assets/aether_ii/models/block/brettl_rope_knot.json b/src/main/resources/assets/aether_ii/models/block/brettl_rope_knot.json new file mode 100644 index 0000000000..9ffa45fec0 --- /dev/null +++ b/src/main/resources/assets/aether_ii/models/block/brettl_rope_knot.json @@ -0,0 +1,33 @@ +{ + "format_version": "1.21.11", + "credit": "Made with Blockbench", + "textures": { + "texture": "aether_ii:block/climbing_rope", + "particle": "aether_ii:block/climbing_rope" + }, + "elements": [ + { + "name": "knot", + "from": [6, 6, 6], + "to": [10, 10, 10], + "rotation": {"angle": 0, "axis": "y", "origin": [8, 8, 8]}, + "faces": { + "north": {"uv": [2, 4, 6, 8], "texture": "#texture"}, + "east": {"uv": [2, 4, 6, 8], "texture": "#texture"}, + "south": {"uv": [2, 4, 6, 8], "texture": "#texture"}, + "west": {"uv": [2, 4, 6, 8], "texture": "#texture"}, + "up": {"uv": [2, 0, 6, 4], "texture": "#texture"}, + "down": {"uv": [2, 0, 6, 4], "texture": "#texture"} + } + } + ], + "groups": [ + { + "name": "rope_knotted", + "origin": [8, 8, 8], + "scope": 0, + "color": 0, + "children": [0] + } + ] +} \ No newline at end of file diff --git a/src/main/resources/assets/aether_ii/models/block/brettl_rope_spool_floor.json b/src/main/resources/assets/aether_ii/models/block/brettl_rope_spool_floor.json new file mode 100644 index 0000000000..b1eb7c4e82 --- /dev/null +++ b/src/main/resources/assets/aether_ii/models/block/brettl_rope_spool_floor.json @@ -0,0 +1,33 @@ +{ + "format_version": "1.21.11", + "credit": "Made with Blockbench", + "textures": { + "texture": "aether_ii:block/climbing_rope", + "particle": "aether_ii:block/climbing_rope" + }, + "elements": [ + { + "name": "spool", + "from": [4, 0, 4], + "to": [12, 2, 12], + "rotation": {"angle": 0, "axis": "y", "origin": [8, 8, 8]}, + "faces": { + "north": {"uv": [6, 8, 14, 10], "texture": "#texture"}, + "east": {"uv": [6, 8, 14, 10], "texture": "#texture"}, + "south": {"uv": [6, 8, 14, 10], "texture": "#texture"}, + "west": {"uv": [6, 8, 14, 10], "texture": "#texture"}, + "up": {"uv": [6, 0, 14, 8], "texture": "#texture"}, + "down": {"uv": [6, 0, 14, 8], "texture": "#texture"} + } + } + ], + "groups": [ + { + "name": "rope_stopped", + "origin": [8, 8, 8], + "scope": 0, + "color": 0, + "children": [0] + } + ] +} \ No newline at end of file diff --git a/src/main/resources/assets/aether_ii/models/block/brettl_rope_spool_middle.json b/src/main/resources/assets/aether_ii/models/block/brettl_rope_spool_middle.json new file mode 100644 index 0000000000..ad53fd42be --- /dev/null +++ b/src/main/resources/assets/aether_ii/models/block/brettl_rope_spool_middle.json @@ -0,0 +1,33 @@ +{ + "format_version": "1.21.11", + "credit": "Made with Blockbench", + "textures": { + "texture": "aether_ii:block/climbing_rope", + "particle": "aether_ii:block/climbing_rope" + }, + "elements": [ + { + "name": "spool", + "from": [4, 7, 4], + "to": [12, 9, 12], + "rotation": {"angle": 0, "axis": "y", "origin": [8, 8, 8]}, + "faces": { + "north": {"uv": [6, 8, 14, 10], "texture": "#texture"}, + "east": {"uv": [6, 8, 14, 10], "texture": "#texture"}, + "south": {"uv": [6, 8, 14, 10], "texture": "#texture"}, + "west": {"uv": [6, 8, 14, 10], "texture": "#texture"}, + "up": {"uv": [6, 0, 14, 8], "texture": "#texture"}, + "down": {"uv": [6, 0, 14, 8], "texture": "#texture"} + } + } + ], + "groups": [ + { + "name": "stake_top_spooled", + "origin": [8, 8, 8], + "scope": 0, + "color": 0, + "children": [0] + } + ] +} \ No newline at end of file diff --git a/src/main/resources/assets/aether_ii/models/block/brettl_rope_stake.json b/src/main/resources/assets/aether_ii/models/block/brettl_rope_stake.json new file mode 100644 index 0000000000..9d14c6b39a --- /dev/null +++ b/src/main/resources/assets/aether_ii/models/block/brettl_rope_stake.json @@ -0,0 +1,61 @@ +{ + "format_version": "1.21.11", + "credit": "Made with Blockbench", + "textures": { + "texture": "aether_ii:block/climbing_rope", + "particle": "aether_ii:block/climbing_rope" + }, + "elements": [ + { + "name": "hook_1", + "from": [8, 8, 4], + "to": [8, 11, 12], + "rotation": {"angle": 45, "axis": "y", "origin": [8, 8, 8]}, + "faces": { + "north": {"uv": [0, 0, 0, 3], "texture": "#texture"}, + "east": {"uv": [0, 13, 8, 16], "texture": "#texture"}, + "south": {"uv": [0, 2, 0, 5], "texture": "#texture"}, + "west": {"uv": [0, 13, 8, 16], "texture": "#texture"}, + "up": {"uv": [0, 0, 0, 8], "texture": "#texture"}, + "down": {"uv": [0, 0, 0, 8], "texture": "#texture"} + } + }, + { + "name": "hook_2", + "from": [8, 8, 4], + "to": [8, 11, 12], + "rotation": {"x": 0, "y": 135, "z": 0, "origin": [8, 8, 8]}, + "faces": { + "north": {"uv": [0, 0, 0, 3], "texture": "#texture"}, + "east": {"uv": [0, 13, 8, 16], "texture": "#texture"}, + "south": {"uv": [0, 2, 0, 5], "texture": "#texture"}, + "west": {"uv": [0, 13, 8, 16], "texture": "#texture"}, + "up": {"uv": [0, 0, 0, 8], "texture": "#texture"}, + "down": {"uv": [0, 0, 0, 8], "texture": "#texture"} + } + }, + { + "name": "stake", + "from": [7, 0, 7], + "to": [9, 13, 9], + "rotation": {"angle": 0, "axis": "y", "origin": [8, 8, 8]}, + "faces": { + "north": {"uv": [0, 0, 2, 13], "texture": "#texture"}, + "east": {"uv": [0, 0, 2, 13], "texture": "#texture"}, + "south": {"uv": [0, 0, 2, 13], "texture": "#texture"}, + "west": {"uv": [0, 0, 2, 13], "texture": "#texture"}, + "up": {"uv": [2, 11, 4, 13], "texture": "#texture"}, + "down": {"uv": [2, 11, 4, 13], "texture": "#texture"} + } + } + ], + "groups": [ + { + "name": "stake_top_spooled", + "origin": [8, 8, 8], + "scope": 0, + "color": 0, + "children": [0, 1, 2] + } + ] +} \ No newline at end of file diff --git a/src/main/resources/assets/aether_ii/models/block/brettl_rope_stake_short.json b/src/main/resources/assets/aether_ii/models/block/brettl_rope_stake_short.json new file mode 100644 index 0000000000..5b8b2e4b44 --- /dev/null +++ b/src/main/resources/assets/aether_ii/models/block/brettl_rope_stake_short.json @@ -0,0 +1,61 @@ +{ + "format_version": "1.21.11", + "credit": "Made with Blockbench", + "textures": { + "texture": "aether_ii:block/climbing_rope", + "particle": "aether_ii:block/climbing_rope" + }, + "elements": [ + { + "name": "hook_2", + "from": [8, 8, 4], + "to": [8, 11, 12], + "rotation": {"x": 0, "y": 45, "z": 0, "origin": [8, 8, 8]}, + "faces": { + "north": {"uv": [0, 0, 0, 3], "texture": "#texture"}, + "east": {"uv": [0, 13, 8, 16], "texture": "#texture"}, + "south": {"uv": [0, 2, 0, 5], "texture": "#texture"}, + "west": {"uv": [0, 13, 8, 16], "texture": "#texture"}, + "up": {"uv": [0, 0, 0, 8], "texture": "#texture"}, + "down": {"uv": [0, 0, 0, 8], "texture": "#texture"} + } + }, + { + "name": "hook_3", + "from": [8, 8, 4], + "to": [8, 11, 12], + "rotation": {"x": 180, "y": 45, "z": -180, "origin": [8, 8, 8]}, + "faces": { + "north": {"uv": [0, 0, 0, 3], "texture": "#texture"}, + "east": {"uv": [0, 13, 8, 16], "texture": "#texture"}, + "south": {"uv": [0, 2, 0, 5], "texture": "#texture"}, + "west": {"uv": [0, 13, 8, 16], "texture": "#texture"}, + "up": {"uv": [0, 0, 0, 8], "texture": "#texture"}, + "down": {"uv": [0, 0, 0, 8], "texture": "#texture"} + } + }, + { + "name": "stake_short", + "from": [7, 0, 7], + "to": [9, 8, 9], + "rotation": {"angle": 0, "axis": "x", "origin": [8, 8, 8]}, + "faces": { + "north": {"uv": [0, 5, 2, 13], "texture": "#texture"}, + "east": {"uv": [0, 5, 2, 13], "texture": "#texture"}, + "south": {"uv": [0, 5, 2, 13], "texture": "#texture"}, + "west": {"uv": [0, 5, 2, 13], "texture": "#texture"}, + "up": {"uv": [2, 11, 4, 13], "texture": "#texture"}, + "down": {"uv": [2, 11, 4, 13], "texture": "#texture"} + } + } + ], + "groups": [ + { + "name": "stake_bottom_unspooled", + "origin": [8, 8, 8], + "scope": 0, + "color": 0, + "children": [0, 1, 2] + } + ] +} \ No newline at end of file diff --git a/src/main/resources/assets/aether_ii/models/item/mirrored_flat_item.json b/src/main/resources/assets/aether_ii/models/item/mirrored_flat_item.json new file mode 100644 index 0000000000..7a38d6cb1b --- /dev/null +++ b/src/main/resources/assets/aether_ii/models/item/mirrored_flat_item.json @@ -0,0 +1,15 @@ +{ + "parent": "item/generated", + "display": { + "firstperson_righthand": { + "rotation": [ 0, -90, 25 ], + "translation": [ 1.13, 3.2, 1.13 ], + "scale": [ 0.68, 0.68, 0.68 ] + }, + "firstperson_lefthand": { + "rotation": [ 0, 90, -25 ], + "translation": [ 1.13, 3.2, 1.13 ], + "scale": [ 0.68, 0.68, 0.68 ] + } + } +} diff --git a/src/main/resources/assets/aether_ii/textures/block/climbing_rope.png b/src/main/resources/assets/aether_ii/textures/block/climbing_rope.png new file mode 100644 index 0000000000..d5597fdcf7 Binary files /dev/null and b/src/main/resources/assets/aether_ii/textures/block/climbing_rope.png differ diff --git a/src/main/resources/assets/aether_ii/textures/block/skyroot_barrel_bottom.png b/src/main/resources/assets/aether_ii/textures/block/skyroot_barrel_bottom.png index c6c475dc2a..d3987a3cf7 100644 Binary files a/src/main/resources/assets/aether_ii/textures/block/skyroot_barrel_bottom.png and b/src/main/resources/assets/aether_ii/textures/block/skyroot_barrel_bottom.png differ diff --git a/src/main/resources/assets/aether_ii/textures/block/skyroot_barrel_side.png b/src/main/resources/assets/aether_ii/textures/block/skyroot_barrel_side.png index 9001d68317..da8a460df2 100644 Binary files a/src/main/resources/assets/aether_ii/textures/block/skyroot_barrel_side.png and b/src/main/resources/assets/aether_ii/textures/block/skyroot_barrel_side.png differ diff --git a/src/main/resources/assets/aether_ii/textures/block/skyroot_barrel_top.png b/src/main/resources/assets/aether_ii/textures/block/skyroot_barrel_top.png index 1613afed36..e827074adc 100644 Binary files a/src/main/resources/assets/aether_ii/textures/block/skyroot_barrel_top.png and b/src/main/resources/assets/aether_ii/textures/block/skyroot_barrel_top.png differ diff --git a/src/main/resources/assets/aether_ii/textures/block/skyroot_barrel_top_open.png b/src/main/resources/assets/aether_ii/textures/block/skyroot_barrel_top_open.png index 60fb59f982..2d3aeef08a 100644 Binary files a/src/main/resources/assets/aether_ii/textures/block/skyroot_barrel_top_open.png and b/src/main/resources/assets/aether_ii/textures/block/skyroot_barrel_top_open.png differ diff --git a/src/main/resources/assets/aether_ii/textures/entity/projectile/brettl_rope_bolt.png b/src/main/resources/assets/aether_ii/textures/entity/projectile/brettl_rope_bolt.png new file mode 100644 index 0000000000..d410d84a45 Binary files /dev/null and b/src/main/resources/assets/aether_ii/textures/entity/projectile/brettl_rope_bolt.png differ diff --git a/src/main/resources/assets/aether_ii/textures/item/brettl_rope_bolt.png b/src/main/resources/assets/aether_ii/textures/item/brettl_rope_bolt.png new file mode 100644 index 0000000000..c2bf1c7037 Binary files /dev/null and b/src/main/resources/assets/aether_ii/textures/item/brettl_rope_bolt.png differ diff --git a/src/main/resources/assets/aether_ii/textures/item/brettl_rope_stake.png b/src/main/resources/assets/aether_ii/textures/item/brettl_rope_stake.png new file mode 100644 index 0000000000..9394715512 Binary files /dev/null and b/src/main/resources/assets/aether_ii/textures/item/brettl_rope_stake.png differ