mirror of
https://github.com/Ellpeck/NaturesAura.git
synced 2024-12-22 14:59:22 +01:00
chunk loader and aura trove finished
This commit is contained in:
parent
64e32c19c4
commit
d0041573ae
9 changed files with 144 additions and 0 deletions
|
@ -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
|
||||
|
|
|
@ -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() {
|
||||
|
|
|
@ -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": [{}]
|
||||
}
|
||||
}
|
|
@ -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
|
||||
|
|
|
@ -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"
|
||||
}
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
|
@ -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"
|
||||
}
|
||||
]
|
||||
}
|
|
@ -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"
|
||||
}
|
||||
]
|
||||
}
|
Binary file not shown.
After Width: | Height: | Size: 445 B |
Binary file not shown.
After Width: | Height: | Size: 378 B |
Loading…
Reference in a new issue