mirror of
https://github.com/Ellpeck/NaturesAura.git
synced 2024-11-27 13:38:34 +01:00
Compare commits
5 commits
d7e4389344
...
cea06a8e48
Author | SHA1 | Date | |
---|---|---|---|
cea06a8e48 | |||
7865f2683c | |||
453754096e | |||
b3d0d429c9 | |||
5d0bbcf164 |
5 changed files with 11 additions and 9 deletions
|
@ -46,7 +46,7 @@ mod_name=NaturesAura
|
||||||
# The license of the mod. Review your options at https://choosealicense.com/. All Rights Reserved is the default.
|
# The license of the mod. Review your options at https://choosealicense.com/. All Rights Reserved is the default.
|
||||||
mod_license=MIT
|
mod_license=MIT
|
||||||
# The mod version. See https://semver.org/
|
# The mod version. See https://semver.org/
|
||||||
mod_version=39.1
|
mod_version=39.3
|
||||||
# The group ID for the mod. It is only important when publishing as an artifact to a Maven repository.
|
# The group ID for the mod. It is only important when publishing as an artifact to a Maven repository.
|
||||||
# This should match the base package used for the mod sources.
|
# This should match the base package used for the mod sources.
|
||||||
# See https://maven.apache.org/guides/mini/guide-naming-conventions.html
|
# See https://maven.apache.org/guides/mini/guide-naming-conventions.html
|
||||||
|
|
|
@ -13,6 +13,7 @@ import net.minecraft.world.level.Level;
|
||||||
import net.minecraft.world.level.block.entity.SpawnerBlockEntity;
|
import net.minecraft.world.level.block.entity.SpawnerBlockEntity;
|
||||||
import net.minecraft.world.phys.AABB;
|
import net.minecraft.world.phys.AABB;
|
||||||
import net.minecraftforge.common.capabilities.ForgeCapabilities;
|
import net.minecraftforge.common.capabilities.ForgeCapabilities;
|
||||||
|
import net.minecraftforge.registries.ForgeRegistries;
|
||||||
|
|
||||||
public class ItemLootFinder extends ItemImpl {
|
public class ItemLootFinder extends ItemImpl {
|
||||||
|
|
||||||
|
@ -33,7 +34,7 @@ public class ItemLootFinder extends ItemImpl {
|
||||||
|
|
||||||
var pos = playerIn.blockPosition();
|
var pos = playerIn.blockPosition();
|
||||||
Helper.getBlockEntitiesInArea(levelIn, pos, 64, tile -> {
|
Helper.getBlockEntitiesInArea(levelIn, pos, 64, tile -> {
|
||||||
if (tile.getCapability(ForgeCapabilities.ITEM_HANDLER).isPresent() || tile instanceof SpawnerBlockEntity) {
|
if (tile.getCapability(ForgeCapabilities.ITEM_HANDLER).isPresent() || tile instanceof SpawnerBlockEntity || ForgeRegistries.BLOCK_ENTITY_TYPES.getKey(tile.getType()).getNamespace().equals("lootr")) {
|
||||||
inst.spawnMagicParticle(
|
inst.spawnMagicParticle(
|
||||||
tile.getBlockPos().getX() + 0.5F, tile.getBlockPos().getY() + 0.5F, tile.getBlockPos().getZ() + 0.5F,
|
tile.getBlockPos().getX() + 0.5F, tile.getBlockPos().getY() + 0.5F, tile.getBlockPos().getZ() + 0.5F,
|
||||||
0F, 0F, 0F, 0xf5f10a, 6F, 20 * 60, 0F, false, true);
|
0F, 0F, 0F, 0xf5f10a, 6F, 20 * 60, 0F, false, true);
|
||||||
|
@ -57,4 +58,5 @@ public class ItemLootFinder extends ItemImpl {
|
||||||
playerIn.getCooldowns().addCooldown(this, 20 * 60);
|
playerIn.getCooldowns().addCooldown(this, 20 * 60);
|
||||||
return new InteractionResultHolder<>(InteractionResult.SUCCESS, stack);
|
return new InteractionResultHolder<>(InteractionResult.SUCCESS, stack);
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -96,7 +96,7 @@ public class ItemHoe extends HoeItem implements IModItem, ICustomItemModel {
|
||||||
var offState = player.level().getBlockState(offset);
|
var offState = player.level().getBlockState(offset);
|
||||||
if (offState.getBlock() instanceof BushBlock || stack.getItem() == ModItems.DEPTH_HOE && offState.getBlock() instanceof LeavesBlock) {
|
if (offState.getBlock() instanceof BushBlock || stack.getItem() == ModItems.DEPTH_HOE && offState.getBlock() instanceof LeavesBlock) {
|
||||||
var entity = offState.hasBlockEntity() ? player.level().getBlockEntity(offset) : null;
|
var entity = offState.hasBlockEntity() ? player.level().getBlockEntity(offset) : null;
|
||||||
Block.dropResources(offState, player.level(), offset, entity, null, ItemStack.EMPTY);
|
Block.dropResources(offState, player.level(), offset, entity, null, stack);
|
||||||
player.level().setBlock(offset, Blocks.AIR.defaultBlockState(), 3);
|
player.level().setBlock(offset, Blocks.AIR.defaultBlockState(), 3);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -14,7 +14,7 @@
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"type": "text",
|
"type": "text",
|
||||||
"text": "Of course, breaking blocks and especially the initial channel time will require a bit of $(aura) from the environment. Additionally, while the field is active, a small amount is consumed as a sort of upkeep cost.$(br)Any botanist that requires items gained from $(thing)shearing$() certain blocks doesn't have to worry: Placing an $(item)Item Frame$() with $(item)Shears$() on any of the two $(item)Aura Field Creators$() will cause all shearable blocks inbetween to be sheared with all others being harvested normally."
|
"text": "Of course, breaking blocks and especially the initial channel time will require a bit of $(aura) from the environment. Additionally, while the field is active, a small amount is consumed as a sort of upkeep cost.$(br)Any botanist that requires that blocks be broken in a specific manner doesn't have to worry: Placing an $(item)Item Frame$() with $(item)Shears$() or an $(item)enchanted tool$() on any of the two $(item)Aura Field Creators$() will cause all blocks inbetween to be broken as if using that tool."
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"type": "crafting",
|
"type": "crafting",
|
||||||
|
@ -22,4 +22,4 @@
|
||||||
"recipe": "naturesaura:field_creator"
|
"recipe": "naturesaura:field_creator"
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,9 +1,9 @@
|
||||||
{
|
{
|
||||||
"type": "minecraft:crafting_shaped",
|
"type": "minecraft:crafting_shaped",
|
||||||
"pattern": [
|
"pattern": [
|
||||||
"SGS",
|
" I ",
|
||||||
"GIG",
|
"GSG",
|
||||||
"SGS"
|
" I "
|
||||||
],
|
],
|
||||||
"key": {
|
"key": {
|
||||||
"I": {
|
"I": {
|
||||||
|
@ -19,4 +19,4 @@
|
||||||
"result": {
|
"result": {
|
||||||
"item": "naturesaura:depth_ingot"
|
"item": "naturesaura:depth_ingot"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue