diff --git a/src/main/java/de/ellpeck/naturesaura/blocks/BlockAnimalGenerator.java b/src/main/java/de/ellpeck/naturesaura/blocks/BlockAnimalGenerator.java index ca3b8c53..0d8c1414 100644 --- a/src/main/java/de/ellpeck/naturesaura/blocks/BlockAnimalGenerator.java +++ b/src/main/java/de/ellpeck/naturesaura/blocks/BlockAnimalGenerator.java @@ -15,13 +15,14 @@ import net.minecraft.util.math.BlockPos; import net.minecraftforge.common.MinecraftForge; import net.minecraftforge.event.entity.living.LivingDeathEvent; import net.minecraftforge.event.entity.living.LivingDropsEvent; +import net.minecraftforge.event.entity.living.LivingExperienceDropEvent; import net.minecraftforge.fml.common.eventhandler.SubscribeEvent; public class BlockAnimalGenerator extends BlockContainerImpl { public BlockAnimalGenerator() { super(Material.ROCK, "animal_generator", TileEntityAnimalGenerator.class, "animal_generator"); - this.setSoundType(SoundType.WOOD); - this.setHardness(2F); + this.setSoundType(SoundType.STONE); + this.setHardness(3F); MinecraftForge.EVENT_BUS.register(this); } @@ -43,7 +44,7 @@ public class BlockAnimalGenerator extends BlockContainerImpl { boolean child = entity.isChild(); int time = child ? 60 : 120; - int amount = child ? 45 : 70; + int amount = child ? 40 : 60; gen.setGenerationValues(time, amount); BlockPos genPos = gen.getPos(); @@ -59,10 +60,14 @@ public class BlockAnimalGenerator extends BlockContainerImpl { @SubscribeEvent public void onEntityDrops(LivingDropsEvent event) { EntityLivingBase entity = event.getEntityLiving(); - if (entity.world.isRemote) - return; - if (entity.getEntityData().getBoolean(NaturesAura.MOD_ID + ":no_drops")) { + if (entity.getEntityData().getBoolean(NaturesAura.MOD_ID + ":no_drops")) + event.setCanceled(true); + } + + @SubscribeEvent + public void onEntityExp(LivingExperienceDropEvent event) { + EntityLivingBase entity = event.getEntityLiving(); + if (entity.getEntityData().getBoolean(NaturesAura.MOD_ID + ":no_drops")) event.setCanceled(true); - } } } \ No newline at end of file diff --git a/src/main/resources/assets/naturesaura/blockstates/animal_generator.json b/src/main/resources/assets/naturesaura/blockstates/animal_generator.json new file mode 100644 index 00000000..17d00d0a --- /dev/null +++ b/src/main/resources/assets/naturesaura/blockstates/animal_generator.json @@ -0,0 +1,20 @@ +{ + "forge_marker": 1, + "defaults": { + "model": "minecraft:cube", + "textures": { + "particle": "naturesaura:blocks/animal_generator", + "up": "naturesaura:blocks/animal_generator_top", + "down": "naturesaura:blocks/animal_generator_bottom", + "north": "#particle", + "east": "#particle", + "south": "#particle", + "west": "#particle" + }, + "transform": "forge:default-block" + }, + "variants": { + "normal": [{}], + "inventory": [{}] + } +} \ No newline at end of file diff --git a/src/main/resources/assets/naturesaura/lang/en_US.lang b/src/main/resources/assets/naturesaura/lang/en_US.lang index dcc245fa..0dea0dc0 100644 --- a/src/main/resources/assets/naturesaura/lang/en_US.lang +++ b/src/main/resources/assets/naturesaura/lang/en_US.lang @@ -34,6 +34,7 @@ tile.naturesaura.infused_iron_block.name=Infused Iron Block tile.naturesaura.offering_table.name=Offering Table tile.naturesaura.pickup_stopper.name=Item Grounder tile.naturesaura.spawn_lamp.name=Lamp of Sanctuary +tile.naturesaura.animal_generator.name=Disentangler of Mortals item.naturesaura.eye.name=Environmental Eye item.naturesaura.gold_fiber.name=Brilliant Fiber diff --git a/src/main/resources/assets/naturesaura/patchouli_books/book/en_us/entries/creating/animal_generator.json b/src/main/resources/assets/naturesaura/patchouli_books/book/en_us/entries/creating/animal_generator.json new file mode 100644 index 00000000..ae900664 --- /dev/null +++ b/src/main/resources/assets/naturesaura/patchouli_books/book/en_us/entries/creating/animal_generator.json @@ -0,0 +1,21 @@ +{ + "name": "Disentangler of Mortals", + "icon": "naturesaura:animal_generator", + "category": "creating", + "advancement": "naturesaura:sky_ingot", + "pages": [ + { + "type": "text", + "text": "Creating $(aura) through natural substances can be a double-edged sword. Creating $(aura) using the $(item)Disentangler of Mortals$() is especially so: Killing any passive animal close to it will cause the animal's soul to be freed and spread into the environment in the form of a rather big amount of $(aura). For this, baby animals' souls are less fulfilled, causing less $(aura) to be dispersed." + }, + { + "type": "text", + "text": "It should be noted, also, that the animals whose souls are absorbed will not be lootable for their usual drops. Additionally, supplying the $(item)Disentangler of Mortals$() with a death while it is already in the process of converting a soul will cause both the animal's soul not to be freed and its remains not to be dropped." + }, + { + "type": "crafting", + "recipe": "naturesaura:animal_generator", + "text": "Creating the $(item)Disentangler of Mortals$()" + } + ] +} \ No newline at end of file diff --git a/src/main/resources/assets/naturesaura/recipes/animal_generator.json b/src/main/resources/assets/naturesaura/recipes/animal_generator.json new file mode 100644 index 00000000..ec864783 --- /dev/null +++ b/src/main/resources/assets/naturesaura/recipes/animal_generator.json @@ -0,0 +1,32 @@ +{ + "type": "forge:ore_shaped", + "pattern": [ + "BSB", + "IAI", + "BWB" + ], + "key": { + "B": { + "item": "minecraft:nether_brick" + }, + "I": { + "item": "minecraft:iron_bars" + }, + "S": { + "item": "naturesaura:sky_ingot" + }, + "A": { + "item": "minecraft:soul_sand" + }, + "W": { + "type": "minecraft:item_nbt", + "item": "naturesaura:aura_bottle", + "nbt": { + "stored_type": "naturesaura:overworld" + } + } + }, + "result": { + "item": "naturesaura:animal_generator" + } +} \ No newline at end of file diff --git a/src/main/resources/assets/naturesaura/textures/blocks/animal_generator.png b/src/main/resources/assets/naturesaura/textures/blocks/animal_generator.png new file mode 100644 index 00000000..74c81ad4 Binary files /dev/null and b/src/main/resources/assets/naturesaura/textures/blocks/animal_generator.png differ diff --git a/src/main/resources/assets/naturesaura/textures/blocks/animal_generator_bottom.png b/src/main/resources/assets/naturesaura/textures/blocks/animal_generator_bottom.png new file mode 100644 index 00000000..694b638d Binary files /dev/null and b/src/main/resources/assets/naturesaura/textures/blocks/animal_generator_bottom.png differ diff --git a/src/main/resources/assets/naturesaura/textures/blocks/animal_generator_top.png b/src/main/resources/assets/naturesaura/textures/blocks/animal_generator_top.png new file mode 100644 index 00000000..4ccb8244 Binary files /dev/null and b/src/main/resources/assets/naturesaura/textures/blocks/animal_generator_top.png differ