diff --git a/src/main/java/de/ellpeck/naturesaura/blocks/tiles/TileEntityPlacer.java b/src/main/java/de/ellpeck/naturesaura/blocks/tiles/TileEntityPlacer.java index 1fa7fc8f..05f54c44 100644 --- a/src/main/java/de/ellpeck/naturesaura/blocks/tiles/TileEntityPlacer.java +++ b/src/main/java/de/ellpeck/naturesaura/blocks/tiles/TileEntityPlacer.java @@ -3,6 +3,8 @@ package de.ellpeck.naturesaura.blocks.tiles; import de.ellpeck.naturesaura.Helper; import de.ellpeck.naturesaura.aura.chunk.AuraChunk; import de.ellpeck.naturesaura.blocks.ModBlocks; +import de.ellpeck.naturesaura.packet.PacketHandler; +import de.ellpeck.naturesaura.packet.PacketParticles; import net.minecraft.block.state.IBlockState; import net.minecraft.entity.item.EntityItemFrame; import net.minecraft.init.Blocks; @@ -73,6 +75,9 @@ public class TileEntityPlacer extends TileEntityImpl implements ITickable { handler.extractItem(i, 1, false); BlockPos spot = AuraChunk.getHighestSpot(this.world, this.pos, 10, this.pos); AuraChunk.getAuraChunk(this.world, spot).drainAura(spot, 10); + + PacketHandler.sendToAllAround(this.world, this.pos, 32, new PacketParticles(pos.getX(), pos.getY(), pos.getZ(), 9)); + return; } } diff --git a/src/main/java/de/ellpeck/naturesaura/packet/PacketParticles.java b/src/main/java/de/ellpeck/naturesaura/packet/PacketParticles.java index 8b818f68..4ba141a2 100644 --- a/src/main/java/de/ellpeck/naturesaura/packet/PacketParticles.java +++ b/src/main/java/de/ellpeck/naturesaura/packet/PacketParticles.java @@ -177,6 +177,17 @@ public class PacketParticles implements IMessage { world.rand.nextGaussian() * 0.01F, 0x5ccc30, 1F + world.rand.nextFloat() * 1.5F, 40, 0F, false, true); break; + case 9: // Placer placing + for (int i = world.rand.nextInt(20) + 20; i >= 0; i--) { + boolean side = world.rand.nextBoolean(); + float x = side ? world.rand.nextFloat() : (world.rand.nextBoolean() ? 1.1F : -0.1F); + float z = !side ? world.rand.nextFloat() : (world.rand.nextBoolean() ? 1.1F : -0.1F); + NaturesAura.proxy.spawnMagicParticle(world, + message.posX + x, message.posY + 0.1F + world.rand.nextFloat() * 0.98F, message.posZ + z, + 0F, 0F, 0F, + 0xad7a37, world.rand.nextFloat() + 1F, 50, 0F, true, true); + } + break; } } }); diff --git a/src/main/resources/assets/naturesaura/advancements/conversion_catalyst.json b/src/main/resources/assets/naturesaura/advancements/conversion_catalyst.json new file mode 100644 index 00000000..fded579a --- /dev/null +++ b/src/main/resources/assets/naturesaura/advancements/conversion_catalyst.json @@ -0,0 +1,26 @@ +{ + "display": { + "icon": { + "item": "naturesaura:conversion_catalyst" + }, + "title": { + "translate": "advancement.naturesaura.conversion_catalyst" + }, + "description": { + "translate": "advancement.naturesaura.conversion_catalyst.desc" + } + }, + "parent": "naturesaura:infused_materials", + "criteria": { + "catalyst": { + "trigger": "minecraft:inventory_changed", + "conditions": { + "items": [ + { + "item": "naturesaura:conversion_catalyst" + } + ] + } + } + } +} \ No newline at end of file diff --git a/src/main/resources/assets/naturesaura/advancements/flower_generator.json b/src/main/resources/assets/naturesaura/advancements/flower_generator.json new file mode 100644 index 00000000..d47fb9ba --- /dev/null +++ b/src/main/resources/assets/naturesaura/advancements/flower_generator.json @@ -0,0 +1,26 @@ +{ + "display": { + "icon": { + "item": "naturesaura:flower_generator" + }, + "title": { + "translate": "advancement.naturesaura.flower_generator" + }, + "description": { + "translate": "advancement.naturesaura.flower_generator.desc" + } + }, + "parent": "naturesaura:infused_materials", + "criteria": { + "generator": { + "trigger": "minecraft:inventory_changed", + "conditions": { + "items": [ + { + "item": "naturesaura:flower_generator" + } + ] + } + } + } +} \ No newline at end of file diff --git a/src/main/resources/assets/naturesaura/advancements/placer.json b/src/main/resources/assets/naturesaura/advancements/placer.json new file mode 100644 index 00000000..a67469a5 --- /dev/null +++ b/src/main/resources/assets/naturesaura/advancements/placer.json @@ -0,0 +1,26 @@ +{ + "display": { + "icon": { + "item": "naturesaura:placer" + }, + "title": { + "translate": "advancement.naturesaura.placer" + }, + "description": { + "translate": "advancement.naturesaura.placer.desc" + } + }, + "parent": "naturesaura:infused_materials", + "criteria": { + "placer": { + "trigger": "minecraft:inventory_changed", + "conditions": { + "items": [ + { + "item": "naturesaura:placer" + } + ] + } + } + } +} \ No newline at end of file diff --git a/src/main/resources/assets/naturesaura/advancements/potion_generator.json b/src/main/resources/assets/naturesaura/advancements/potion_generator.json index a1c25fd7..63b20b70 100644 --- a/src/main/resources/assets/naturesaura/advancements/potion_generator.json +++ b/src/main/resources/assets/naturesaura/advancements/potion_generator.json @@ -10,7 +10,7 @@ "translate": "advancement.naturesaura.potion_generator.desc" } }, - "parent": "naturesaura:infused_materials", + "parent": "naturesaura:flower_generator", "criteria": { "generator": { "trigger": "minecraft:inventory_changed", diff --git a/src/main/resources/assets/naturesaura/lang/en_US.lang b/src/main/resources/assets/naturesaura/lang/en_US.lang index 14d36468..6c4116f7 100644 --- a/src/main/resources/assets/naturesaura/lang/en_US.lang +++ b/src/main/resources/assets/naturesaura/lang/en_US.lang @@ -65,5 +65,11 @@ advancement.naturesaura.furnace_heater=Cozy Warmth advancement.naturesaura.furnace_heater.desc=Create an Extraneous Firestarter to heat your furnace advancement.naturesaura.potion_generator=Lurking Powers advancement.naturesaura.potion_generator.desc=Make a Lingering Absorber for the Ritual of the Brewer to create Aura +advancement.naturesaura.flower_generator=Botanistic Homicide +advancement.naturesaura.flower_generator.desc=Create a Herbivorous Absorber to create Aura +advancement.naturesaura.placer=Plop Plop Placement +advancement.naturesaura.placer.desc=Create an Imperceptible Builder to place blocks for you +advancement.naturesaura.conversion_catalyst=Not so Equivalent Exchange +advancement.naturesaura.conversion_catalyst.desc=Create a Conversion Catalyst for easy material conversion command.naturesaura.aura.usage=/naaura \ No newline at end of file diff --git a/src/main/resources/assets/naturesaura/patchouli_books/book/en_us/entries/creating/potion_generator.json b/src/main/resources/assets/naturesaura/patchouli_books/book/en_us/entries/creating/potion_generator.json index 75a0592b..9a6fd38b 100644 --- a/src/main/resources/assets/naturesaura/patchouli_books/book/en_us/entries/creating/potion_generator.json +++ b/src/main/resources/assets/naturesaura/patchouli_books/book/en_us/entries/creating/potion_generator.json @@ -2,7 +2,7 @@ "name": "Ritual of the Brewer", "icon": "naturesaura:potion_generator", "category": "creating", - "advancement": "naturesaura:infused_materials", + "advancement": "naturesaura:flower_generator", "pages": [ { "type": "text", diff --git a/src/main/resources/assets/naturesaura/patchouli_books/book/en_us/entries/effects/plant_boost.json b/src/main/resources/assets/naturesaura/patchouli_books/book/en_us/entries/effects/plant_boost.json index bd671659..243ef736 100644 --- a/src/main/resources/assets/naturesaura/patchouli_books/book/en_us/entries/effects/plant_boost.json +++ b/src/main/resources/assets/naturesaura/patchouli_books/book/en_us/entries/effects/plant_boost.json @@ -2,7 +2,7 @@ "name": "Vegetational Increase", "icon": "minecraft:wheat_seeds", "category": "effects", - "advancement": "naturesaura:potion_generator", + "advancement": "naturesaura:flower_generator", "pages": [ { "type": "text", diff --git a/src/main/resources/assets/naturesaura/patchouli_books/book/en_us/entries/using/placer.json b/src/main/resources/assets/naturesaura/patchouli_books/book/en_us/entries/using/placer.json new file mode 100644 index 00000000..aeaa798b --- /dev/null +++ b/src/main/resources/assets/naturesaura/patchouli_books/book/en_us/entries/using/placer.json @@ -0,0 +1,21 @@ +{ + "name": "Imperceptible Builder", + "icon": "naturesaura:placer", + "category": "using", + "advancement": "naturesaura:infused_materials", + "pages": [ + { + "type": "text", + "text": "A lot of activities require a person to be around, most of them for $(thing)placing$() blocks into the world. This, really, is a waste of personell in a time where $(aura) can work in its place. The $(item)Imperceptible Builder$() will place any blocks you supply it with for a small amount of $(aura) in return.$(p)The builder gathers the blocks for placement from a $(item)Chest$() placed on top of it." + }, + { + "type": "text", + "text": "To specify which blocks it should then place them on, one needs to hang up an $(item)Item Frame$() on the builder and put the desired block inside of it. It will then place the blocks from the chest in an area of about $(thing)five blocks$().$(p)As an example, placing a piece of cobblestone into the frame and a stack of wooden planks into the chest will cause the planks to be placed on top of any cobblestone close by." + }, + { + "type": "crafting", + "text": "Creating the $(item)Imperceptible Builder$()", + "recipe": "naturesaura:placer" + } + ] +} \ No newline at end of file diff --git a/src/main/resources/assets/naturesaura/recipes/placer.json b/src/main/resources/assets/naturesaura/recipes/placer.json new file mode 100644 index 00000000..bc005f14 --- /dev/null +++ b/src/main/resources/assets/naturesaura/recipes/placer.json @@ -0,0 +1,25 @@ +{ + "type": "forge:ore_shaped", + "pattern": [ + "CHC", + "CDC", + "CIC" + ], + "key": { + "D": { + "item": "minecraft:dispenser" + }, + "I": { + "item": "naturesaura:infused_iron" + }, + "H": { + "item": "minecraft:hopper" + }, + "C":{ + "item":"minecraft:cobblestone" + } + }, + "result": { + "item": "naturesaura:placer" + } +} \ No newline at end of file