From 136c125f2cd2a8a8dfe9bf93d6de053564d5644a Mon Sep 17 00:00:00 2001 From: Ellpeck Date: Thu, 23 Jan 2020 16:05:52 +0100 Subject: [PATCH] misc changes, including item drops --- .gitignore | 3 +- build.gradle | 4 + .../data/forge/tags/items/rods/wooden.json | 6 ++ .../data/minecraft/tags/blocks/leaves.json | 8 ++ .../data/minecraft/tags/blocks/logs.json | 7 ++ .../data/minecraft/tags/blocks/planks.json | 6 ++ .../data/minecraft/tags/blocks/rails.json | 8 ++ .../data/minecraft/tags/blocks/slabs.json | 8 ++ .../data/minecraft/tags/blocks/stairs.json | 8 ++ .../data/minecraft/tags/items/leaves.json | 8 ++ .../data/minecraft/tags/items/logs.json | 7 ++ .../data/minecraft/tags/items/planks.json | 6 ++ .../data/minecraft/tags/items/rails.json | 8 ++ .../data/minecraft/tags/items/slabs.json | 8 ++ .../data/minecraft/tags/items/stairs.json | 8 ++ .../loot_tables/blocks/ancient_bark.json | 20 ++++ .../loot_tables/blocks/ancient_leaves.json | 20 ++++ .../loot_tables/blocks/ancient_log.json | 20 ++++ .../loot_tables/blocks/ancient_planks.json | 20 ++++ .../loot_tables/blocks/ancient_sapling.json | 20 ++++ .../loot_tables/blocks/ancient_slab.json | 33 +++++++ .../loot_tables/blocks/ancient_stairs.json | 20 ++++ .../loot_tables/blocks/animal_generator.json | 20 ++++ .../loot_tables/blocks/animal_spawner.json | 20 ++++ .../loot_tables/blocks/aura_detector.json | 20 ++++ .../loot_tables/blocks/auto_crafter.json | 20 ++++ .../loot_tables/blocks/chunk_loader.json | 20 ++++ .../blocks/conversion_catalyst.json | 20 ++++ .../loot_tables/blocks/crushing_catalyst.json | 20 ++++ .../loot_tables/blocks/decayed_leaves.json | 20 ++++ .../blocks/dimension_rail_end.json | 20 ++++ .../blocks/dimension_rail_nether.json | 20 ++++ .../blocks/dimension_rail_overworld.json | 20 ++++ .../loot_tables/blocks/end_flower.json | 20 ++++ .../loot_tables/blocks/ender_crate.json | 20 ++++ .../loot_tables/blocks/field_creator.json | 20 ++++ .../blocks/firework_generator.json | 20 ++++ .../loot_tables/blocks/flower_generator.json | 20 ++++ .../loot_tables/blocks/furnace_heater.json | 20 ++++ .../blocks/generator_limit_remover.json | 20 ++++ .../loot_tables/blocks/gold_brick.json | 20 ++++ .../loot_tables/blocks/gold_powder.json | 20 ++++ .../loot_tables/blocks/golden_leaves.json | 20 ++++ .../loot_tables/blocks/grated_chute.json | 20 ++++ .../loot_tables/blocks/hopper_upgrade.json | 20 ++++ .../loot_tables/blocks/infused_brick.json | 20 ++++ .../blocks/infused_brick_slab.json | 33 +++++++ .../blocks/infused_brick_stairs.json | 20 ++++ .../blocks/infused_iron_block.json | 20 ++++ .../loot_tables/blocks/infused_slab.json | 33 +++++++ .../loot_tables/blocks/infused_stairs.json | 20 ++++ .../loot_tables/blocks/infused_stone.json | 20 ++++ .../loot_tables/blocks/moss_generator.json | 20 ++++ .../loot_tables/blocks/nature_altar.json | 20 ++++ .../loot_tables/blocks/oak_generator.json | 20 ++++ .../loot_tables/blocks/offering_table.json | 20 ++++ .../loot_tables/blocks/pickup_stopper.json | 20 ++++ .../loot_tables/blocks/placer.json | 20 ++++ .../loot_tables/blocks/potion_generator.json | 20 ++++ .../loot_tables/blocks/powder_placer.json | 20 ++++ .../blocks/projectile_generator.json | 20 ++++ .../loot_tables/blocks/rf_converter.json | 20 ++++ .../loot_tables/blocks/spawn_lamp.json | 20 ++++ .../loot_tables/blocks/time_changer.json | 20 ++++ .../loot_tables/blocks/wood_stand.json | 20 ++++ .../java/de/ellpeck/naturesaura/Helper.java | 4 - .../de/ellpeck/naturesaura/NaturesAura.java | 6 -- .../api/aura/chunk/IDrainSpotEffect.java | 8 +- .../blocks/BlockAnimalGenerator.java | 5 +- .../blocks/BlockContainerImpl.java | 51 ++++++---- .../naturesaura/blocks/BlockEndFlower.java | 42 ++++---- .../naturesaura/blocks/BlockGoldPowder.java | 1 - .../naturesaura/blocks/BlockGratedChute.java | 69 +++++++++++--- .../naturesaura/blocks/BlockNatureAltar.java | 38 +++----- .../blocks/BlockOfferingTable.java | 33 ++----- .../naturesaura/blocks/BlockPowderPlacer.java | 41 ++------ .../naturesaura/blocks/BlockSpawnLamp.java | 42 ++------ .../naturesaura/blocks/BlockWoodStand.java | 44 ++------- .../blocks/tiles/TileEntityEndFlower.java | 4 +- .../blocks/tiles/TileEntityEnderCrate.java | 11 +-- .../blocks/tiles/TileEntityImpl.java | 18 +--- .../blocks/tiles/TileEntityOfferingTable.java | 8 +- .../ellpeck/naturesaura/chunk/AuraChunk.java | 7 +- .../chunk/effect/AnimalEffect.java | 10 +- .../chunk/effect/BreathlessEffect.java | 8 +- .../chunk/effect/CacheRechargeEffect.java | 10 +- .../chunk/effect/ExplosionEffect.java | 8 +- .../chunk/effect/GrassDieEffect.java | 8 +- .../chunk/effect/OreSpawnEffect.java | 10 +- .../chunk/effect/PlantBoostEffect.java | 10 +- .../naturesaura/events/CommonEvents.java | 5 + .../naturesaura/misc/BlockLootProvider.java | 82 ++++++++++++++++ .../naturesaura/misc/BlockTagProvider.java | 22 +++++ .../naturesaura/misc/ItemTagProvider.java | 26 +++++ .../ellpeck/naturesaura/reg/ModRegistry.java | 95 +++++-------------- .../naturesaura/models/block/wood_stand.json | 15 +-- .../data/forge/tags/items/rods/wooden.json | 6 -- .../data/minecraft/tags/blocks/leaves.json | 6 -- .../data/minecraft/tags/blocks/logs.json | 7 -- .../data/minecraft/tags/blocks/planks.json | 6 -- .../data/minecraft/tags/items/leaves.json | 6 -- .../data/minecraft/tags/items/logs.json | 7 -- .../data/minecraft/tags/items/planks.json | 6 -- 103 files changed, 1523 insertions(+), 404 deletions(-) create mode 100644 src/generated/resources/data/forge/tags/items/rods/wooden.json create mode 100644 src/generated/resources/data/minecraft/tags/blocks/leaves.json create mode 100644 src/generated/resources/data/minecraft/tags/blocks/logs.json create mode 100644 src/generated/resources/data/minecraft/tags/blocks/planks.json create mode 100644 src/generated/resources/data/minecraft/tags/blocks/rails.json create mode 100644 src/generated/resources/data/minecraft/tags/blocks/slabs.json create mode 100644 src/generated/resources/data/minecraft/tags/blocks/stairs.json create mode 100644 src/generated/resources/data/minecraft/tags/items/leaves.json create mode 100644 src/generated/resources/data/minecraft/tags/items/logs.json create mode 100644 src/generated/resources/data/minecraft/tags/items/planks.json create mode 100644 src/generated/resources/data/minecraft/tags/items/rails.json create mode 100644 src/generated/resources/data/minecraft/tags/items/slabs.json create mode 100644 src/generated/resources/data/minecraft/tags/items/stairs.json create mode 100644 src/generated/resources/data/naturesaura/loot_tables/blocks/ancient_bark.json create mode 100644 src/generated/resources/data/naturesaura/loot_tables/blocks/ancient_leaves.json create mode 100644 src/generated/resources/data/naturesaura/loot_tables/blocks/ancient_log.json create mode 100644 src/generated/resources/data/naturesaura/loot_tables/blocks/ancient_planks.json create mode 100644 src/generated/resources/data/naturesaura/loot_tables/blocks/ancient_sapling.json create mode 100644 src/generated/resources/data/naturesaura/loot_tables/blocks/ancient_slab.json create mode 100644 src/generated/resources/data/naturesaura/loot_tables/blocks/ancient_stairs.json create mode 100644 src/generated/resources/data/naturesaura/loot_tables/blocks/animal_generator.json create mode 100644 src/generated/resources/data/naturesaura/loot_tables/blocks/animal_spawner.json create mode 100644 src/generated/resources/data/naturesaura/loot_tables/blocks/aura_detector.json create mode 100644 src/generated/resources/data/naturesaura/loot_tables/blocks/auto_crafter.json create mode 100644 src/generated/resources/data/naturesaura/loot_tables/blocks/chunk_loader.json create mode 100644 src/generated/resources/data/naturesaura/loot_tables/blocks/conversion_catalyst.json create mode 100644 src/generated/resources/data/naturesaura/loot_tables/blocks/crushing_catalyst.json create mode 100644 src/generated/resources/data/naturesaura/loot_tables/blocks/decayed_leaves.json create mode 100644 src/generated/resources/data/naturesaura/loot_tables/blocks/dimension_rail_end.json create mode 100644 src/generated/resources/data/naturesaura/loot_tables/blocks/dimension_rail_nether.json create mode 100644 src/generated/resources/data/naturesaura/loot_tables/blocks/dimension_rail_overworld.json create mode 100644 src/generated/resources/data/naturesaura/loot_tables/blocks/end_flower.json create mode 100644 src/generated/resources/data/naturesaura/loot_tables/blocks/ender_crate.json create mode 100644 src/generated/resources/data/naturesaura/loot_tables/blocks/field_creator.json create mode 100644 src/generated/resources/data/naturesaura/loot_tables/blocks/firework_generator.json create mode 100644 src/generated/resources/data/naturesaura/loot_tables/blocks/flower_generator.json create mode 100644 src/generated/resources/data/naturesaura/loot_tables/blocks/furnace_heater.json create mode 100644 src/generated/resources/data/naturesaura/loot_tables/blocks/generator_limit_remover.json create mode 100644 src/generated/resources/data/naturesaura/loot_tables/blocks/gold_brick.json create mode 100644 src/generated/resources/data/naturesaura/loot_tables/blocks/gold_powder.json create mode 100644 src/generated/resources/data/naturesaura/loot_tables/blocks/golden_leaves.json create mode 100644 src/generated/resources/data/naturesaura/loot_tables/blocks/grated_chute.json create mode 100644 src/generated/resources/data/naturesaura/loot_tables/blocks/hopper_upgrade.json create mode 100644 src/generated/resources/data/naturesaura/loot_tables/blocks/infused_brick.json create mode 100644 src/generated/resources/data/naturesaura/loot_tables/blocks/infused_brick_slab.json create mode 100644 src/generated/resources/data/naturesaura/loot_tables/blocks/infused_brick_stairs.json create mode 100644 src/generated/resources/data/naturesaura/loot_tables/blocks/infused_iron_block.json create mode 100644 src/generated/resources/data/naturesaura/loot_tables/blocks/infused_slab.json create mode 100644 src/generated/resources/data/naturesaura/loot_tables/blocks/infused_stairs.json create mode 100644 src/generated/resources/data/naturesaura/loot_tables/blocks/infused_stone.json create mode 100644 src/generated/resources/data/naturesaura/loot_tables/blocks/moss_generator.json create mode 100644 src/generated/resources/data/naturesaura/loot_tables/blocks/nature_altar.json create mode 100644 src/generated/resources/data/naturesaura/loot_tables/blocks/oak_generator.json create mode 100644 src/generated/resources/data/naturesaura/loot_tables/blocks/offering_table.json create mode 100644 src/generated/resources/data/naturesaura/loot_tables/blocks/pickup_stopper.json create mode 100644 src/generated/resources/data/naturesaura/loot_tables/blocks/placer.json create mode 100644 src/generated/resources/data/naturesaura/loot_tables/blocks/potion_generator.json create mode 100644 src/generated/resources/data/naturesaura/loot_tables/blocks/powder_placer.json create mode 100644 src/generated/resources/data/naturesaura/loot_tables/blocks/projectile_generator.json create mode 100644 src/generated/resources/data/naturesaura/loot_tables/blocks/rf_converter.json create mode 100644 src/generated/resources/data/naturesaura/loot_tables/blocks/spawn_lamp.json create mode 100644 src/generated/resources/data/naturesaura/loot_tables/blocks/time_changer.json create mode 100644 src/generated/resources/data/naturesaura/loot_tables/blocks/wood_stand.json create mode 100644 src/main/java/de/ellpeck/naturesaura/misc/BlockLootProvider.java create mode 100644 src/main/java/de/ellpeck/naturesaura/misc/BlockTagProvider.java create mode 100644 src/main/java/de/ellpeck/naturesaura/misc/ItemTagProvider.java delete mode 100644 src/main/resources/data/forge/tags/items/rods/wooden.json delete mode 100644 src/main/resources/data/minecraft/tags/blocks/leaves.json delete mode 100644 src/main/resources/data/minecraft/tags/blocks/logs.json delete mode 100644 src/main/resources/data/minecraft/tags/blocks/planks.json delete mode 100644 src/main/resources/data/minecraft/tags/items/leaves.json delete mode 100644 src/main/resources/data/minecraft/tags/items/logs.json delete mode 100644 src/main/resources/data/minecraft/tags/items/planks.json diff --git a/.gitignore b/.gitignore index 45a3bec5..96a7fcf3 100644 --- a/.gitignore +++ b/.gitignore @@ -18,4 +18,5 @@ .settings/org.eclipse.buildship.core.prefs *.launch .settings/org.eclipse.jdt.core.prefs -*.prefs \ No newline at end of file +*.prefs +.cache \ No newline at end of file diff --git a/build.gradle b/build.gradle index 3eaee48a..de827152 100644 --- a/build.gradle +++ b/build.gradle @@ -75,6 +75,10 @@ minecraft { } } +sourceSets.main.resources { + srcDir 'src/generated/resources' +} + repositories { maven { url = "https://dvs1.progwml6.com/files/maven" diff --git a/src/generated/resources/data/forge/tags/items/rods/wooden.json b/src/generated/resources/data/forge/tags/items/rods/wooden.json new file mode 100644 index 00000000..701329ee --- /dev/null +++ b/src/generated/resources/data/forge/tags/items/rods/wooden.json @@ -0,0 +1,6 @@ +{ + "replace": false, + "values": [ + "naturesaura:ancient_stick" + ] +} \ No newline at end of file diff --git a/src/generated/resources/data/minecraft/tags/blocks/leaves.json b/src/generated/resources/data/minecraft/tags/blocks/leaves.json new file mode 100644 index 00000000..b696baa6 --- /dev/null +++ b/src/generated/resources/data/minecraft/tags/blocks/leaves.json @@ -0,0 +1,8 @@ +{ + "replace": false, + "values": [ + "naturesaura:golden_leaves", + "naturesaura:ancient_leaves", + "naturesaura:decayed_leaves" + ] +} \ No newline at end of file diff --git a/src/generated/resources/data/minecraft/tags/blocks/logs.json b/src/generated/resources/data/minecraft/tags/blocks/logs.json new file mode 100644 index 00000000..0d24c10b --- /dev/null +++ b/src/generated/resources/data/minecraft/tags/blocks/logs.json @@ -0,0 +1,7 @@ +{ + "replace": false, + "values": [ + "naturesaura:ancient_log", + "naturesaura:ancient_bark" + ] +} \ No newline at end of file diff --git a/src/generated/resources/data/minecraft/tags/blocks/planks.json b/src/generated/resources/data/minecraft/tags/blocks/planks.json new file mode 100644 index 00000000..32412936 --- /dev/null +++ b/src/generated/resources/data/minecraft/tags/blocks/planks.json @@ -0,0 +1,6 @@ +{ + "replace": false, + "values": [ + "naturesaura:ancient_planks" + ] +} \ No newline at end of file diff --git a/src/generated/resources/data/minecraft/tags/blocks/rails.json b/src/generated/resources/data/minecraft/tags/blocks/rails.json new file mode 100644 index 00000000..6056f802 --- /dev/null +++ b/src/generated/resources/data/minecraft/tags/blocks/rails.json @@ -0,0 +1,8 @@ +{ + "replace": false, + "values": [ + "naturesaura:dimension_rail_end", + "naturesaura:dimension_rail_nether", + "naturesaura:dimension_rail_overworld" + ] +} \ No newline at end of file diff --git a/src/generated/resources/data/minecraft/tags/blocks/slabs.json b/src/generated/resources/data/minecraft/tags/blocks/slabs.json new file mode 100644 index 00000000..ecf5b639 --- /dev/null +++ b/src/generated/resources/data/minecraft/tags/blocks/slabs.json @@ -0,0 +1,8 @@ +{ + "replace": false, + "values": [ + "naturesaura:ancient_slab", + "naturesaura:infused_slab", + "naturesaura:infused_brick_slab" + ] +} \ No newline at end of file diff --git a/src/generated/resources/data/minecraft/tags/blocks/stairs.json b/src/generated/resources/data/minecraft/tags/blocks/stairs.json new file mode 100644 index 00000000..17989bb6 --- /dev/null +++ b/src/generated/resources/data/minecraft/tags/blocks/stairs.json @@ -0,0 +1,8 @@ +{ + "replace": false, + "values": [ + "naturesaura:ancient_stairs", + "naturesaura:infused_brick_stairs", + "naturesaura:infused_stairs" + ] +} \ No newline at end of file diff --git a/src/generated/resources/data/minecraft/tags/items/leaves.json b/src/generated/resources/data/minecraft/tags/items/leaves.json new file mode 100644 index 00000000..b696baa6 --- /dev/null +++ b/src/generated/resources/data/minecraft/tags/items/leaves.json @@ -0,0 +1,8 @@ +{ + "replace": false, + "values": [ + "naturesaura:golden_leaves", + "naturesaura:ancient_leaves", + "naturesaura:decayed_leaves" + ] +} \ No newline at end of file diff --git a/src/generated/resources/data/minecraft/tags/items/logs.json b/src/generated/resources/data/minecraft/tags/items/logs.json new file mode 100644 index 00000000..0d24c10b --- /dev/null +++ b/src/generated/resources/data/minecraft/tags/items/logs.json @@ -0,0 +1,7 @@ +{ + "replace": false, + "values": [ + "naturesaura:ancient_log", + "naturesaura:ancient_bark" + ] +} \ No newline at end of file diff --git a/src/generated/resources/data/minecraft/tags/items/planks.json b/src/generated/resources/data/minecraft/tags/items/planks.json new file mode 100644 index 00000000..32412936 --- /dev/null +++ b/src/generated/resources/data/minecraft/tags/items/planks.json @@ -0,0 +1,6 @@ +{ + "replace": false, + "values": [ + "naturesaura:ancient_planks" + ] +} \ No newline at end of file diff --git a/src/generated/resources/data/minecraft/tags/items/rails.json b/src/generated/resources/data/minecraft/tags/items/rails.json new file mode 100644 index 00000000..6056f802 --- /dev/null +++ b/src/generated/resources/data/minecraft/tags/items/rails.json @@ -0,0 +1,8 @@ +{ + "replace": false, + "values": [ + "naturesaura:dimension_rail_end", + "naturesaura:dimension_rail_nether", + "naturesaura:dimension_rail_overworld" + ] +} \ No newline at end of file diff --git a/src/generated/resources/data/minecraft/tags/items/slabs.json b/src/generated/resources/data/minecraft/tags/items/slabs.json new file mode 100644 index 00000000..ecf5b639 --- /dev/null +++ b/src/generated/resources/data/minecraft/tags/items/slabs.json @@ -0,0 +1,8 @@ +{ + "replace": false, + "values": [ + "naturesaura:ancient_slab", + "naturesaura:infused_slab", + "naturesaura:infused_brick_slab" + ] +} \ No newline at end of file diff --git a/src/generated/resources/data/minecraft/tags/items/stairs.json b/src/generated/resources/data/minecraft/tags/items/stairs.json new file mode 100644 index 00000000..17989bb6 --- /dev/null +++ b/src/generated/resources/data/minecraft/tags/items/stairs.json @@ -0,0 +1,8 @@ +{ + "replace": false, + "values": [ + "naturesaura:ancient_stairs", + "naturesaura:infused_brick_stairs", + "naturesaura:infused_stairs" + ] +} \ No newline at end of file diff --git a/src/generated/resources/data/naturesaura/loot_tables/blocks/ancient_bark.json b/src/generated/resources/data/naturesaura/loot_tables/blocks/ancient_bark.json new file mode 100644 index 00000000..fb9dd4f8 --- /dev/null +++ b/src/generated/resources/data/naturesaura/loot_tables/blocks/ancient_bark.json @@ -0,0 +1,20 @@ +{ + "type": "minecraft:block", + "pools": [ + { + "name": "main", + "rolls": 1, + "entries": [ + { + "type": "minecraft:item", + "name": "naturesaura:ancient_bark" + } + ], + "conditions": [ + { + "condition": "minecraft:survives_explosion" + } + ] + } + ] +} \ No newline at end of file diff --git a/src/generated/resources/data/naturesaura/loot_tables/blocks/ancient_leaves.json b/src/generated/resources/data/naturesaura/loot_tables/blocks/ancient_leaves.json new file mode 100644 index 00000000..709f6354 --- /dev/null +++ b/src/generated/resources/data/naturesaura/loot_tables/blocks/ancient_leaves.json @@ -0,0 +1,20 @@ +{ + "type": "minecraft:block", + "pools": [ + { + "name": "main", + "rolls": 1, + "entries": [ + { + "type": "minecraft:item", + "name": "naturesaura:ancient_leaves" + } + ], + "conditions": [ + { + "condition": "minecraft:survives_explosion" + } + ] + } + ] +} \ No newline at end of file diff --git a/src/generated/resources/data/naturesaura/loot_tables/blocks/ancient_log.json b/src/generated/resources/data/naturesaura/loot_tables/blocks/ancient_log.json new file mode 100644 index 00000000..2e7f0e32 --- /dev/null +++ b/src/generated/resources/data/naturesaura/loot_tables/blocks/ancient_log.json @@ -0,0 +1,20 @@ +{ + "type": "minecraft:block", + "pools": [ + { + "name": "main", + "rolls": 1, + "entries": [ + { + "type": "minecraft:item", + "name": "naturesaura:ancient_log" + } + ], + "conditions": [ + { + "condition": "minecraft:survives_explosion" + } + ] + } + ] +} \ No newline at end of file diff --git a/src/generated/resources/data/naturesaura/loot_tables/blocks/ancient_planks.json b/src/generated/resources/data/naturesaura/loot_tables/blocks/ancient_planks.json new file mode 100644 index 00000000..60b3c983 --- /dev/null +++ b/src/generated/resources/data/naturesaura/loot_tables/blocks/ancient_planks.json @@ -0,0 +1,20 @@ +{ + "type": "minecraft:block", + "pools": [ + { + "name": "main", + "rolls": 1, + "entries": [ + { + "type": "minecraft:item", + "name": "naturesaura:ancient_planks" + } + ], + "conditions": [ + { + "condition": "minecraft:survives_explosion" + } + ] + } + ] +} \ No newline at end of file diff --git a/src/generated/resources/data/naturesaura/loot_tables/blocks/ancient_sapling.json b/src/generated/resources/data/naturesaura/loot_tables/blocks/ancient_sapling.json new file mode 100644 index 00000000..d3d71ee1 --- /dev/null +++ b/src/generated/resources/data/naturesaura/loot_tables/blocks/ancient_sapling.json @@ -0,0 +1,20 @@ +{ + "type": "minecraft:block", + "pools": [ + { + "name": "main", + "rolls": 1, + "entries": [ + { + "type": "minecraft:item", + "name": "naturesaura:ancient_sapling" + } + ], + "conditions": [ + { + "condition": "minecraft:survives_explosion" + } + ] + } + ] +} \ No newline at end of file diff --git a/src/generated/resources/data/naturesaura/loot_tables/blocks/ancient_slab.json b/src/generated/resources/data/naturesaura/loot_tables/blocks/ancient_slab.json new file mode 100644 index 00000000..7ebfa5b1 --- /dev/null +++ b/src/generated/resources/data/naturesaura/loot_tables/blocks/ancient_slab.json @@ -0,0 +1,33 @@ +{ + "type": "minecraft:block", + "pools": [ + { + "name": "main", + "rolls": 1, + "entries": [ + { + "type": "minecraft:item", + "functions": [ + { + "function": "minecraft:set_count", + "conditions": [ + { + "condition": "minecraft:block_state_property", + "block": "naturesaura:ancient_slab", + "properties": { + "type": "double" + } + } + ], + "count": 2 + }, + { + "function": "minecraft:explosion_decay" + } + ], + "name": "naturesaura:ancient_slab" + } + ] + } + ] +} \ No newline at end of file diff --git a/src/generated/resources/data/naturesaura/loot_tables/blocks/ancient_stairs.json b/src/generated/resources/data/naturesaura/loot_tables/blocks/ancient_stairs.json new file mode 100644 index 00000000..7c649e5a --- /dev/null +++ b/src/generated/resources/data/naturesaura/loot_tables/blocks/ancient_stairs.json @@ -0,0 +1,20 @@ +{ + "type": "minecraft:block", + "pools": [ + { + "name": "main", + "rolls": 1, + "entries": [ + { + "type": "minecraft:item", + "name": "naturesaura:ancient_stairs" + } + ], + "conditions": [ + { + "condition": "minecraft:survives_explosion" + } + ] + } + ] +} \ No newline at end of file diff --git a/src/generated/resources/data/naturesaura/loot_tables/blocks/animal_generator.json b/src/generated/resources/data/naturesaura/loot_tables/blocks/animal_generator.json new file mode 100644 index 00000000..2c0f7788 --- /dev/null +++ b/src/generated/resources/data/naturesaura/loot_tables/blocks/animal_generator.json @@ -0,0 +1,20 @@ +{ + "type": "minecraft:block", + "pools": [ + { + "name": "main", + "rolls": 1, + "entries": [ + { + "type": "minecraft:item", + "name": "naturesaura:animal_generator" + } + ], + "conditions": [ + { + "condition": "minecraft:survives_explosion" + } + ] + } + ] +} \ No newline at end of file diff --git a/src/generated/resources/data/naturesaura/loot_tables/blocks/animal_spawner.json b/src/generated/resources/data/naturesaura/loot_tables/blocks/animal_spawner.json new file mode 100644 index 00000000..7b0fecf8 --- /dev/null +++ b/src/generated/resources/data/naturesaura/loot_tables/blocks/animal_spawner.json @@ -0,0 +1,20 @@ +{ + "type": "minecraft:block", + "pools": [ + { + "name": "main", + "rolls": 1, + "entries": [ + { + "type": "minecraft:item", + "name": "naturesaura:animal_spawner" + } + ], + "conditions": [ + { + "condition": "minecraft:survives_explosion" + } + ] + } + ] +} \ No newline at end of file diff --git a/src/generated/resources/data/naturesaura/loot_tables/blocks/aura_detector.json b/src/generated/resources/data/naturesaura/loot_tables/blocks/aura_detector.json new file mode 100644 index 00000000..c32a265b --- /dev/null +++ b/src/generated/resources/data/naturesaura/loot_tables/blocks/aura_detector.json @@ -0,0 +1,20 @@ +{ + "type": "minecraft:block", + "pools": [ + { + "name": "main", + "rolls": 1, + "entries": [ + { + "type": "minecraft:item", + "name": "naturesaura:aura_detector" + } + ], + "conditions": [ + { + "condition": "minecraft:survives_explosion" + } + ] + } + ] +} \ No newline at end of file diff --git a/src/generated/resources/data/naturesaura/loot_tables/blocks/auto_crafter.json b/src/generated/resources/data/naturesaura/loot_tables/blocks/auto_crafter.json new file mode 100644 index 00000000..51973046 --- /dev/null +++ b/src/generated/resources/data/naturesaura/loot_tables/blocks/auto_crafter.json @@ -0,0 +1,20 @@ +{ + "type": "minecraft:block", + "pools": [ + { + "name": "main", + "rolls": 1, + "entries": [ + { + "type": "minecraft:item", + "name": "naturesaura:auto_crafter" + } + ], + "conditions": [ + { + "condition": "minecraft:survives_explosion" + } + ] + } + ] +} \ No newline at end of file diff --git a/src/generated/resources/data/naturesaura/loot_tables/blocks/chunk_loader.json b/src/generated/resources/data/naturesaura/loot_tables/blocks/chunk_loader.json new file mode 100644 index 00000000..02109e21 --- /dev/null +++ b/src/generated/resources/data/naturesaura/loot_tables/blocks/chunk_loader.json @@ -0,0 +1,20 @@ +{ + "type": "minecraft:block", + "pools": [ + { + "name": "main", + "rolls": 1, + "entries": [ + { + "type": "minecraft:item", + "name": "naturesaura:chunk_loader" + } + ], + "conditions": [ + { + "condition": "minecraft:survives_explosion" + } + ] + } + ] +} \ No newline at end of file diff --git a/src/generated/resources/data/naturesaura/loot_tables/blocks/conversion_catalyst.json b/src/generated/resources/data/naturesaura/loot_tables/blocks/conversion_catalyst.json new file mode 100644 index 00000000..d513bc1e --- /dev/null +++ b/src/generated/resources/data/naturesaura/loot_tables/blocks/conversion_catalyst.json @@ -0,0 +1,20 @@ +{ + "type": "minecraft:block", + "pools": [ + { + "name": "main", + "rolls": 1, + "entries": [ + { + "type": "minecraft:item", + "name": "naturesaura:conversion_catalyst" + } + ], + "conditions": [ + { + "condition": "minecraft:survives_explosion" + } + ] + } + ] +} \ No newline at end of file diff --git a/src/generated/resources/data/naturesaura/loot_tables/blocks/crushing_catalyst.json b/src/generated/resources/data/naturesaura/loot_tables/blocks/crushing_catalyst.json new file mode 100644 index 00000000..2e87f567 --- /dev/null +++ b/src/generated/resources/data/naturesaura/loot_tables/blocks/crushing_catalyst.json @@ -0,0 +1,20 @@ +{ + "type": "minecraft:block", + "pools": [ + { + "name": "main", + "rolls": 1, + "entries": [ + { + "type": "minecraft:item", + "name": "naturesaura:crushing_catalyst" + } + ], + "conditions": [ + { + "condition": "minecraft:survives_explosion" + } + ] + } + ] +} \ No newline at end of file diff --git a/src/generated/resources/data/naturesaura/loot_tables/blocks/decayed_leaves.json b/src/generated/resources/data/naturesaura/loot_tables/blocks/decayed_leaves.json new file mode 100644 index 00000000..9e0328fb --- /dev/null +++ b/src/generated/resources/data/naturesaura/loot_tables/blocks/decayed_leaves.json @@ -0,0 +1,20 @@ +{ + "type": "minecraft:block", + "pools": [ + { + "name": "main", + "rolls": 1, + "entries": [ + { + "type": "minecraft:item", + "name": "naturesaura:decayed_leaves" + } + ], + "conditions": [ + { + "condition": "minecraft:survives_explosion" + } + ] + } + ] +} \ No newline at end of file diff --git a/src/generated/resources/data/naturesaura/loot_tables/blocks/dimension_rail_end.json b/src/generated/resources/data/naturesaura/loot_tables/blocks/dimension_rail_end.json new file mode 100644 index 00000000..3fe7c6fb --- /dev/null +++ b/src/generated/resources/data/naturesaura/loot_tables/blocks/dimension_rail_end.json @@ -0,0 +1,20 @@ +{ + "type": "minecraft:block", + "pools": [ + { + "name": "main", + "rolls": 1, + "entries": [ + { + "type": "minecraft:item", + "name": "naturesaura:dimension_rail_end" + } + ], + "conditions": [ + { + "condition": "minecraft:survives_explosion" + } + ] + } + ] +} \ No newline at end of file diff --git a/src/generated/resources/data/naturesaura/loot_tables/blocks/dimension_rail_nether.json b/src/generated/resources/data/naturesaura/loot_tables/blocks/dimension_rail_nether.json new file mode 100644 index 00000000..9257232b --- /dev/null +++ b/src/generated/resources/data/naturesaura/loot_tables/blocks/dimension_rail_nether.json @@ -0,0 +1,20 @@ +{ + "type": "minecraft:block", + "pools": [ + { + "name": "main", + "rolls": 1, + "entries": [ + { + "type": "minecraft:item", + "name": "naturesaura:dimension_rail_nether" + } + ], + "conditions": [ + { + "condition": "minecraft:survives_explosion" + } + ] + } + ] +} \ No newline at end of file diff --git a/src/generated/resources/data/naturesaura/loot_tables/blocks/dimension_rail_overworld.json b/src/generated/resources/data/naturesaura/loot_tables/blocks/dimension_rail_overworld.json new file mode 100644 index 00000000..e549f1d7 --- /dev/null +++ b/src/generated/resources/data/naturesaura/loot_tables/blocks/dimension_rail_overworld.json @@ -0,0 +1,20 @@ +{ + "type": "minecraft:block", + "pools": [ + { + "name": "main", + "rolls": 1, + "entries": [ + { + "type": "minecraft:item", + "name": "naturesaura:dimension_rail_overworld" + } + ], + "conditions": [ + { + "condition": "minecraft:survives_explosion" + } + ] + } + ] +} \ No newline at end of file diff --git a/src/generated/resources/data/naturesaura/loot_tables/blocks/end_flower.json b/src/generated/resources/data/naturesaura/loot_tables/blocks/end_flower.json new file mode 100644 index 00000000..0378d7b7 --- /dev/null +++ b/src/generated/resources/data/naturesaura/loot_tables/blocks/end_flower.json @@ -0,0 +1,20 @@ +{ + "type": "minecraft:block", + "pools": [ + { + "name": "main", + "rolls": 1, + "entries": [ + { + "type": "minecraft:item", + "name": "naturesaura:end_flower" + } + ], + "conditions": [ + { + "condition": "minecraft:survives_explosion" + } + ] + } + ] +} \ No newline at end of file diff --git a/src/generated/resources/data/naturesaura/loot_tables/blocks/ender_crate.json b/src/generated/resources/data/naturesaura/loot_tables/blocks/ender_crate.json new file mode 100644 index 00000000..6b5591f2 --- /dev/null +++ b/src/generated/resources/data/naturesaura/loot_tables/blocks/ender_crate.json @@ -0,0 +1,20 @@ +{ + "type": "minecraft:block", + "pools": [ + { + "name": "main", + "rolls": 1, + "entries": [ + { + "type": "minecraft:item", + "name": "naturesaura:ender_crate" + } + ], + "conditions": [ + { + "condition": "minecraft:survives_explosion" + } + ] + } + ] +} \ No newline at end of file diff --git a/src/generated/resources/data/naturesaura/loot_tables/blocks/field_creator.json b/src/generated/resources/data/naturesaura/loot_tables/blocks/field_creator.json new file mode 100644 index 00000000..99d8c559 --- /dev/null +++ b/src/generated/resources/data/naturesaura/loot_tables/blocks/field_creator.json @@ -0,0 +1,20 @@ +{ + "type": "minecraft:block", + "pools": [ + { + "name": "main", + "rolls": 1, + "entries": [ + { + "type": "minecraft:item", + "name": "naturesaura:field_creator" + } + ], + "conditions": [ + { + "condition": "minecraft:survives_explosion" + } + ] + } + ] +} \ No newline at end of file diff --git a/src/generated/resources/data/naturesaura/loot_tables/blocks/firework_generator.json b/src/generated/resources/data/naturesaura/loot_tables/blocks/firework_generator.json new file mode 100644 index 00000000..2e3275f9 --- /dev/null +++ b/src/generated/resources/data/naturesaura/loot_tables/blocks/firework_generator.json @@ -0,0 +1,20 @@ +{ + "type": "minecraft:block", + "pools": [ + { + "name": "main", + "rolls": 1, + "entries": [ + { + "type": "minecraft:item", + "name": "naturesaura:firework_generator" + } + ], + "conditions": [ + { + "condition": "minecraft:survives_explosion" + } + ] + } + ] +} \ No newline at end of file diff --git a/src/generated/resources/data/naturesaura/loot_tables/blocks/flower_generator.json b/src/generated/resources/data/naturesaura/loot_tables/blocks/flower_generator.json new file mode 100644 index 00000000..02e5a405 --- /dev/null +++ b/src/generated/resources/data/naturesaura/loot_tables/blocks/flower_generator.json @@ -0,0 +1,20 @@ +{ + "type": "minecraft:block", + "pools": [ + { + "name": "main", + "rolls": 1, + "entries": [ + { + "type": "minecraft:item", + "name": "naturesaura:flower_generator" + } + ], + "conditions": [ + { + "condition": "minecraft:survives_explosion" + } + ] + } + ] +} \ No newline at end of file diff --git a/src/generated/resources/data/naturesaura/loot_tables/blocks/furnace_heater.json b/src/generated/resources/data/naturesaura/loot_tables/blocks/furnace_heater.json new file mode 100644 index 00000000..4d7098f9 --- /dev/null +++ b/src/generated/resources/data/naturesaura/loot_tables/blocks/furnace_heater.json @@ -0,0 +1,20 @@ +{ + "type": "minecraft:block", + "pools": [ + { + "name": "main", + "rolls": 1, + "entries": [ + { + "type": "minecraft:item", + "name": "naturesaura:furnace_heater" + } + ], + "conditions": [ + { + "condition": "minecraft:survives_explosion" + } + ] + } + ] +} \ No newline at end of file diff --git a/src/generated/resources/data/naturesaura/loot_tables/blocks/generator_limit_remover.json b/src/generated/resources/data/naturesaura/loot_tables/blocks/generator_limit_remover.json new file mode 100644 index 00000000..7e888f2c --- /dev/null +++ b/src/generated/resources/data/naturesaura/loot_tables/blocks/generator_limit_remover.json @@ -0,0 +1,20 @@ +{ + "type": "minecraft:block", + "pools": [ + { + "name": "main", + "rolls": 1, + "entries": [ + { + "type": "minecraft:item", + "name": "naturesaura:generator_limit_remover" + } + ], + "conditions": [ + { + "condition": "minecraft:survives_explosion" + } + ] + } + ] +} \ No newline at end of file diff --git a/src/generated/resources/data/naturesaura/loot_tables/blocks/gold_brick.json b/src/generated/resources/data/naturesaura/loot_tables/blocks/gold_brick.json new file mode 100644 index 00000000..545b7331 --- /dev/null +++ b/src/generated/resources/data/naturesaura/loot_tables/blocks/gold_brick.json @@ -0,0 +1,20 @@ +{ + "type": "minecraft:block", + "pools": [ + { + "name": "main", + "rolls": 1, + "entries": [ + { + "type": "minecraft:item", + "name": "naturesaura:gold_brick" + } + ], + "conditions": [ + { + "condition": "minecraft:survives_explosion" + } + ] + } + ] +} \ No newline at end of file diff --git a/src/generated/resources/data/naturesaura/loot_tables/blocks/gold_powder.json b/src/generated/resources/data/naturesaura/loot_tables/blocks/gold_powder.json new file mode 100644 index 00000000..d2d982ae --- /dev/null +++ b/src/generated/resources/data/naturesaura/loot_tables/blocks/gold_powder.json @@ -0,0 +1,20 @@ +{ + "type": "minecraft:block", + "pools": [ + { + "name": "main", + "rolls": 1, + "entries": [ + { + "type": "minecraft:item", + "name": "naturesaura:gold_powder" + } + ], + "conditions": [ + { + "condition": "minecraft:survives_explosion" + } + ] + } + ] +} \ No newline at end of file diff --git a/src/generated/resources/data/naturesaura/loot_tables/blocks/golden_leaves.json b/src/generated/resources/data/naturesaura/loot_tables/blocks/golden_leaves.json new file mode 100644 index 00000000..c2a454ee --- /dev/null +++ b/src/generated/resources/data/naturesaura/loot_tables/blocks/golden_leaves.json @@ -0,0 +1,20 @@ +{ + "type": "minecraft:block", + "pools": [ + { + "name": "main", + "rolls": 1, + "entries": [ + { + "type": "minecraft:item", + "name": "naturesaura:golden_leaves" + } + ], + "conditions": [ + { + "condition": "minecraft:survives_explosion" + } + ] + } + ] +} \ No newline at end of file diff --git a/src/generated/resources/data/naturesaura/loot_tables/blocks/grated_chute.json b/src/generated/resources/data/naturesaura/loot_tables/blocks/grated_chute.json new file mode 100644 index 00000000..3d802fb9 --- /dev/null +++ b/src/generated/resources/data/naturesaura/loot_tables/blocks/grated_chute.json @@ -0,0 +1,20 @@ +{ + "type": "minecraft:block", + "pools": [ + { + "name": "main", + "rolls": 1, + "entries": [ + { + "type": "minecraft:item", + "name": "naturesaura:grated_chute" + } + ], + "conditions": [ + { + "condition": "minecraft:survives_explosion" + } + ] + } + ] +} \ No newline at end of file diff --git a/src/generated/resources/data/naturesaura/loot_tables/blocks/hopper_upgrade.json b/src/generated/resources/data/naturesaura/loot_tables/blocks/hopper_upgrade.json new file mode 100644 index 00000000..ce6571dc --- /dev/null +++ b/src/generated/resources/data/naturesaura/loot_tables/blocks/hopper_upgrade.json @@ -0,0 +1,20 @@ +{ + "type": "minecraft:block", + "pools": [ + { + "name": "main", + "rolls": 1, + "entries": [ + { + "type": "minecraft:item", + "name": "naturesaura:hopper_upgrade" + } + ], + "conditions": [ + { + "condition": "minecraft:survives_explosion" + } + ] + } + ] +} \ No newline at end of file diff --git a/src/generated/resources/data/naturesaura/loot_tables/blocks/infused_brick.json b/src/generated/resources/data/naturesaura/loot_tables/blocks/infused_brick.json new file mode 100644 index 00000000..9416b401 --- /dev/null +++ b/src/generated/resources/data/naturesaura/loot_tables/blocks/infused_brick.json @@ -0,0 +1,20 @@ +{ + "type": "minecraft:block", + "pools": [ + { + "name": "main", + "rolls": 1, + "entries": [ + { + "type": "minecraft:item", + "name": "naturesaura:infused_brick" + } + ], + "conditions": [ + { + "condition": "minecraft:survives_explosion" + } + ] + } + ] +} \ No newline at end of file diff --git a/src/generated/resources/data/naturesaura/loot_tables/blocks/infused_brick_slab.json b/src/generated/resources/data/naturesaura/loot_tables/blocks/infused_brick_slab.json new file mode 100644 index 00000000..48c512fa --- /dev/null +++ b/src/generated/resources/data/naturesaura/loot_tables/blocks/infused_brick_slab.json @@ -0,0 +1,33 @@ +{ + "type": "minecraft:block", + "pools": [ + { + "name": "main", + "rolls": 1, + "entries": [ + { + "type": "minecraft:item", + "functions": [ + { + "function": "minecraft:set_count", + "conditions": [ + { + "condition": "minecraft:block_state_property", + "block": "naturesaura:infused_brick_slab", + "properties": { + "type": "double" + } + } + ], + "count": 2 + }, + { + "function": "minecraft:explosion_decay" + } + ], + "name": "naturesaura:infused_brick_slab" + } + ] + } + ] +} \ No newline at end of file diff --git a/src/generated/resources/data/naturesaura/loot_tables/blocks/infused_brick_stairs.json b/src/generated/resources/data/naturesaura/loot_tables/blocks/infused_brick_stairs.json new file mode 100644 index 00000000..198ddc04 --- /dev/null +++ b/src/generated/resources/data/naturesaura/loot_tables/blocks/infused_brick_stairs.json @@ -0,0 +1,20 @@ +{ + "type": "minecraft:block", + "pools": [ + { + "name": "main", + "rolls": 1, + "entries": [ + { + "type": "minecraft:item", + "name": "naturesaura:infused_brick_stairs" + } + ], + "conditions": [ + { + "condition": "minecraft:survives_explosion" + } + ] + } + ] +} \ No newline at end of file diff --git a/src/generated/resources/data/naturesaura/loot_tables/blocks/infused_iron_block.json b/src/generated/resources/data/naturesaura/loot_tables/blocks/infused_iron_block.json new file mode 100644 index 00000000..675fc7f8 --- /dev/null +++ b/src/generated/resources/data/naturesaura/loot_tables/blocks/infused_iron_block.json @@ -0,0 +1,20 @@ +{ + "type": "minecraft:block", + "pools": [ + { + "name": "main", + "rolls": 1, + "entries": [ + { + "type": "minecraft:item", + "name": "naturesaura:infused_iron_block" + } + ], + "conditions": [ + { + "condition": "minecraft:survives_explosion" + } + ] + } + ] +} \ No newline at end of file diff --git a/src/generated/resources/data/naturesaura/loot_tables/blocks/infused_slab.json b/src/generated/resources/data/naturesaura/loot_tables/blocks/infused_slab.json new file mode 100644 index 00000000..605d2efa --- /dev/null +++ b/src/generated/resources/data/naturesaura/loot_tables/blocks/infused_slab.json @@ -0,0 +1,33 @@ +{ + "type": "minecraft:block", + "pools": [ + { + "name": "main", + "rolls": 1, + "entries": [ + { + "type": "minecraft:item", + "functions": [ + { + "function": "minecraft:set_count", + "conditions": [ + { + "condition": "minecraft:block_state_property", + "block": "naturesaura:infused_slab", + "properties": { + "type": "double" + } + } + ], + "count": 2 + }, + { + "function": "minecraft:explosion_decay" + } + ], + "name": "naturesaura:infused_slab" + } + ] + } + ] +} \ No newline at end of file diff --git a/src/generated/resources/data/naturesaura/loot_tables/blocks/infused_stairs.json b/src/generated/resources/data/naturesaura/loot_tables/blocks/infused_stairs.json new file mode 100644 index 00000000..b3a017d5 --- /dev/null +++ b/src/generated/resources/data/naturesaura/loot_tables/blocks/infused_stairs.json @@ -0,0 +1,20 @@ +{ + "type": "minecraft:block", + "pools": [ + { + "name": "main", + "rolls": 1, + "entries": [ + { + "type": "minecraft:item", + "name": "naturesaura:infused_stairs" + } + ], + "conditions": [ + { + "condition": "minecraft:survives_explosion" + } + ] + } + ] +} \ No newline at end of file diff --git a/src/generated/resources/data/naturesaura/loot_tables/blocks/infused_stone.json b/src/generated/resources/data/naturesaura/loot_tables/blocks/infused_stone.json new file mode 100644 index 00000000..2886e2ef --- /dev/null +++ b/src/generated/resources/data/naturesaura/loot_tables/blocks/infused_stone.json @@ -0,0 +1,20 @@ +{ + "type": "minecraft:block", + "pools": [ + { + "name": "main", + "rolls": 1, + "entries": [ + { + "type": "minecraft:item", + "name": "naturesaura:infused_stone" + } + ], + "conditions": [ + { + "condition": "minecraft:survives_explosion" + } + ] + } + ] +} \ No newline at end of file diff --git a/src/generated/resources/data/naturesaura/loot_tables/blocks/moss_generator.json b/src/generated/resources/data/naturesaura/loot_tables/blocks/moss_generator.json new file mode 100644 index 00000000..3d9c0994 --- /dev/null +++ b/src/generated/resources/data/naturesaura/loot_tables/blocks/moss_generator.json @@ -0,0 +1,20 @@ +{ + "type": "minecraft:block", + "pools": [ + { + "name": "main", + "rolls": 1, + "entries": [ + { + "type": "minecraft:item", + "name": "naturesaura:moss_generator" + } + ], + "conditions": [ + { + "condition": "minecraft:survives_explosion" + } + ] + } + ] +} \ No newline at end of file diff --git a/src/generated/resources/data/naturesaura/loot_tables/blocks/nature_altar.json b/src/generated/resources/data/naturesaura/loot_tables/blocks/nature_altar.json new file mode 100644 index 00000000..11e8e83b --- /dev/null +++ b/src/generated/resources/data/naturesaura/loot_tables/blocks/nature_altar.json @@ -0,0 +1,20 @@ +{ + "type": "minecraft:block", + "pools": [ + { + "name": "main", + "rolls": 1, + "entries": [ + { + "type": "minecraft:item", + "name": "naturesaura:nature_altar" + } + ], + "conditions": [ + { + "condition": "minecraft:survives_explosion" + } + ] + } + ] +} \ No newline at end of file diff --git a/src/generated/resources/data/naturesaura/loot_tables/blocks/oak_generator.json b/src/generated/resources/data/naturesaura/loot_tables/blocks/oak_generator.json new file mode 100644 index 00000000..fd0e88ef --- /dev/null +++ b/src/generated/resources/data/naturesaura/loot_tables/blocks/oak_generator.json @@ -0,0 +1,20 @@ +{ + "type": "minecraft:block", + "pools": [ + { + "name": "main", + "rolls": 1, + "entries": [ + { + "type": "minecraft:item", + "name": "naturesaura:oak_generator" + } + ], + "conditions": [ + { + "condition": "minecraft:survives_explosion" + } + ] + } + ] +} \ No newline at end of file diff --git a/src/generated/resources/data/naturesaura/loot_tables/blocks/offering_table.json b/src/generated/resources/data/naturesaura/loot_tables/blocks/offering_table.json new file mode 100644 index 00000000..92b8d25d --- /dev/null +++ b/src/generated/resources/data/naturesaura/loot_tables/blocks/offering_table.json @@ -0,0 +1,20 @@ +{ + "type": "minecraft:block", + "pools": [ + { + "name": "main", + "rolls": 1, + "entries": [ + { + "type": "minecraft:item", + "name": "naturesaura:offering_table" + } + ], + "conditions": [ + { + "condition": "minecraft:survives_explosion" + } + ] + } + ] +} \ No newline at end of file diff --git a/src/generated/resources/data/naturesaura/loot_tables/blocks/pickup_stopper.json b/src/generated/resources/data/naturesaura/loot_tables/blocks/pickup_stopper.json new file mode 100644 index 00000000..8158d94e --- /dev/null +++ b/src/generated/resources/data/naturesaura/loot_tables/blocks/pickup_stopper.json @@ -0,0 +1,20 @@ +{ + "type": "minecraft:block", + "pools": [ + { + "name": "main", + "rolls": 1, + "entries": [ + { + "type": "minecraft:item", + "name": "naturesaura:pickup_stopper" + } + ], + "conditions": [ + { + "condition": "minecraft:survives_explosion" + } + ] + } + ] +} \ No newline at end of file diff --git a/src/generated/resources/data/naturesaura/loot_tables/blocks/placer.json b/src/generated/resources/data/naturesaura/loot_tables/blocks/placer.json new file mode 100644 index 00000000..be2d2e0b --- /dev/null +++ b/src/generated/resources/data/naturesaura/loot_tables/blocks/placer.json @@ -0,0 +1,20 @@ +{ + "type": "minecraft:block", + "pools": [ + { + "name": "main", + "rolls": 1, + "entries": [ + { + "type": "minecraft:item", + "name": "naturesaura:placer" + } + ], + "conditions": [ + { + "condition": "minecraft:survives_explosion" + } + ] + } + ] +} \ No newline at end of file diff --git a/src/generated/resources/data/naturesaura/loot_tables/blocks/potion_generator.json b/src/generated/resources/data/naturesaura/loot_tables/blocks/potion_generator.json new file mode 100644 index 00000000..2960ae85 --- /dev/null +++ b/src/generated/resources/data/naturesaura/loot_tables/blocks/potion_generator.json @@ -0,0 +1,20 @@ +{ + "type": "minecraft:block", + "pools": [ + { + "name": "main", + "rolls": 1, + "entries": [ + { + "type": "minecraft:item", + "name": "naturesaura:potion_generator" + } + ], + "conditions": [ + { + "condition": "minecraft:survives_explosion" + } + ] + } + ] +} \ No newline at end of file diff --git a/src/generated/resources/data/naturesaura/loot_tables/blocks/powder_placer.json b/src/generated/resources/data/naturesaura/loot_tables/blocks/powder_placer.json new file mode 100644 index 00000000..f0314c7a --- /dev/null +++ b/src/generated/resources/data/naturesaura/loot_tables/blocks/powder_placer.json @@ -0,0 +1,20 @@ +{ + "type": "minecraft:block", + "pools": [ + { + "name": "main", + "rolls": 1, + "entries": [ + { + "type": "minecraft:item", + "name": "naturesaura:powder_placer" + } + ], + "conditions": [ + { + "condition": "minecraft:survives_explosion" + } + ] + } + ] +} \ No newline at end of file diff --git a/src/generated/resources/data/naturesaura/loot_tables/blocks/projectile_generator.json b/src/generated/resources/data/naturesaura/loot_tables/blocks/projectile_generator.json new file mode 100644 index 00000000..b23bcc05 --- /dev/null +++ b/src/generated/resources/data/naturesaura/loot_tables/blocks/projectile_generator.json @@ -0,0 +1,20 @@ +{ + "type": "minecraft:block", + "pools": [ + { + "name": "main", + "rolls": 1, + "entries": [ + { + "type": "minecraft:item", + "name": "naturesaura:projectile_generator" + } + ], + "conditions": [ + { + "condition": "minecraft:survives_explosion" + } + ] + } + ] +} \ No newline at end of file diff --git a/src/generated/resources/data/naturesaura/loot_tables/blocks/rf_converter.json b/src/generated/resources/data/naturesaura/loot_tables/blocks/rf_converter.json new file mode 100644 index 00000000..219e8642 --- /dev/null +++ b/src/generated/resources/data/naturesaura/loot_tables/blocks/rf_converter.json @@ -0,0 +1,20 @@ +{ + "type": "minecraft:block", + "pools": [ + { + "name": "main", + "rolls": 1, + "entries": [ + { + "type": "minecraft:item", + "name": "naturesaura:rf_converter" + } + ], + "conditions": [ + { + "condition": "minecraft:survives_explosion" + } + ] + } + ] +} \ No newline at end of file diff --git a/src/generated/resources/data/naturesaura/loot_tables/blocks/spawn_lamp.json b/src/generated/resources/data/naturesaura/loot_tables/blocks/spawn_lamp.json new file mode 100644 index 00000000..55aa606d --- /dev/null +++ b/src/generated/resources/data/naturesaura/loot_tables/blocks/spawn_lamp.json @@ -0,0 +1,20 @@ +{ + "type": "minecraft:block", + "pools": [ + { + "name": "main", + "rolls": 1, + "entries": [ + { + "type": "minecraft:item", + "name": "naturesaura:spawn_lamp" + } + ], + "conditions": [ + { + "condition": "minecraft:survives_explosion" + } + ] + } + ] +} \ No newline at end of file diff --git a/src/generated/resources/data/naturesaura/loot_tables/blocks/time_changer.json b/src/generated/resources/data/naturesaura/loot_tables/blocks/time_changer.json new file mode 100644 index 00000000..9041613d --- /dev/null +++ b/src/generated/resources/data/naturesaura/loot_tables/blocks/time_changer.json @@ -0,0 +1,20 @@ +{ + "type": "minecraft:block", + "pools": [ + { + "name": "main", + "rolls": 1, + "entries": [ + { + "type": "minecraft:item", + "name": "naturesaura:time_changer" + } + ], + "conditions": [ + { + "condition": "minecraft:survives_explosion" + } + ] + } + ] +} \ No newline at end of file diff --git a/src/generated/resources/data/naturesaura/loot_tables/blocks/wood_stand.json b/src/generated/resources/data/naturesaura/loot_tables/blocks/wood_stand.json new file mode 100644 index 00000000..7c89b587 --- /dev/null +++ b/src/generated/resources/data/naturesaura/loot_tables/blocks/wood_stand.json @@ -0,0 +1,20 @@ +{ + "type": "minecraft:block", + "pools": [ + { + "name": "main", + "rolls": 1, + "entries": [ + { + "type": "minecraft:item", + "name": "naturesaura:wood_stand" + } + ], + "conditions": [ + { + "condition": "minecraft:survives_explosion" + } + ] + } + ] +} \ No newline at end of file diff --git a/src/main/java/de/ellpeck/naturesaura/Helper.java b/src/main/java/de/ellpeck/naturesaura/Helper.java index f9d00bae..f140fcbf 100644 --- a/src/main/java/de/ellpeck/naturesaura/Helper.java +++ b/src/main/java/de/ellpeck/naturesaura/Helper.java @@ -123,13 +123,9 @@ public final class Helper { if (!stack.isEmpty()) { GlStateManager.pushMatrix(); GlStateManager.disableLighting(); - GlStateManager.pushTextureAttributes(); - GlStateManager.pushLightingAttributes(); RenderHelper.enableStandardItemLighting(); Minecraft.getInstance().getItemRenderer().renderItem(stack, ItemCameraTransforms.TransformType.FIXED); RenderHelper.disableStandardItemLighting(); - GlStateManager.popAttributes(); - GlStateManager.popAttributes(); GlStateManager.enableLighting(); GlStateManager.popMatrix(); } diff --git a/src/main/java/de/ellpeck/naturesaura/NaturesAura.java b/src/main/java/de/ellpeck/naturesaura/NaturesAura.java index c640fbbf..cc67f3fa 100644 --- a/src/main/java/de/ellpeck/naturesaura/NaturesAura.java +++ b/src/main/java/de/ellpeck/naturesaura/NaturesAura.java @@ -66,12 +66,6 @@ public final class NaturesAura { } public void setup(FMLCommonSetupEvent event) { - Helper.populateObjectHolders(ModBlocks.class, ForgeRegistries.BLOCKS); - Helper.populateObjectHolders(ModTileEntities.class, ForgeRegistries.TILE_ENTITIES); - Helper.populateObjectHolders(ModEntities.class, ForgeRegistries.ENTITIES); - Helper.populateObjectHolders(ModItems.class, ForgeRegistries.ITEMS); - Helper.populateObjectHolders(ModPotions.class, ForgeRegistries.POTIONS); - this.preInit(event); this.init(event); this.postInit(event); diff --git a/src/main/java/de/ellpeck/naturesaura/api/aura/chunk/IDrainSpotEffect.java b/src/main/java/de/ellpeck/naturesaura/api/aura/chunk/IDrainSpotEffect.java index 38f79b62..be06ee39 100644 --- a/src/main/java/de/ellpeck/naturesaura/api/aura/chunk/IDrainSpotEffect.java +++ b/src/main/java/de/ellpeck/naturesaura/api/aura/chunk/IDrainSpotEffect.java @@ -16,11 +16,15 @@ public interface IDrainSpotEffect { ResourceLocation getName(); - default int isActiveHere(PlayerEntity player, Chunk chunk, IAuraChunk auraChunk, BlockPos pos, Integer spot) { - return -1; + default ActiveType isActiveHere(PlayerEntity player, Chunk chunk, IAuraChunk auraChunk, BlockPos pos, Integer spot) { + return ActiveType.INACTIVE; } default ItemStack getDisplayIcon() { return ItemStack.EMPTY; } + + public enum ActiveType { + INACTIVE, INHIBITED, ACTIVE + } } diff --git a/src/main/java/de/ellpeck/naturesaura/blocks/BlockAnimalGenerator.java b/src/main/java/de/ellpeck/naturesaura/blocks/BlockAnimalGenerator.java index 425ef5f0..18dd3e17 100644 --- a/src/main/java/de/ellpeck/naturesaura/blocks/BlockAnimalGenerator.java +++ b/src/main/java/de/ellpeck/naturesaura/blocks/BlockAnimalGenerator.java @@ -3,8 +3,9 @@ package de.ellpeck.naturesaura.blocks; import de.ellpeck.naturesaura.Helper; import de.ellpeck.naturesaura.NaturesAura; import de.ellpeck.naturesaura.api.render.IVisualizable; -import de.ellpeck.naturesaura.blocks.tiles.ModTileEntities; import de.ellpeck.naturesaura.blocks.tiles.TileEntityAnimalGenerator; +import de.ellpeck.naturesaura.packet.PacketHandler; +import de.ellpeck.naturesaura.packet.PacketParticles; import net.minecraft.block.SoundType; import net.minecraft.block.material.Material; import net.minecraft.entity.INPC; @@ -71,13 +72,11 @@ public class BlockAnimalGenerator extends BlockContainerImpl implements IVisuali gen.setGenerationValues(time, amount); BlockPos genPos = gen.getPos(); - /* TODO PacketHandler.sendToAllAround(entity.world, pos, 32, new PacketParticles( (float) entity.posX, (float) entity.posY, (float) entity.posZ, 17, child ? 1 : 0, (int) (entity.getEyeHeight() * 10F), genPos.getX(), genPos.getY(), genPos.getZ())); - */ return true; }); diff --git a/src/main/java/de/ellpeck/naturesaura/blocks/BlockContainerImpl.java b/src/main/java/de/ellpeck/naturesaura/blocks/BlockContainerImpl.java index a0eb4ab4..57b596be 100644 --- a/src/main/java/de/ellpeck/naturesaura/blocks/BlockContainerImpl.java +++ b/src/main/java/de/ellpeck/naturesaura/blocks/BlockContainerImpl.java @@ -12,9 +12,13 @@ import net.minecraft.item.ItemStack; import net.minecraft.tileentity.TileEntity; import net.minecraft.util.math.BlockPos; import net.minecraft.world.IBlockReader; +import net.minecraft.world.IWorld; import net.minecraft.world.World; +import net.minecraft.world.storage.loot.LootContext; +import net.minecraft.world.storage.loot.LootParameters; import javax.annotation.Nullable; +import java.util.List; import java.util.Random; import java.util.function.Supplier; @@ -49,31 +53,36 @@ public class BlockContainerImpl extends ContainerBlock implements IModItem, IMod return BlockRenderType.MODEL; } -/* TODO this @Override - public void breakBlock(World worldIn, BlockPos pos, BlockState state) { - if (!worldIn.isRemote) { + @Override + public void onPlayerDestroy(IWorld worldIn, BlockPos pos, BlockState state) { + super.onPlayerDestroy(worldIn, pos, state); + } + + @Override + public List getDrops(BlockState state, LootContext.Builder builder) { + List drops = super.getDrops(state, builder); + + TileEntity tile = builder.get(LootParameters.BLOCK_ENTITY); + if (tile instanceof TileEntityImpl) { + for (ItemStack stack : drops) { + if (stack.getItem() != this.asItem()) + continue; + ((TileEntityImpl) tile).modifyDrop(stack); + break; + } + } + return drops; + } + + @Override + public void onReplaced(BlockState state, World worldIn, BlockPos pos, BlockState newState, boolean isMoving) { + if (state.getBlock() != newState.getBlock()) { TileEntity tile = worldIn.getTileEntity(pos); if (tile instanceof TileEntityImpl) ((TileEntityImpl) tile).dropInventory(); } - super.breakBlock(worldIn, pos, state); - }*/ -/* - TODO drop stuff - @Override - public List getDrops(BlockState state, LootContext.Builder builder) { - TileEntity tile = builder.getWorld().getTileEntity(builder.get(LootParameters.POSITION)); - - if (tile instanceof TileEntityImpl) - drops.add(((TileEntityImpl) tile).getDrop(state, fortune)); - else - super.getDrops(drops, world, pos, state, fortune); - }*/ - - /* @Override - public boolean removedByPlayer(BlockState state, World world, BlockPos pos, PlayerEntity player, boolean willHarvest) { - return willHarvest || super.removedByPlayer(state, world, pos, player, false); - }*/ + super.onReplaced(state, worldIn, pos, newState, isMoving); + } @Override public void harvestBlock(World worldIn, PlayerEntity player, BlockPos pos, BlockState state, @Nullable TileEntity te, ItemStack stack) { diff --git a/src/main/java/de/ellpeck/naturesaura/blocks/BlockEndFlower.java b/src/main/java/de/ellpeck/naturesaura/blocks/BlockEndFlower.java index e8472a3c..31248599 100644 --- a/src/main/java/de/ellpeck/naturesaura/blocks/BlockEndFlower.java +++ b/src/main/java/de/ellpeck/naturesaura/blocks/BlockEndFlower.java @@ -5,10 +5,7 @@ import de.ellpeck.naturesaura.reg.IModItem; import de.ellpeck.naturesaura.reg.IModelProvider; import de.ellpeck.naturesaura.reg.ModRegistry; import de.ellpeck.naturesaura.reg.ModTileType; -import net.minecraft.block.BlockState; -import net.minecraft.block.Blocks; -import net.minecraft.block.BushBlock; -import net.minecraft.block.SoundType; +import net.minecraft.block.*; import net.minecraft.block.material.Material; import net.minecraft.entity.LivingEntity; import net.minecraft.entity.boss.dragon.EnderDragonEntity; @@ -16,12 +13,14 @@ import net.minecraft.entity.player.PlayerEntity; import net.minecraft.fluid.IFluidState; import net.minecraft.item.ItemStack; import net.minecraft.tileentity.TileEntity; -import net.minecraft.util.Direction; import net.minecraft.util.math.BlockPos; +import net.minecraft.util.math.Vec3d; +import net.minecraft.util.math.shapes.ISelectionContext; +import net.minecraft.util.math.shapes.VoxelShape; import net.minecraft.world.IBlockReader; +import net.minecraft.world.IWorldReader; import net.minecraft.world.World; import net.minecraft.world.gen.Heightmap; -import net.minecraftforge.common.IPlantable; import net.minecraftforge.common.MinecraftForge; import net.minecraftforge.event.entity.living.LivingEvent.LivingUpdateEvent; import net.minecraftforge.eventbus.api.SubscribeEvent; @@ -30,13 +29,21 @@ import javax.annotation.Nullable; public class BlockEndFlower extends BushBlock implements IModItem, IModelProvider { + protected static final VoxelShape SHAPE = Block.makeCuboidShape(5.0D, 0.0D, 5.0D, 11.0D, 10.0D, 11.0D); + public BlockEndFlower() { - super(ModBlocks.prop(Material.PLANTS).hardnessAndResistance(0.5F).sound(SoundType.PLANT)); + super(ModBlocks.prop(Material.PLANTS).doesNotBlockMovement().hardnessAndResistance(0.5F).sound(SoundType.PLANT)); MinecraftForge.EVENT_BUS.register(this); ModRegistry.add(this); ModRegistry.add(new ModTileType<>(TileEntityEndFlower::new, this)); } + @Override + public VoxelShape getShape(BlockState state, IBlockReader worldIn, BlockPos pos, ISelectionContext context) { + Vec3d vec3d = state.getOffset(worldIn, pos); + return SHAPE.withOffset(vec3d.x, vec3d.y, vec3d.z); + } + @SubscribeEvent public void onDragonTick(LivingUpdateEvent event) { LivingEntity living = event.getEntityLiving(); @@ -59,31 +66,34 @@ public class BlockEndFlower extends BushBlock implements IModItem, IModelProvide } @Override - public boolean canSustainPlant(BlockState state, IBlockReader world, BlockPos pos, Direction facing, IPlantable plantable) { + protected boolean isValidGround(BlockState state, IBlockReader worldIn, BlockPos pos) { return state.getBlock() == Blocks.END_STONE; } + @Override + public boolean isValidPosition(BlockState state, IWorldReader worldIn, BlockPos pos) { + return worldIn.getBlockState(pos.down()).getBlock() == Blocks.END_STONE; + } + @Override public String getBaseName() { return "end_flower"; } - /* - @Override - public void onInit(FMLInitializationEvent event) { - GameRegistry.registerTileEntity(TileEntityEndFlower.class, new ResourceLocation(NaturesAura.MOD_ID, "end_flower")); - } - */ - @Nullable @Override public TileEntity createTileEntity(BlockState state, IBlockReader world) { return new TileEntityEndFlower(); } + @Override + public boolean hasTileEntity(BlockState state) { + return true; + } + @Override public boolean removedByPlayer(BlockState state, World world, BlockPos pos, PlayerEntity player, boolean willHarvest, IFluidState fluid) { - return willHarvest || super.removedByPlayer(state, world, pos, player, false, fluid); + return willHarvest || super.removedByPlayer(state, world, pos, player, willHarvest, fluid); } @Override diff --git a/src/main/java/de/ellpeck/naturesaura/blocks/BlockGoldPowder.java b/src/main/java/de/ellpeck/naturesaura/blocks/BlockGoldPowder.java index a9c70e17..af92314e 100644 --- a/src/main/java/de/ellpeck/naturesaura/blocks/BlockGoldPowder.java +++ b/src/main/java/de/ellpeck/naturesaura/blocks/BlockGoldPowder.java @@ -22,7 +22,6 @@ import net.minecraftforge.api.distmarker.OnlyIn; import javax.annotation.Nullable; -// TODO public class BlockGoldPowder extends BlockImpl implements IColorProvidingBlock { public static final EnumProperty NORTH = EnumProperty.create("north", AttachPos.class); diff --git a/src/main/java/de/ellpeck/naturesaura/blocks/BlockGratedChute.java b/src/main/java/de/ellpeck/naturesaura/blocks/BlockGratedChute.java index ac26d0af..2025988b 100644 --- a/src/main/java/de/ellpeck/naturesaura/blocks/BlockGratedChute.java +++ b/src/main/java/de/ellpeck/naturesaura/blocks/BlockGratedChute.java @@ -8,15 +8,19 @@ import net.minecraft.item.BlockItemUseContext; import net.minecraft.item.ItemStack; import net.minecraft.state.DirectionProperty; import net.minecraft.state.StateContainer; +import net.minecraft.tileentity.IHopper; import net.minecraft.tileentity.TileEntity; import net.minecraft.util.BlockRenderLayer; import net.minecraft.util.Direction; import net.minecraft.util.Hand; -import net.minecraft.util.math.AxisAlignedBB; import net.minecraft.util.math.BlockPos; import net.minecraft.util.math.BlockRayTraceResult; import net.minecraft.util.math.MathHelper; +import net.minecraft.util.math.shapes.IBooleanFunction; +import net.minecraft.util.math.shapes.ISelectionContext; import net.minecraft.util.math.shapes.VoxelShape; +import net.minecraft.util.math.shapes.VoxelShapes; +import net.minecraft.world.IBlockReader; import net.minecraft.world.World; import net.minecraftforge.api.distmarker.Dist; import net.minecraftforge.api.distmarker.OnlyIn; @@ -26,25 +30,62 @@ import javax.annotation.Nullable; public class BlockGratedChute extends BlockContainerImpl { - // TODO voxel shape stuff public static final DirectionProperty FACING = HopperBlock.FACING; - private static final AxisAlignedBB BASE_AABB = new AxisAlignedBB(0.0D, 0.0D, 0.0D, 1.0D, 0.625D, 1.0D); - private static final AxisAlignedBB SOUTH_AABB = new AxisAlignedBB(0.0D, 0.0D, 0.0D, 1.0D, 1.0D, 0.125D); - private static final AxisAlignedBB NORTH_AABB = new AxisAlignedBB(0.0D, 0.0D, 0.875D, 1.0D, 1.0D, 1.0D); - private static final AxisAlignedBB WEST_AABB = new AxisAlignedBB(0.875D, 0.0D, 0.0D, 1.0D, 1.0D, 1.0D); - private static final AxisAlignedBB EAST_AABB = new AxisAlignedBB(0.0D, 0.0D, 0.0D, 0.125D, 1.0D, 1.0D); - - private static final VoxelShape BASE_TOP = makeCuboidShape(0, 9, 0, 16, 10, 16); - private static final VoxelShape BASE_SOUTH = makeCuboidShape(0, 9, 0, 16, 16, 1); - private static final VoxelShape BASE_NORTH = makeCuboidShape(0, 9, 15, 16, 16, 16); - private static final VoxelShape BASE_WEST = makeCuboidShape(15, 9, 0, 16, 26, 16); - private static final VoxelShape BASE_EAST = makeCuboidShape(0, 9, 0, 1, 16, 16); - private static final VoxelShape BASE_BOTTOM = makeCuboidShape(4, 4, 4, 12, 9, 12); + private static final VoxelShape INPUT_SHAPE = Block.makeCuboidShape(0.0D, 10.0D, 0.0D, 16.0D, 16.0D, 16.0D); + private static final VoxelShape MIDDLE_SHAPE = Block.makeCuboidShape(4.0D, 4.0D, 4.0D, 12.0D, 10.0D, 12.0D); + private static final VoxelShape INPUT_MIDDLE_SHAPE = VoxelShapes.or(MIDDLE_SHAPE, INPUT_SHAPE); + private static final VoxelShape COMBINED_SHAPE = VoxelShapes.combineAndSimplify(INPUT_MIDDLE_SHAPE, IHopper.INSIDE_BOWL_SHAPE, IBooleanFunction.ONLY_FIRST); + private static final VoxelShape DOWN_SHAPE = VoxelShapes.or(COMBINED_SHAPE, Block.makeCuboidShape(6.0D, 0.0D, 6.0D, 10.0D, 4.0D, 10.0D)); + private static final VoxelShape EAST_SHAPE = VoxelShapes.or(COMBINED_SHAPE, Block.makeCuboidShape(12.0D, 4.0D, 6.0D, 16.0D, 8.0D, 10.0D)); + private static final VoxelShape NORTH_SHAPE = VoxelShapes.or(COMBINED_SHAPE, Block.makeCuboidShape(6.0D, 4.0D, 0.0D, 10.0D, 8.0D, 4.0D)); + private static final VoxelShape SOUTH_SHAPE = VoxelShapes.or(COMBINED_SHAPE, Block.makeCuboidShape(6.0D, 4.0D, 12.0D, 10.0D, 8.0D, 16.0D)); + private static final VoxelShape WEST_SHAPE = VoxelShapes.or(COMBINED_SHAPE, Block.makeCuboidShape(0.0D, 4.0D, 6.0D, 4.0D, 8.0D, 10.0D)); + private static final VoxelShape DOWN_RAYTRACE_SHAPE = IHopper.INSIDE_BOWL_SHAPE; + private static final VoxelShape EAST_RAYTRACE_SHAPE = VoxelShapes.or(IHopper.INSIDE_BOWL_SHAPE, Block.makeCuboidShape(12.0D, 8.0D, 6.0D, 16.0D, 10.0D, 10.0D)); + private static final VoxelShape NORTH_RAYTRACE_SHAPE = VoxelShapes.or(IHopper.INSIDE_BOWL_SHAPE, Block.makeCuboidShape(6.0D, 8.0D, 0.0D, 10.0D, 10.0D, 4.0D)); + private static final VoxelShape SOUTH_RAYTRACE_SHAPE = VoxelShapes.or(IHopper.INSIDE_BOWL_SHAPE, Block.makeCuboidShape(6.0D, 8.0D, 12.0D, 10.0D, 10.0D, 16.0D)); + private static final VoxelShape WEST_RAYTRACE_SHAPE = VoxelShapes.or(IHopper.INSIDE_BOWL_SHAPE, Block.makeCuboidShape(0.0D, 8.0D, 6.0D, 4.0D, 10.0D, 10.0D)); public BlockGratedChute() { super("grated_chute", TileEntityGratedChute::new, ModBlocks.prop(Material.IRON).hardnessAndResistance(3.0F, 8.0F).sound(SoundType.METAL)); } + @Override + public VoxelShape getShape(BlockState state, IBlockReader worldIn, BlockPos pos, ISelectionContext context) { + switch (state.get(FACING)) { + case DOWN: + return DOWN_SHAPE; + case NORTH: + return NORTH_SHAPE; + case SOUTH: + return SOUTH_SHAPE; + case WEST: + return WEST_SHAPE; + case EAST: + return EAST_SHAPE; + default: + return COMBINED_SHAPE; + } + } + + @Override + public VoxelShape getRaytraceShape(BlockState state, IBlockReader worldIn, BlockPos pos) { + switch (state.get(FACING)) { + case DOWN: + return DOWN_RAYTRACE_SHAPE; + case NORTH: + return NORTH_RAYTRACE_SHAPE; + case SOUTH: + return SOUTH_RAYTRACE_SHAPE; + case WEST: + return WEST_RAYTRACE_SHAPE; + case EAST: + return EAST_RAYTRACE_SHAPE; + default: + return IHopper.INSIDE_BOWL_SHAPE; + } + } + @Override public boolean onBlockActivated(BlockState state, World worldIn, BlockPos pos, PlayerEntity player, Hand handIn, BlockRayTraceResult hit) { if (!player.isSneaking()) diff --git a/src/main/java/de/ellpeck/naturesaura/blocks/BlockNatureAltar.java b/src/main/java/de/ellpeck/naturesaura/blocks/BlockNatureAltar.java index 09492076..2bb1e512 100644 --- a/src/main/java/de/ellpeck/naturesaura/blocks/BlockNatureAltar.java +++ b/src/main/java/de/ellpeck/naturesaura/blocks/BlockNatureAltar.java @@ -1,7 +1,6 @@ package de.ellpeck.naturesaura.blocks; import de.ellpeck.naturesaura.Helper; -import de.ellpeck.naturesaura.blocks.tiles.ModTileEntities; import de.ellpeck.naturesaura.blocks.tiles.TileEntityNatureAltar; import de.ellpeck.naturesaura.blocks.tiles.render.RenderNatureAltar; import de.ellpeck.naturesaura.reg.ITESRProvider; @@ -13,6 +12,10 @@ import net.minecraft.util.Hand; import net.minecraft.util.Tuple; import net.minecraft.util.math.BlockPos; import net.minecraft.util.math.BlockRayTraceResult; +import net.minecraft.util.math.shapes.ISelectionContext; +import net.minecraft.util.math.shapes.VoxelShape; +import net.minecraft.util.math.shapes.VoxelShapes; +import net.minecraft.world.IBlockReader; import net.minecraft.world.World; import net.minecraftforge.api.distmarker.Dist; import net.minecraftforge.api.distmarker.OnlyIn; @@ -20,41 +23,22 @@ import net.minecraftforge.common.ToolType; public class BlockNatureAltar extends BlockContainerImpl implements ITESRProvider { - // TODO bounds + private static final VoxelShape SHAPE = VoxelShapes.create(0, 0, 0, 1, 12 / 16F, 1); + public BlockNatureAltar() { super("nature_altar", TileEntityNatureAltar::new, ModBlocks.prop(Material.ROCK).hardnessAndResistance(4F).harvestLevel(1).harvestTool(ToolType.PICKAXE)); } + @Override + public VoxelShape getShape(BlockState state, IBlockReader worldIn, BlockPos pos, ISelectionContext context) { + return SHAPE; + } + @Override public boolean onBlockActivated(BlockState state, World worldIn, BlockPos pos, PlayerEntity player, Hand handIn, BlockRayTraceResult hit) { return Helper.putStackOnTile(player, handIn, pos, 0, true); } -/* @Override - public boolean isFullCube(BlockState state) { - return false; - } - - @Override - public boolean isOpaqueCube(BlockState state) { - return false; - } - - @Override - public boolean isNormalCube(BlockState state, IBlockAccess world, BlockPos pos) { - return false; - } - - @Override - public boolean isSideSolid(BlockState baseState, IBlockAccess world, BlockPos pos, Direction side) { - return side == Direction.DOWN; - } - - @Override - public BlockFaceShape getBlockFaceShape(IWorld worldIn, BlockState state, BlockPos pos, Direction face) { - return BlockFaceShape.UNDEFINED; - }*/ - @Override @OnlyIn(Dist.CLIENT) public Tuple getTESR() { diff --git a/src/main/java/de/ellpeck/naturesaura/blocks/BlockOfferingTable.java b/src/main/java/de/ellpeck/naturesaura/blocks/BlockOfferingTable.java index c4ffe7fa..7f128f2a 100644 --- a/src/main/java/de/ellpeck/naturesaura/blocks/BlockOfferingTable.java +++ b/src/main/java/de/ellpeck/naturesaura/blocks/BlockOfferingTable.java @@ -1,7 +1,6 @@ package de.ellpeck.naturesaura.blocks; import de.ellpeck.naturesaura.Helper; -import de.ellpeck.naturesaura.blocks.tiles.ModTileEntities; import de.ellpeck.naturesaura.blocks.tiles.TileEntityOfferingTable; import de.ellpeck.naturesaura.blocks.tiles.render.RenderOfferingTable; import de.ellpeck.naturesaura.reg.ITESRProvider; @@ -12,17 +11,19 @@ import net.minecraft.client.renderer.tileentity.TileEntityRenderer; import net.minecraft.entity.player.PlayerEntity; import net.minecraft.util.Hand; import net.minecraft.util.Tuple; -import net.minecraft.util.math.AxisAlignedBB; import net.minecraft.util.math.BlockPos; import net.minecraft.util.math.BlockRayTraceResult; +import net.minecraft.util.math.shapes.ISelectionContext; +import net.minecraft.util.math.shapes.VoxelShape; +import net.minecraft.util.math.shapes.VoxelShapes; +import net.minecraft.world.IBlockReader; import net.minecraft.world.World; import net.minecraftforge.api.distmarker.Dist; import net.minecraftforge.api.distmarker.OnlyIn; public class BlockOfferingTable extends BlockContainerImpl implements ITESRProvider { - // TODO bounds - private static final AxisAlignedBB BOUND_BOX = new AxisAlignedBB(2 / 16F, 0F, 2 / 16F, 14 / 16F, 1F, 14 / 16F); + private static final VoxelShape SHAPE = VoxelShapes.create(2 / 16F, 0F, 2 / 16F, 14 / 16F, 1F, 14 / 16F); public BlockOfferingTable() { super("offering_table", TileEntityOfferingTable::new, ModBlocks.prop(Material.WOOD).hardnessAndResistance(2F).sound(SoundType.WOOD)); @@ -33,31 +34,11 @@ public class BlockOfferingTable extends BlockContainerImpl implements ITESRProvi return Helper.putStackOnTile(player, handIn, pos, 0, true); } -/* @Override - public boolean isFullCube(BlockState state) { - return false; - } - @Override - public boolean isOpaqueCube(BlockState state) { - return false; + public VoxelShape getShape(BlockState state, IBlockReader worldIn, BlockPos pos, ISelectionContext context) { + return SHAPE; } - @Override - public boolean isNormalCube(BlockState state, IWorld world, BlockPos pos) { - return false; - } - - @Override - public boolean isSideSolid(BlockState baseState, IBlockAccess world, BlockPos pos, Direction side) { - return false; - } - - @Override - public BlockFaceShape getBlockFaceShape(IBlockAccess worldIn, BlockState state, BlockPos pos, Direction face) { - return BlockFaceShape.UNDEFINED; - }*/ - @Override @OnlyIn(Dist.CLIENT) public Tuple getTESR() { diff --git a/src/main/java/de/ellpeck/naturesaura/blocks/BlockPowderPlacer.java b/src/main/java/de/ellpeck/naturesaura/blocks/BlockPowderPlacer.java index b8dbd8ee..b418b963 100644 --- a/src/main/java/de/ellpeck/naturesaura/blocks/BlockPowderPlacer.java +++ b/src/main/java/de/ellpeck/naturesaura/blocks/BlockPowderPlacer.java @@ -1,46 +1,25 @@ package de.ellpeck.naturesaura.blocks; -import de.ellpeck.naturesaura.blocks.tiles.ModTileEntities; import de.ellpeck.naturesaura.blocks.tiles.TileEntityPowderPlacer; +import net.minecraft.block.BlockState; import net.minecraft.block.SoundType; import net.minecraft.block.material.Material; -import net.minecraft.util.math.AxisAlignedBB; +import net.minecraft.util.math.BlockPos; +import net.minecraft.util.math.shapes.ISelectionContext; +import net.minecraft.util.math.shapes.VoxelShape; +import net.minecraft.util.math.shapes.VoxelShapes; +import net.minecraft.world.IBlockReader; public class BlockPowderPlacer extends BlockContainerImpl { - // TODO bound box - private static final AxisAlignedBB BOUND_BOX = new AxisAlignedBB(0F, 0F, 0F, 1F, 4 / 16F, 1F); + + private static final VoxelShape SHAPE = VoxelShapes.create(0F, 0F, 0F, 1F, 4 / 16F, 1F); public BlockPowderPlacer() { super("powder_placer", TileEntityPowderPlacer::new, ModBlocks.prop(Material.ROCK).hardnessAndResistance(2, 5F).sound(SoundType.STONE)); } -/* - @Override - public AxisAlignedBB getBoundingBox(BlockState state, IBlockAccess source, BlockPos pos) { - return BOUND_BOX; - } @Override - public boolean isFullCube(BlockState state) { - return false; + public VoxelShape getShape(BlockState state, IBlockReader worldIn, BlockPos pos, ISelectionContext context) { + return SHAPE; } - - @Override - public boolean isOpaqueCube(BlockState state) { - return false; - } - - @Override - public boolean isNormalCube(BlockState state, IBlockAccess world, BlockPos pos) { - return false; - } - - @Override - public boolean isSideSolid(BlockState baseState, IBlockAccess world, BlockPos pos, Direction side) { - return side == Direction.DOWN; - } - - @Override - public BlockFaceShape getBlockFaceShape(IBlockAccess worldIn, BlockState state, BlockPos pos, Direction face) { - return BlockFaceShape.UNDEFINED; - }*/ } diff --git a/src/main/java/de/ellpeck/naturesaura/blocks/BlockSpawnLamp.java b/src/main/java/de/ellpeck/naturesaura/blocks/BlockSpawnLamp.java index 57b2e0ec..f8d616ef 100644 --- a/src/main/java/de/ellpeck/naturesaura/blocks/BlockSpawnLamp.java +++ b/src/main/java/de/ellpeck/naturesaura/blocks/BlockSpawnLamp.java @@ -3,10 +3,10 @@ package de.ellpeck.naturesaura.blocks; import de.ellpeck.naturesaura.Helper; import de.ellpeck.naturesaura.api.aura.chunk.IAuraChunk; import de.ellpeck.naturesaura.api.render.IVisualizable; -import de.ellpeck.naturesaura.blocks.tiles.ModTileEntities; import de.ellpeck.naturesaura.blocks.tiles.TileEntitySpawnLamp; import de.ellpeck.naturesaura.packet.PacketHandler; import de.ellpeck.naturesaura.packet.PacketParticles; +import net.minecraft.block.BlockState; import net.minecraft.block.SoundType; import net.minecraft.block.material.Material; import net.minecraft.entity.MobEntity; @@ -15,6 +15,10 @@ import net.minecraft.util.BlockRenderLayer; import net.minecraft.util.math.AxisAlignedBB; import net.minecraft.util.math.BlockPos; import net.minecraft.util.math.Vec3d; +import net.minecraft.util.math.shapes.ISelectionContext; +import net.minecraft.util.math.shapes.VoxelShape; +import net.minecraft.util.math.shapes.VoxelShapes; +import net.minecraft.world.IBlockReader; import net.minecraft.world.IWorld; import net.minecraft.world.World; import net.minecraftforge.api.distmarker.Dist; @@ -26,8 +30,7 @@ import net.minecraftforge.eventbus.api.SubscribeEvent; public class BlockSpawnLamp extends BlockContainerImpl implements IVisualizable { - // TODO bounding box - private static final AxisAlignedBB AABB = new AxisAlignedBB(4 / 16F, 0F, 4 / 16F, 12 / 16F, 13 / 16F, 12 / 16F); + private static final VoxelShape SHAPE = VoxelShapes.create(4 / 16F, 0F, 4 / 16F, 12 / 16F, 13 / 16F, 12 / 16F); public BlockSpawnLamp() { super("spawn_lamp", TileEntitySpawnLamp::new, ModBlocks.prop(Material.IRON).hardnessAndResistance(3F).lightValue(15).sound(SoundType.METAL)); @@ -66,10 +69,10 @@ public class BlockSpawnLamp extends BlockContainerImpl implements IVisualizable }); } -/* @Override - public AxisAlignedBB getBoundingBox(BlockState state, IWorld source, BlockPos pos) { - return AABB; - }*/ + @Override + public VoxelShape getShape(BlockState state, IBlockReader worldIn, BlockPos pos, ISelectionContext context) { + return SHAPE; + } @Override @OnlyIn(Dist.CLIENT) @@ -77,31 +80,6 @@ public class BlockSpawnLamp extends BlockContainerImpl implements IVisualizable return BlockRenderLayer.CUTOUT; } -/* @Override - public boolean isFullCube(BlockState state) { - return false; - } - - @Override - public boolean isOpaqueCube(BlockState state) { - return false; - } - - @Override - public boolean isNormalCube(BlockState state, IBlockAccess world, BlockPos pos) { - return false; - } - - @Override - public boolean isSideSolid(BlockState baseState, IBlockAccess world, BlockPos pos, Direction side) { - return false; - } - - @Override - public BlockFaceShape getBlockFaceShape(IBlockAccess worldIn, BlockState state, BlockPos pos, Direction face) { - return BlockFaceShape.UNDEFINED; - }*/ - @Override @OnlyIn(Dist.CLIENT) public AxisAlignedBB getVisualizationBounds(World world, BlockPos pos) { diff --git a/src/main/java/de/ellpeck/naturesaura/blocks/BlockWoodStand.java b/src/main/java/de/ellpeck/naturesaura/blocks/BlockWoodStand.java index c8c1c13e..7935cdb4 100644 --- a/src/main/java/de/ellpeck/naturesaura/blocks/BlockWoodStand.java +++ b/src/main/java/de/ellpeck/naturesaura/blocks/BlockWoodStand.java @@ -17,9 +17,12 @@ import net.minecraft.item.crafting.Ingredient; import net.minecraft.tileentity.TileEntity; import net.minecraft.util.Hand; import net.minecraft.util.Tuple; -import net.minecraft.util.math.AxisAlignedBB; import net.minecraft.util.math.BlockPos; import net.minecraft.util.math.BlockRayTraceResult; +import net.minecraft.util.math.shapes.ISelectionContext; +import net.minecraft.util.math.shapes.VoxelShape; +import net.minecraft.util.math.shapes.VoxelShapes; +import net.minecraft.world.IBlockReader; import net.minecraft.world.IWorld; import net.minecraft.world.World; import net.minecraftforge.api.distmarker.Dist; @@ -36,13 +39,18 @@ import java.util.List; public class BlockWoodStand extends BlockContainerImpl implements ITESRProvider { - private static final AxisAlignedBB BOUND_BOX = new AxisAlignedBB(3 / 16F, 0F, 3 / 16F, 13 / 16F, 13 / 16F, 13 / 16F); + private static final VoxelShape SHAPE = VoxelShapes.create(3 / 16F, 0F, 3 / 16F, 13 / 16F, 13 / 16F, 13 / 16F); public BlockWoodStand() { super("wood_stand", TileEntityWoodStand::new, ModBlocks.prop(Material.WOOD).hardnessAndResistance(1.5F).sound(SoundType.WOOD).harvestLevel(0).harvestTool(ToolType.AXE)); MinecraftForge.EVENT_BUS.register(this); } + @Override + public VoxelShape getShape(BlockState state, IBlockReader worldIn, BlockPos pos, ISelectionContext context) { + return SHAPE; + } + @SubscribeEvent public void onTreeGrow(SaplingGrowTreeEvent event) { IWorld world = event.getWorld(); @@ -96,38 +104,6 @@ public class BlockWoodStand extends BlockContainerImpl implements ITESRProvider return Helper.putStackOnTile(player, handIn, pos, 0, true); } - /* - - @Override - public AxisAlignedBB getBoundingBox(BlockState state, IBlockAccess source, BlockPos pos) { - return BOUND_BOX; - } - - @Override - public boolean isFullCube(BlockState state) { - return false; - } - - @Override - public boolean isOpaqueCube(BlockState state) { - return false; - } - - @Override - public boolean isNormalCube(BlockState state, IBlockAccess world, BlockPos pos) { - return false; - } - - @Override - public boolean isSideSolid(BlockState baseState, IBlockAccess world, BlockPos pos, Direction side) { - return false; - } - - @Override - public BlockFaceShape getBlockFaceShape(IBlockAccess worldIn, BlockState state, BlockPos pos, Direction face) { - return BlockFaceShape.UNDEFINED; - }*/ - @Override @OnlyIn(Dist.CLIENT) public Tuple getTESR() { diff --git a/src/main/java/de/ellpeck/naturesaura/blocks/tiles/TileEntityEndFlower.java b/src/main/java/de/ellpeck/naturesaura/blocks/tiles/TileEntityEndFlower.java index 674eaba2..3b616c6b 100644 --- a/src/main/java/de/ellpeck/naturesaura/blocks/tiles/TileEntityEndFlower.java +++ b/src/main/java/de/ellpeck/naturesaura/blocks/tiles/TileEntityEndFlower.java @@ -87,8 +87,8 @@ public class TileEntityEndFlower extends TileEntityImpl implements ITickableTile if (this.container.getStoredAura() <= 0) { this.world.setBlockState(this.pos, Blocks.DEAD_BUSH.getDefaultState()); - /* PacketHandler.sendToAllAround(this.world, this.pos, 32, - new PacketParticles(this.pos.getX(), this.pos.getY(), this.pos.getZ(), 18, this.container.getAuraColor()));*/ + PacketHandler.sendToAllAround(this.world, this.pos, 32, + new PacketParticles(this.pos.getX(), this.pos.getY(), this.pos.getZ(), 18, this.container.getAuraColor())); } } } else { diff --git a/src/main/java/de/ellpeck/naturesaura/blocks/tiles/TileEntityEnderCrate.java b/src/main/java/de/ellpeck/naturesaura/blocks/tiles/TileEntityEnderCrate.java index d1077c4b..de61d5b2 100644 --- a/src/main/java/de/ellpeck/naturesaura/blocks/tiles/TileEntityEnderCrate.java +++ b/src/main/java/de/ellpeck/naturesaura/blocks/tiles/TileEntityEnderCrate.java @@ -4,7 +4,6 @@ import de.ellpeck.naturesaura.NaturesAura; import de.ellpeck.naturesaura.api.aura.chunk.IAuraChunk; import de.ellpeck.naturesaura.api.misc.IWorldData; import de.ellpeck.naturesaura.blocks.BlockEnderCrate; -import net.minecraft.block.BlockState; import net.minecraft.item.ItemStack; import net.minecraft.nbt.CompoundNBT; import net.minecraft.util.Direction; @@ -86,14 +85,12 @@ public class TileEntityEnderCrate extends TileEntityImpl { } @Override - public ItemStack getDrop(BlockState state, int fortune) { - ItemStack drop = super.getDrop(state, fortune); + public void modifyDrop(ItemStack regularItem) { if (this.name != null) { - if (!drop.hasTag()) - drop.setTag(new CompoundNBT()); - drop.getTag().putString(NaturesAura.MOD_ID + ":ender_name", this.name); + if (!regularItem.hasTag()) + regularItem.setTag(new CompoundNBT()); + regularItem.getTag().putString(NaturesAura.MOD_ID + ":ender_name", this.name); } - return drop; } @Override diff --git a/src/main/java/de/ellpeck/naturesaura/blocks/tiles/TileEntityImpl.java b/src/main/java/de/ellpeck/naturesaura/blocks/tiles/TileEntityImpl.java index b39b3e5a..97437209 100644 --- a/src/main/java/de/ellpeck/naturesaura/blocks/tiles/TileEntityImpl.java +++ b/src/main/java/de/ellpeck/naturesaura/blocks/tiles/TileEntityImpl.java @@ -131,24 +131,14 @@ public class TileEntityImpl extends TileEntity { } } - public ItemStack getDrop(BlockState state, int fortune) { - // TODO weird drop stuff - /*Block block = state.getBlock(); - ItemStack stack = new ItemStack( - block.getItemDropped(state, this.world.rand, fortune), - block.quantityDropped(state, fortune, this.world.rand), - block.damageDropped(state)); - + public void modifyDrop(ItemStack regularItem) { CompoundNBT compound = new CompoundNBT(); this.writeNBT(compound, SaveType.BLOCK); - if (!compound.isEmpty()) { - stack.setTagCompound(new CompoundNBT()); - stack.getTagCompound().setTag("data", compound); + if (!regularItem.hasTag()) + regularItem.setTag(new CompoundNBT()); + regularItem.getTag().put("data", compound); } - - return stack;*/ - return null; } public void loadDataOnPlace(ItemStack stack) { diff --git a/src/main/java/de/ellpeck/naturesaura/blocks/tiles/TileEntityOfferingTable.java b/src/main/java/de/ellpeck/naturesaura/blocks/tiles/TileEntityOfferingTable.java index 555266d5..01e2ff98 100644 --- a/src/main/java/de/ellpeck/naturesaura/blocks/tiles/TileEntityOfferingTable.java +++ b/src/main/java/de/ellpeck/naturesaura/blocks/tiles/TileEntityOfferingTable.java @@ -6,15 +6,16 @@ import de.ellpeck.naturesaura.api.recipes.OfferingRecipe; import de.ellpeck.naturesaura.blocks.multi.Multiblocks; import de.ellpeck.naturesaura.packet.PacketHandler; import de.ellpeck.naturesaura.packet.PacketParticles; +import net.minecraft.entity.effect.LightningBoltEntity; import net.minecraft.entity.item.ItemEntity; import net.minecraft.item.ItemStack; import net.minecraft.nbt.CompoundNBT; import net.minecraft.nbt.INBT; import net.minecraft.nbt.ListNBT; import net.minecraft.tileentity.ITickableTileEntity; -import net.minecraft.tileentity.TileEntityType; import net.minecraft.util.Direction; import net.minecraft.util.math.AxisAlignedBB; +import net.minecraft.world.server.ServerWorld; import net.minecraftforge.items.IItemHandlerModifiable; import net.minecraftforge.items.ItemStackHandler; @@ -74,9 +75,8 @@ public class TileEntityOfferingTable extends TileEntityImpl implements ITickable for (int i = 0; i < recipeCount; i++) this.itemsToSpawn.add(recipe.output.copy()); - // TODO weather effects - //this.world.addWeatherEffect(new LightningBoltEntity(this.world, this.pos.getX(), this.pos.getY(), this.pos.getZ(), true)); - PacketHandler.sendToAllAround(this.world, this.pos, 32, new PacketParticles( + ((ServerWorld) this.world).addLightningBolt(new LightningBoltEntity(this.world, this.pos.getX(), this.pos.getY(), this.pos.getZ(), true)); + PacketHandler.sendToAllAround(this.world, this.pos, 32, new PacketParticles( (float) item.posX, (float) item.posY, (float) item.posZ, 13, this.pos.getX(), this.pos.getY(), this.pos.getZ())); diff --git a/src/main/java/de/ellpeck/naturesaura/chunk/AuraChunk.java b/src/main/java/de/ellpeck/naturesaura/chunk/AuraChunk.java index 6c7248c7..84c7d9f6 100644 --- a/src/main/java/de/ellpeck/naturesaura/chunk/AuraChunk.java +++ b/src/main/java/de/ellpeck/naturesaura/chunk/AuraChunk.java @@ -3,6 +3,7 @@ package de.ellpeck.naturesaura.chunk; import de.ellpeck.naturesaura.api.NaturesAuraAPI; import de.ellpeck.naturesaura.api.aura.chunk.IAuraChunk; import de.ellpeck.naturesaura.api.aura.chunk.IDrainSpotEffect; +import de.ellpeck.naturesaura.api.aura.chunk.IDrainSpotEffect.ActiveType; import de.ellpeck.naturesaura.api.aura.type.IAuraType; import de.ellpeck.naturesaura.packet.PacketAuraChunk; import de.ellpeck.naturesaura.packet.PacketHandler; @@ -181,13 +182,13 @@ public class AuraChunk implements IAuraChunk { for (Map.Entry entry : this.drainSpots.entrySet()) { BlockPos pos = entry.getKey(); MutableInt amount = entry.getValue(); - int state = effect.isActiveHere(player, this.chunk, this, pos, amount.intValue()); - if (state < 0) + ActiveType state = effect.isActiveHere(player, this.chunk, this, pos, amount.intValue()); + if (state == ActiveType.INACTIVE) continue; ItemStack stack = effect.getDisplayIcon(); if (stack.isEmpty()) continue; - icons.put(effect.getName(), new Tuple<>(stack, state == 0)); + icons.put(effect.getName(), new Tuple<>(stack, state == ActiveType.INHIBITED)); } } } diff --git a/src/main/java/de/ellpeck/naturesaura/chunk/effect/AnimalEffect.java b/src/main/java/de/ellpeck/naturesaura/chunk/effect/AnimalEffect.java index 2e5a4aa0..e64fae26 100644 --- a/src/main/java/de/ellpeck/naturesaura/chunk/effect/AnimalEffect.java +++ b/src/main/java/de/ellpeck/naturesaura/chunk/effect/AnimalEffect.java @@ -48,14 +48,14 @@ public class AnimalEffect implements IDrainSpotEffect { } @Override - public int isActiveHere(PlayerEntity player, Chunk chunk, IAuraChunk auraChunk, BlockPos pos, Integer spot) { + public ActiveType isActiveHere(PlayerEntity player, Chunk chunk, IAuraChunk auraChunk, BlockPos pos, Integer spot) { if (!this.calcValues(player.world, pos, spot)) - return -1; + return ActiveType.INACTIVE; if (!this.bb.contains(player.getPositionVector())) - return -1; + return ActiveType.INACTIVE; if (!NaturesAuraAPI.instance().isEffectPowderActive(player.world, player.getPosition(), NAME)) - return 0; - return 1; + return ActiveType.INHIBITED; + return ActiveType.ACTIVE; } @Override diff --git a/src/main/java/de/ellpeck/naturesaura/chunk/effect/BreathlessEffect.java b/src/main/java/de/ellpeck/naturesaura/chunk/effect/BreathlessEffect.java index 0ae24404..4c3f142f 100644 --- a/src/main/java/de/ellpeck/naturesaura/chunk/effect/BreathlessEffect.java +++ b/src/main/java/de/ellpeck/naturesaura/chunk/effect/BreathlessEffect.java @@ -42,12 +42,12 @@ public class BreathlessEffect implements IDrainSpotEffect { } @Override - public int isActiveHere(PlayerEntity player, Chunk chunk, IAuraChunk auraChunk, BlockPos pos, Integer spot) { + public ActiveType isActiveHere(PlayerEntity player, Chunk chunk, IAuraChunk auraChunk, BlockPos pos, Integer spot) { if (!this.calcValues(player.world, pos, spot)) - return -1; + return ActiveType.INACTIVE; if (!this.bb.contains(player.getPositionVector())) - return -1; - return 1; + return ActiveType.INACTIVE; + return ActiveType.ACTIVE; } @Override diff --git a/src/main/java/de/ellpeck/naturesaura/chunk/effect/CacheRechargeEffect.java b/src/main/java/de/ellpeck/naturesaura/chunk/effect/CacheRechargeEffect.java index fb49b572..061532c0 100644 --- a/src/main/java/de/ellpeck/naturesaura/chunk/effect/CacheRechargeEffect.java +++ b/src/main/java/de/ellpeck/naturesaura/chunk/effect/CacheRechargeEffect.java @@ -38,14 +38,14 @@ public class CacheRechargeEffect implements IDrainSpotEffect { } @Override - public int isActiveHere(PlayerEntity player, Chunk chunk, IAuraChunk auraChunk, BlockPos pos, Integer spot) { + public ActiveType isActiveHere(PlayerEntity player, Chunk chunk, IAuraChunk auraChunk, BlockPos pos, Integer spot) { if (!this.calcValues(player.world, pos, spot)) - return -1; + return ActiveType.INACTIVE; if (!this.bb.contains(player.getPositionVector())) - return -1; + return ActiveType.INACTIVE; if (NaturesAuraAPI.instance().isEffectPowderActive(player.world, player.getPosition(), NAME)) - return 0; - return 1; + return ActiveType.INHIBITED; + return ActiveType.ACTIVE; } @Override diff --git a/src/main/java/de/ellpeck/naturesaura/chunk/effect/ExplosionEffect.java b/src/main/java/de/ellpeck/naturesaura/chunk/effect/ExplosionEffect.java index c50e72cd..7cafc961 100644 --- a/src/main/java/de/ellpeck/naturesaura/chunk/effect/ExplosionEffect.java +++ b/src/main/java/de/ellpeck/naturesaura/chunk/effect/ExplosionEffect.java @@ -40,12 +40,12 @@ public class ExplosionEffect implements IDrainSpotEffect { } @Override - public int isActiveHere(PlayerEntity player, Chunk chunk, IAuraChunk auraChunk, BlockPos pos, Integer spot) { + public ActiveType isActiveHere(PlayerEntity player, Chunk chunk, IAuraChunk auraChunk, BlockPos pos, Integer spot) { if (!this.calcValues(player.world, pos, spot)) - return -1; + return ActiveType.INACTIVE; if (player.getDistanceSq(pos.getX(), pos.getY(), pos.getZ()) > this.dist * this.dist) - return -1; - return 1; + return ActiveType.INACTIVE; + return ActiveType.ACTIVE; } @Override diff --git a/src/main/java/de/ellpeck/naturesaura/chunk/effect/GrassDieEffect.java b/src/main/java/de/ellpeck/naturesaura/chunk/effect/GrassDieEffect.java index c0a30611..5e9ef4f3 100644 --- a/src/main/java/de/ellpeck/naturesaura/chunk/effect/GrassDieEffect.java +++ b/src/main/java/de/ellpeck/naturesaura/chunk/effect/GrassDieEffect.java @@ -38,12 +38,12 @@ public class GrassDieEffect implements IDrainSpotEffect { } @Override - public int isActiveHere(PlayerEntity player, Chunk chunk, IAuraChunk auraChunk, BlockPos pos, Integer spot) { + public ActiveType isActiveHere(PlayerEntity player, Chunk chunk, IAuraChunk auraChunk, BlockPos pos, Integer spot) { if (!this.calcValues(player.world, pos, spot)) - return -1; + return ActiveType.INACTIVE; if (player.getDistanceSq(pos.getX(), pos.getY(), pos.getZ()) > this.dist * this.dist) - return -1; - return 1; + return ActiveType.INACTIVE; + return ActiveType.ACTIVE; } @Override diff --git a/src/main/java/de/ellpeck/naturesaura/chunk/effect/OreSpawnEffect.java b/src/main/java/de/ellpeck/naturesaura/chunk/effect/OreSpawnEffect.java index f5b1a54a..800a504b 100644 --- a/src/main/java/de/ellpeck/naturesaura/chunk/effect/OreSpawnEffect.java +++ b/src/main/java/de/ellpeck/naturesaura/chunk/effect/OreSpawnEffect.java @@ -48,14 +48,14 @@ public class OreSpawnEffect implements IDrainSpotEffect { } @Override - public int isActiveHere(PlayerEntity player, Chunk chunk, IAuraChunk auraChunk, BlockPos pos, Integer spot) { + public ActiveType isActiveHere(PlayerEntity player, Chunk chunk, IAuraChunk auraChunk, BlockPos pos, Integer spot) { if (!this.calcValues(player.world, pos, spot)) - return -1; + return ActiveType.INACTIVE; if (player.getDistanceSq(pos.getX(), pos.getY(), pos.getZ()) > this.dist * this.dist) - return -1; + return ActiveType.INACTIVE; if (!NaturesAuraAPI.instance().isEffectPowderActive(player.world, player.getPosition(), NAME)) - return 0; - return 1; + return ActiveType.INHIBITED; + return ActiveType.ACTIVE; } @Override diff --git a/src/main/java/de/ellpeck/naturesaura/chunk/effect/PlantBoostEffect.java b/src/main/java/de/ellpeck/naturesaura/chunk/effect/PlantBoostEffect.java index b501862b..cbcc2b72 100644 --- a/src/main/java/de/ellpeck/naturesaura/chunk/effect/PlantBoostEffect.java +++ b/src/main/java/de/ellpeck/naturesaura/chunk/effect/PlantBoostEffect.java @@ -40,14 +40,14 @@ public class PlantBoostEffect implements IDrainSpotEffect { } @Override - public int isActiveHere(PlayerEntity player, Chunk chunk, IAuraChunk auraChunk, BlockPos pos, Integer spot) { + public ActiveType isActiveHere(PlayerEntity player, Chunk chunk, IAuraChunk auraChunk, BlockPos pos, Integer spot) { if (!this.calcValues(player.world, pos, spot)) - return -1; + return ActiveType.INACTIVE; if (player.getDistanceSq(pos.getX(), pos.getY(), pos.getZ()) > this.dist * this.dist) - return -1; + return ActiveType.INACTIVE; if (NaturesAuraAPI.instance().isEffectPowderActive(player.world, player.getPosition(), NAME)) - return 0; - return 1; + return ActiveType.INHIBITED; + return ActiveType.ACTIVE; } @Override diff --git a/src/main/java/de/ellpeck/naturesaura/events/CommonEvents.java b/src/main/java/de/ellpeck/naturesaura/events/CommonEvents.java index 30e96125..7350094c 100644 --- a/src/main/java/de/ellpeck/naturesaura/events/CommonEvents.java +++ b/src/main/java/de/ellpeck/naturesaura/events/CommonEvents.java @@ -6,8 +6,12 @@ import de.ellpeck.naturesaura.api.NaturesAuraAPI; import de.ellpeck.naturesaura.api.aura.chunk.IAuraChunk; import de.ellpeck.naturesaura.chunk.AuraChunk; import de.ellpeck.naturesaura.chunk.AuraChunkProvider; +import de.ellpeck.naturesaura.misc.BlockLootProvider; +import de.ellpeck.naturesaura.misc.BlockTagProvider; +import de.ellpeck.naturesaura.misc.ItemTagProvider; import de.ellpeck.naturesaura.misc.WorldData; import de.ellpeck.naturesaura.packet.PacketHandler; +import net.minecraft.data.DataGenerator; import net.minecraft.util.ResourceLocation; import net.minecraft.world.World; import net.minecraft.world.chunk.Chunk; @@ -19,6 +23,7 @@ import net.minecraftforge.event.TickEvent; import net.minecraftforge.event.world.ChunkWatchEvent; import net.minecraftforge.eventbus.api.SubscribeEvent; import net.minecraftforge.fml.common.ObfuscationReflectionHelper; +import net.minecraftforge.fml.event.lifecycle.GatherDataEvent; import java.lang.reflect.InvocationTargetException; import java.lang.reflect.Method; diff --git a/src/main/java/de/ellpeck/naturesaura/misc/BlockLootProvider.java b/src/main/java/de/ellpeck/naturesaura/misc/BlockLootProvider.java new file mode 100644 index 00000000..0309ec16 --- /dev/null +++ b/src/main/java/de/ellpeck/naturesaura/misc/BlockLootProvider.java @@ -0,0 +1,82 @@ +package de.ellpeck.naturesaura.misc; + +import com.google.gson.Gson; +import com.google.gson.GsonBuilder; +import de.ellpeck.naturesaura.blocks.Slab; +import de.ellpeck.naturesaura.reg.IModItem; +import de.ellpeck.naturesaura.reg.ModRegistry; +import net.minecraft.block.Block; +import net.minecraft.block.SlabBlock; +import net.minecraft.data.DataGenerator; +import net.minecraft.data.DirectoryCache; +import net.minecraft.data.IDataProvider; +import net.minecraft.state.properties.SlabType; +import net.minecraft.util.ResourceLocation; +import net.minecraft.world.storage.loot.*; +import net.minecraft.world.storage.loot.conditions.BlockStateProperty; +import net.minecraft.world.storage.loot.conditions.SurvivesExplosion; +import net.minecraft.world.storage.loot.functions.ExplosionDecay; +import net.minecraft.world.storage.loot.functions.SetCount; + +import javax.annotation.Nonnull; +import java.io.IOException; +import java.nio.file.Path; +import java.util.HashMap; +import java.util.Map; +import java.util.function.Function; + +public class BlockLootProvider implements IDataProvider { + private static final Gson GSON = new GsonBuilder().setPrettyPrinting().create(); + private final DataGenerator generator; + private final Map> lootFunctions = new HashMap<>(); + + public BlockLootProvider(DataGenerator generator) { + this.generator = generator; + + for (IModItem item : ModRegistry.ALL_ITEMS) { + if (!(item instanceof Block)) + continue; + Block block = (Block) item; + if (block instanceof Slab) { + this.lootFunctions.put(block, BlockLootProvider::genSlab); + } else { + this.lootFunctions.put(block, BlockLootProvider::genRegular); + } + } + } + + @Override + public void act(DirectoryCache cache) throws IOException { + for (Map.Entry> function : this.lootFunctions.entrySet()) { + Block block = function.getKey(); + Function func = function.getValue(); + LootTable table = func.apply(block).setParameterSet(LootParameterSets.BLOCK).build(); + Path path = getPath(this.generator.getOutputFolder(), block.getRegistryName()); + IDataProvider.save(GSON, cache, LootTableManager.toJson(table), path); + } + } + + private static Path getPath(Path root, ResourceLocation id) { + return root.resolve("data/" + id.getNamespace() + "/loot_tables/blocks/" + id.getPath() + ".json"); + } + + private static LootTable.Builder genSlab(Block b) { + LootEntry.Builder entry = ItemLootEntry.builder(b) + .acceptFunction(SetCount.func_215932_a(ConstantRange.of(2)).acceptCondition(BlockStateProperty.builder(b).with(SlabBlock.TYPE, SlabType.DOUBLE))) + .acceptFunction(ExplosionDecay.func_215863_b()); + return LootTable.builder().addLootPool(LootPool.builder().name("main").rolls(ConstantRange.of(1)).addEntry(entry)); + } + + private static LootTable.Builder genRegular(Block b) { + LootEntry.Builder entry = ItemLootEntry.builder(b); + LootPool.Builder pool = LootPool.builder().name("main").rolls(ConstantRange.of(1)).addEntry(entry) + .acceptCondition(SurvivesExplosion.builder()); + return LootTable.builder().addLootPool(pool); + } + + @Nonnull + @Override + public String getName() { + return "Nature's Aura Loot"; + } +} \ No newline at end of file diff --git a/src/main/java/de/ellpeck/naturesaura/misc/BlockTagProvider.java b/src/main/java/de/ellpeck/naturesaura/misc/BlockTagProvider.java new file mode 100644 index 00000000..d3d2a3d3 --- /dev/null +++ b/src/main/java/de/ellpeck/naturesaura/misc/BlockTagProvider.java @@ -0,0 +1,22 @@ +package de.ellpeck.naturesaura.misc; + +import de.ellpeck.naturesaura.blocks.ModBlocks; +import net.minecraft.data.BlockTagsProvider; +import net.minecraft.data.DataGenerator; +import net.minecraft.tags.BlockTags; + +public class BlockTagProvider extends BlockTagsProvider { + public BlockTagProvider(DataGenerator generatorIn) { + super(generatorIn); + } + + @Override + protected void registerTags() { + this.getBuilder(BlockTags.LOGS).add(ModBlocks.ANCIENT_LOG, ModBlocks.ANCIENT_BARK); + this.getBuilder(BlockTags.PLANKS).add(ModBlocks.ANCIENT_PLANKS); + this.getBuilder(BlockTags.STAIRS).add(ModBlocks.ANCIENT_STAIRS, ModBlocks.INFUSED_BRICK_STAIRS, ModBlocks.INFUSED_STAIRS); + this.getBuilder(BlockTags.LEAVES).add(ModBlocks.GOLDEN_LEAVES, ModBlocks.ANCIENT_LEAVES, ModBlocks.DECAYED_LEAVES); + this.getBuilder(BlockTags.RAILS).add(ModBlocks.DIMENSION_RAIL_END, ModBlocks.DIMENSION_RAIL_NETHER, ModBlocks.DIMENSION_RAIL_OVERWORLD); + this.getBuilder(BlockTags.SLABS).add(ModBlocks.ANCIENT_SLAB, ModBlocks.INFUSED_SLAB, ModBlocks.INFUSED_BRICK_SLAB); + } +} diff --git a/src/main/java/de/ellpeck/naturesaura/misc/ItemTagProvider.java b/src/main/java/de/ellpeck/naturesaura/misc/ItemTagProvider.java new file mode 100644 index 00000000..6a6f70ee --- /dev/null +++ b/src/main/java/de/ellpeck/naturesaura/misc/ItemTagProvider.java @@ -0,0 +1,26 @@ +package de.ellpeck.naturesaura.misc; + +import de.ellpeck.naturesaura.items.ModItems; +import net.minecraft.data.DataGenerator; +import net.minecraft.data.ItemTagsProvider; +import net.minecraft.tags.BlockTags; +import net.minecraft.tags.ItemTags; +import net.minecraftforge.common.Tags; + +public class ItemTagProvider extends ItemTagsProvider { + public ItemTagProvider(DataGenerator generatorIn) { + super(generatorIn); + } + + @Override + protected void registerTags() { + this.copy(BlockTags.LOGS, ItemTags.LOGS); + this.copy(BlockTags.PLANKS, ItemTags.PLANKS); + this.copy(BlockTags.STAIRS, ItemTags.STAIRS); + this.copy(BlockTags.LEAVES, ItemTags.LEAVES); + this.copy(BlockTags.RAILS, ItemTags.RAILS); + this.copy(BlockTags.SLABS, ItemTags.SLABS); + + this.getBuilder(Tags.Items.RODS_WOODEN).add(ModItems.ANCIENT_STICK); + } +} diff --git a/src/main/java/de/ellpeck/naturesaura/reg/ModRegistry.java b/src/main/java/de/ellpeck/naturesaura/reg/ModRegistry.java index 1c96a01b..d8fe6707 100644 --- a/src/main/java/de/ellpeck/naturesaura/reg/ModRegistry.java +++ b/src/main/java/de/ellpeck/naturesaura/reg/ModRegistry.java @@ -1,16 +1,24 @@ package de.ellpeck.naturesaura.reg; +import de.ellpeck.naturesaura.Helper; import de.ellpeck.naturesaura.ModConfig; import de.ellpeck.naturesaura.NaturesAura; import de.ellpeck.naturesaura.blocks.*; +import de.ellpeck.naturesaura.blocks.tiles.ModTileEntities; import de.ellpeck.naturesaura.entities.EntityEffectInhibitor; import de.ellpeck.naturesaura.entities.EntityMoverMinecart; +import de.ellpeck.naturesaura.entities.ModEntities; import de.ellpeck.naturesaura.items.*; import de.ellpeck.naturesaura.items.tools.*; +import de.ellpeck.naturesaura.misc.BlockLootProvider; +import de.ellpeck.naturesaura.misc.BlockTagProvider; +import de.ellpeck.naturesaura.misc.ItemTagProvider; +import de.ellpeck.naturesaura.potion.ModPotions; import de.ellpeck.naturesaura.potion.PotionBreathless; import net.minecraft.block.Block; import net.minecraft.block.SoundType; import net.minecraft.block.material.Material; +import net.minecraft.data.DataGenerator; import net.minecraft.entity.EntityClassification; import net.minecraft.entity.EntityType; import net.minecraft.inventory.EquipmentSlotType; @@ -22,6 +30,7 @@ import net.minecraft.world.dimension.DimensionType; import net.minecraftforge.event.RegistryEvent; import net.minecraftforge.eventbus.api.SubscribeEvent; import net.minecraftforge.fml.common.Mod; +import net.minecraftforge.fml.event.lifecycle.GatherDataEvent; import java.util.HashSet; import java.util.Set; @@ -29,7 +38,7 @@ import java.util.Set; @Mod.EventBusSubscriber(bus = Mod.EventBusSubscriber.Bus.MOD) public final class ModRegistry { - private static final Set ALL_ITEMS = new HashSet<>(); + public static final Set ALL_ITEMS = new HashSet<>(); public static void add(IModItem item) { ALL_ITEMS.add(item); @@ -94,6 +103,8 @@ public final class ModRegistry { event.getRegistry().register(new BlockRFConverter()); if (ModConfig.enabledFeatures.chunkLoader) event.getRegistry().register(new BlockChunkLoader()); + + Helper.populateObjectHolders(ModBlocks.class, event.getRegistry()); } @SubscribeEvent @@ -149,6 +160,7 @@ public final class ModRegistry { new EnderAccess(), new CaveFinder() ); + Helper.populateObjectHolders(ModItems.class, event.getRegistry()); } @SubscribeEvent @@ -157,6 +169,7 @@ public final class ModRegistry { if (item instanceof ModTileType) event.getRegistry().register(((ModTileType) item).type); } + Helper.populateObjectHolders(ModTileEntities.class, event.getRegistry()); } @SubscribeEvent @@ -164,6 +177,7 @@ public final class ModRegistry { event.getRegistry().registerAll( new PotionBreathless() ); + Helper.populateObjectHolders(ModPotions.class, event.getRegistry()); } @SubscribeEvent @@ -176,84 +190,25 @@ public final class ModRegistry { .setTrackingRange(64).setUpdateInterval(20).immuneToFire().build(NaturesAura.MOD_ID + ":effect_inhibitor") .setRegistryName("effect_inhibitor") ); - } -/* - private static void registerPotion(Effect potion, String name) { - potion.setRegistryName("potion." + NaturesAura.MOD_ID + "." + name + ".name"); - - potion.setRegistryName(NaturesAura.MOD_ID, name); - ForgeRegistries.POTIONS.register(potion); + Helper.populateObjectHolders(ModEntities.class, event.getRegistry()); } - private static void registerItem(Item item, String name, ItemGroup tab) { - item.setRegistryName(NaturesAura.MOD_ID, name); - ForgeRegistries.ITEMS.register(item); - - item.setCreativeTab(tab); + @SubscribeEvent + public static void gatherData(GatherDataEvent event) { + DataGenerator generator = event.getGenerator(); + generator.addProvider(new BlockLootProvider(generator)); + generator.addProvider(new BlockTagProvider(generator)); + generator.addProvider(new ItemTagProvider(generator)); } - private static void registerBlock(Block block, String name, BlockItem item, ItemGroup tab) { - block.setTranslationKey(NaturesAura.MOD_ID + "." + name); - - block.setRegistryName(NaturesAura.MOD_ID, name); - ForgeRegistries.BLOCKS.register(block); - - if (item != null) { - item.setRegistryName(block.getRegistryName()); - ForgeRegistries.ITEMS.register(item); - } - - block.setCreativeTab(tab); - } - - private static ItemGroup getTab(IModItem item) { - if (item instanceof ICreativeItem) { - return ((ICreativeItem) item).getGroupToAdd(); - } - return null; - } - - public static void preInit(FMLCommonSetupEvent event) { - for (IModItem item : ALL_ITEMS) { - if (item instanceof Item) { - registerItem((Item) item, item.getBaseName(), getTab(item)); - } else if (item instanceof Block) { - Block block = (Block) item; - - BlockItem itemBlock; - if (item instanceof ICustomItemBlockProvider) { - itemBlock = ((ICustomItemBlockProvider) item).getItemBlock(); - } else { - itemBlock = new BlockItem(block); - } - - registerBlock(block, item.getBaseName(), itemBlock, getTab(item)); - } else if (item instanceof Effect) { - registerPotion((Effect) item, item.getBaseName()); - } - - if (item instanceof IModelProvider) { - Map models = ((IModelProvider) item).getModelLocations(); - for (ItemStack stack : models.keySet()) - NaturesAura.proxy.registerRenderer(stack, models.get(stack)); - } - - item.onPreInit(event); - } - } -*/ - public static void init() { for (IModItem item : ALL_ITEMS) { - if (item instanceof IColorProvidingBlock) { + if (item instanceof IColorProvidingBlock) NaturesAura.proxy.addColorProvidingBlock((IColorProvidingBlock) item); - } - if (item instanceof IColorProvidingItem) { + if (item instanceof IColorProvidingItem) NaturesAura.proxy.addColorProvidingItem((IColorProvidingItem) item); - } - if (item instanceof ITESRProvider) { + if (item instanceof ITESRProvider) NaturesAura.proxy.registerTESR((ITESRProvider) item); - } } } } diff --git a/src/main/resources/assets/naturesaura/models/block/wood_stand.json b/src/main/resources/assets/naturesaura/models/block/wood_stand.json index 3ded5c48..2081db3a 100644 --- a/src/main/resources/assets/naturesaura/models/block/wood_stand.json +++ b/src/main/resources/assets/naturesaura/models/block/wood_stand.json @@ -7,8 +7,7 @@ "faces": { "down": { "uv": [3, 3, 13, 13], - "texture": "#top", - "cullface": "down" + "texture": "#top" }, "up": { "uv": [3, 3, 13, 13], @@ -16,23 +15,19 @@ }, "north": { "uv": [3, 3, 13, 13], - "texture": "#texture", - "cullface": "north" + "texture": "#texture" }, "south": { "uv": [3, 3, 13, 13], - "texture": "#texture", - "cullface": "south" + "texture": "#texture" }, "west": { "uv": [3, 3, 13, 13], - "texture": "#texture", - "cullface": "west" + "texture": "#texture" }, "east": { "uv": [3, 3, 13, 13], - "texture": "#texture", - "cullface": "east" + "texture": "#texture" } } } diff --git a/src/main/resources/data/forge/tags/items/rods/wooden.json b/src/main/resources/data/forge/tags/items/rods/wooden.json deleted file mode 100644 index e1b65a28..00000000 --- a/src/main/resources/data/forge/tags/items/rods/wooden.json +++ /dev/null @@ -1,6 +0,0 @@ -{ - "replace": false, - "values": [ - "naturesaura:ancient_stick" - ] -} \ No newline at end of file diff --git a/src/main/resources/data/minecraft/tags/blocks/leaves.json b/src/main/resources/data/minecraft/tags/blocks/leaves.json deleted file mode 100644 index e4989dc7..00000000 --- a/src/main/resources/data/minecraft/tags/blocks/leaves.json +++ /dev/null @@ -1,6 +0,0 @@ -{ - "replace": false, - "values": [ - "naturesaura:ancient_leaves" - ] -} \ No newline at end of file diff --git a/src/main/resources/data/minecraft/tags/blocks/logs.json b/src/main/resources/data/minecraft/tags/blocks/logs.json deleted file mode 100644 index 6941bbcf..00000000 --- a/src/main/resources/data/minecraft/tags/blocks/logs.json +++ /dev/null @@ -1,7 +0,0 @@ -{ - "replace": false, - "values": [ - "naturesaura:ancient_log", - "naturesaura:ancient_bark" - ] -} \ No newline at end of file diff --git a/src/main/resources/data/minecraft/tags/blocks/planks.json b/src/main/resources/data/minecraft/tags/blocks/planks.json deleted file mode 100644 index f2df5aee..00000000 --- a/src/main/resources/data/minecraft/tags/blocks/planks.json +++ /dev/null @@ -1,6 +0,0 @@ -{ - "replace": false, - "values": [ - "naturesaura:ancient_planks" - ] -} \ No newline at end of file diff --git a/src/main/resources/data/minecraft/tags/items/leaves.json b/src/main/resources/data/minecraft/tags/items/leaves.json deleted file mode 100644 index e4989dc7..00000000 --- a/src/main/resources/data/minecraft/tags/items/leaves.json +++ /dev/null @@ -1,6 +0,0 @@ -{ - "replace": false, - "values": [ - "naturesaura:ancient_leaves" - ] -} \ No newline at end of file diff --git a/src/main/resources/data/minecraft/tags/items/logs.json b/src/main/resources/data/minecraft/tags/items/logs.json deleted file mode 100644 index 6941bbcf..00000000 --- a/src/main/resources/data/minecraft/tags/items/logs.json +++ /dev/null @@ -1,7 +0,0 @@ -{ - "replace": false, - "values": [ - "naturesaura:ancient_log", - "naturesaura:ancient_bark" - ] -} \ No newline at end of file diff --git a/src/main/resources/data/minecraft/tags/items/planks.json b/src/main/resources/data/minecraft/tags/items/planks.json deleted file mode 100644 index f2df5aee..00000000 --- a/src/main/resources/data/minecraft/tags/items/planks.json +++ /dev/null @@ -1,6 +0,0 @@ -{ - "replace": false, - "values": [ - "naturesaura:ancient_planks" - ] -} \ No newline at end of file