diff --git a/src/main/java/de/ellpeck/naturesaura/blocks/BlockChunkLoader.java b/src/main/java/de/ellpeck/naturesaura/blocks/BlockChunkLoader.java index 959001f7..3df4f9e3 100644 --- a/src/main/java/de/ellpeck/naturesaura/blocks/BlockChunkLoader.java +++ b/src/main/java/de/ellpeck/naturesaura/blocks/BlockChunkLoader.java @@ -5,10 +5,14 @@ import de.ellpeck.naturesaura.api.render.IVisualizable; import de.ellpeck.naturesaura.blocks.tiles.TileEntityChunkLoader; import net.minecraft.block.SoundType; import net.minecraft.block.material.Material; +import net.minecraft.block.state.BlockFaceShape; +import net.minecraft.block.state.IBlockState; import net.minecraft.nbt.NBTTagCompound; import net.minecraft.tileentity.TileEntity; +import net.minecraft.util.EnumFacing; import net.minecraft.util.math.AxisAlignedBB; import net.minecraft.util.math.BlockPos; +import net.minecraft.world.IBlockAccess; import net.minecraft.world.World; import net.minecraftforge.common.ForgeChunkManager; import net.minecraftforge.common.ForgeChunkManager.Ticket; @@ -20,6 +24,8 @@ import java.util.List; public class BlockChunkLoader extends BlockContainerImpl implements IVisualizable { + private static final AxisAlignedBB BOUND_BOX = new AxisAlignedBB(4 / 16F, 4 / 16F, 4 / 16F, 12 / 16F, 12 / 16F, 12 / 16F); + public BlockChunkLoader() { super(Material.ROCK, "chunk_loader", TileEntityChunkLoader.class, "chunk_loader"); this.setSoundType(SoundType.STONE); @@ -57,6 +63,31 @@ public class BlockChunkLoader extends BlockContainerImpl implements IVisualizabl return 0xc159f9; } + @Override + public AxisAlignedBB getBoundingBox(IBlockState state, IBlockAccess source, BlockPos pos) { + return BOUND_BOX; + } + + @Override + public boolean isFullCube(IBlockState state) { + return false; + } + + @Override + public boolean isOpaqueCube(IBlockState state) { + return false; + } + + @Override + public boolean isNormalCube(IBlockState state, IBlockAccess world, BlockPos pos) { + return false; + } + + @Override + public BlockFaceShape getBlockFaceShape(IBlockAccess worldIn, IBlockState state, BlockPos pos, EnumFacing face) { + return BlockFaceShape.UNDEFINED; + } + public static class ChunkLoadingCallback implements ForgeChunkManager.LoadingCallback { @Override diff --git a/src/main/java/de/ellpeck/naturesaura/compat/patchouli/PatchouliCompat.java b/src/main/java/de/ellpeck/naturesaura/compat/patchouli/PatchouliCompat.java index 3173c7c1..6e139b81 100644 --- a/src/main/java/de/ellpeck/naturesaura/compat/patchouli/PatchouliCompat.java +++ b/src/main/java/de/ellpeck/naturesaura/compat/patchouli/PatchouliCompat.java @@ -31,6 +31,7 @@ public final class PatchouliCompat { public static void preInit() { PatchouliAPI.instance.setConfigFlag(NaturesAura.MOD_ID + ":rf_converter", ModConfig.enabledFeatures.rfConverter); + PatchouliAPI.instance.setConfigFlag(NaturesAura.MOD_ID + ":chunk_loader", ModConfig.enabledFeatures.chunkLoader); } public static void preInitClient() { diff --git a/src/main/resources/assets/naturesaura/blockstates/chunk_loader.json b/src/main/resources/assets/naturesaura/blockstates/chunk_loader.json new file mode 100644 index 00000000..3c901d00 --- /dev/null +++ b/src/main/resources/assets/naturesaura/blockstates/chunk_loader.json @@ -0,0 +1,15 @@ +{ + "forge_marker": 1, + "defaults": { + "model": "naturesaura:chunk_loader", + "textures": { + "texture": "naturesaura:blocks/chunk_loader", + "particle": "#texture" + }, + "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 80b63475..319f22a6 100644 --- a/src/main/resources/assets/naturesaura/lang/en_US.lang +++ b/src/main/resources/assets/naturesaura/lang/en_US.lang @@ -48,6 +48,7 @@ tile.naturesaura.generator_limit_remover.name=Creational Catalyst tile.naturesaura.ender_crate.name=Ender Crate tile.naturesaura.powder_placer.name=Powder Manipulator tile.naturesaura.firework_generator.name=Firecracker Gaze +tile.naturesaura.chunk_loader.name=World Eye item.naturesaura.eye.name=Environmental Eye item.naturesaura.eye_improved.name=Environmental Ocular diff --git a/src/main/resources/assets/naturesaura/models/block/chunk_loader.json b/src/main/resources/assets/naturesaura/models/block/chunk_loader.json new file mode 100644 index 00000000..bc8c422c --- /dev/null +++ b/src/main/resources/assets/naturesaura/models/block/chunk_loader.json @@ -0,0 +1,39 @@ +{ + "elements": [ + { + "from": [4, 4, 4], + "to": [12, 12, 12], + "faces": { + "down": { + "uv": [4, 4, 12, 12], + "texture": "#texture", + "cullface": "down" + }, + "up": { + "uv": [4, 4, 12, 12], + "texture": "#texture" + }, + "north": { + "uv": [4, 4, 12, 12], + "texture": "#texture", + "cullface": "north" + }, + "south": { + "uv": [4, 4, 12, 12], + "texture": "#texture", + "cullface": "south" + }, + "west": { + "uv": [4, 4, 12, 12], + "texture": "#texture", + "cullface": "west" + }, + "east": { + "uv": [4, 4, 12, 12], + "texture": "#texture", + "cullface": "east" + } + } + } + ] +} diff --git a/src/main/resources/assets/naturesaura/patchouli_books/book/en_us/entries/using/chunk_loader.json b/src/main/resources/assets/naturesaura/patchouli_books/book/en_us/entries/using/chunk_loader.json new file mode 100644 index 00000000..ec2fe2cf --- /dev/null +++ b/src/main/resources/assets/naturesaura/patchouli_books/book/en_us/entries/using/chunk_loader.json @@ -0,0 +1,22 @@ +{ + "name": "World Eye", + "icon": "naturesaura:chunk_loader", + "category": "using", + "advancement": "naturesaura:aura_bottle_end", + "flag": "naturesaura:chunk_loader", + "pages": [ + { + "type": "text", + "text": "Of the world we live in, a key element has never been quite understood: Where nobody is looking, nothing seems to happen - time itself seems to pause. This natural phenomenon can sometimes prove to be problematic, especially when it comes to automated transport over long distances. The $(item)World Eye$(), however, will gaze upon the area that should be kept $(thing)active$() for you, while, in turn, requiring a small amount of" + }, + { + "type": "text", + "text": "$(aura) to maintain its sight.$(p)To set it up, simply place it down and provide it with a $(thing)redstone signal$() - the stronger the signal, the higher its range in blocks will be. Due to the nature of how observation in this manner seems to function, the range isn't always met exactly, meaning that sometimes, the areas that will be loaded are $(thing)slightly bigger$() than the range that is shown - it's a bit $(thing)chunky$(), to say the least." + }, + { + "type": "crafting", + "text": "Creating the $(item)World Eye$()$(p)$(italic)A load of chunks", + "recipe": "naturesaura:chunk_loader" + } + ] +} \ No newline at end of file diff --git a/src/main/resources/assets/naturesaura/recipes/chunk_loader.json b/src/main/resources/assets/naturesaura/recipes/chunk_loader.json new file mode 100644 index 00000000..3022b21f --- /dev/null +++ b/src/main/resources/assets/naturesaura/recipes/chunk_loader.json @@ -0,0 +1,35 @@ +{ + "type": "forge:ore_shaped", + "pattern": [ + "ONO", + "PEP", + "ONO" + ], + "key": { + "E": { + "item": "naturesaura:eye" + }, + "P": { + "item": "minecraft:ender_pearl" + }, + "O": { + "item": "minecraft:obsidian" + }, + "N": { + "type": "minecraft:item_nbt", + "item": "naturesaura:aura_bottle", + "nbt": { + "stored_type": "naturesaura:end" + } + } + }, + "result": { + "item": "naturesaura:chunk_loader" + }, + "conditions": [ + { + "type": "minecraft:item_exists", + "item": "naturesaura:chunk_loader" + } + ] +} \ No newline at end of file diff --git a/src/main/resources/assets/naturesaura/textures/blocks/chunk_loader.png b/src/main/resources/assets/naturesaura/textures/blocks/chunk_loader.png new file mode 100644 index 00000000..7e3e24b3 Binary files /dev/null and b/src/main/resources/assets/naturesaura/textures/blocks/chunk_loader.png differ diff --git a/src/main/resources/assets/naturesaura/textures/items/aura_trove.png b/src/main/resources/assets/naturesaura/textures/items/aura_trove.png new file mode 100644 index 00000000..b6cb824b Binary files /dev/null and b/src/main/resources/assets/naturesaura/textures/items/aura_trove.png differ