diff --git a/src/main/java/de/ellpeck/naturesaura/blocks/BlockChunkLoader.java b/src/main/java/de/ellpeck/naturesaura/blocks/BlockChunkLoader.java index 3df4f9e3..4dee5a6f 100644 --- a/src/main/java/de/ellpeck/naturesaura/blocks/BlockChunkLoader.java +++ b/src/main/java/de/ellpeck/naturesaura/blocks/BlockChunkLoader.java @@ -1,6 +1,7 @@ package de.ellpeck.naturesaura.blocks; import de.ellpeck.naturesaura.NaturesAura; +import de.ellpeck.naturesaura.api.NaturesAuraAPI; import de.ellpeck.naturesaura.api.render.IVisualizable; import de.ellpeck.naturesaura.blocks.tiles.TileEntityChunkLoader; import net.minecraft.block.SoundType; @@ -12,6 +13,7 @@ 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.util.math.MathHelper; import net.minecraft.world.IBlockAccess; import net.minecraft.world.World; import net.minecraftforge.common.ForgeChunkManager; @@ -21,6 +23,7 @@ import net.minecraftforge.fml.relauncher.Side; import net.minecraftforge.fml.relauncher.SideOnly; import java.util.List; +import java.util.Random; public class BlockChunkLoader extends BlockContainerImpl implements IVisualizable { @@ -57,6 +60,20 @@ public class BlockChunkLoader extends BlockContainerImpl implements IVisualizabl return null; } + @Override + @SideOnly(Side.CLIENT) + public void randomDisplayTick(IBlockState stateIn, World worldIn, BlockPos pos, Random rand) { + TileEntity tile = worldIn.getTileEntity(pos); + if (tile instanceof TileEntityChunkLoader) { + int range = ((TileEntityChunkLoader) tile).range(); + for (int i = MathHelper.ceil(range / 8F); i > 0; i--) { + NaturesAuraAPI.instance().spawnMagicParticle( + pos.getX() + worldIn.rand.nextFloat(), pos.getY() + worldIn.rand.nextFloat(), pos.getZ() + worldIn.rand.nextFloat(), + 0, 0, 0, 0xa12dff, 1F + worldIn.rand.nextFloat(), 100, 0, false, true); + } + } + } + @Override @SideOnly(Side.CLIENT) public int getVisualizationColor(World world, BlockPos pos) { diff --git a/src/main/java/de/ellpeck/naturesaura/blocks/BlockDimensionRail.java b/src/main/java/de/ellpeck/naturesaura/blocks/BlockDimensionRail.java index 7c24780e..6ca6f6d9 100644 --- a/src/main/java/de/ellpeck/naturesaura/blocks/BlockDimensionRail.java +++ b/src/main/java/de/ellpeck/naturesaura/blocks/BlockDimensionRail.java @@ -9,6 +9,7 @@ import de.ellpeck.naturesaura.reg.IModItem; import de.ellpeck.naturesaura.reg.IModelProvider; import de.ellpeck.naturesaura.reg.ModRegistry; import net.minecraft.block.BlockRailBase; +import net.minecraft.block.SoundType; import net.minecraft.block.properties.IProperty; import net.minecraft.block.properties.PropertyEnum; import net.minecraft.block.state.BlockStateContainer; @@ -41,6 +42,8 @@ public class BlockDimensionRail extends BlockRailBase implements IModItem, ICrea this.name = name; this.goalDim = goalDim.getId(); this.canUseDims = canUseDims; + this.setHardness(0.8F); + this.setSoundType(SoundType.METAL); ModRegistry.add(this); } diff --git a/src/main/resources/assets/naturesaura/lang/en_US.lang b/src/main/resources/assets/naturesaura/lang/en_US.lang index 319f22a6..1b5548bb 100644 --- a/src/main/resources/assets/naturesaura/lang/en_US.lang +++ b/src/main/resources/assets/naturesaura/lang/en_US.lang @@ -49,6 +49,9 @@ 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 +tile.naturesaura.dimension_rail_overworld.name=Rail of the Overworld +tile.naturesaura.dimension_rail_end.name=Rail of the End +tile.naturesaura.dimension_rail_nether.name=Rail of the Nether item.naturesaura.eye.name=Environmental Eye item.naturesaura.eye_improved.name=Environmental Ocular diff --git a/src/main/resources/assets/naturesaura/textures/blocks/dimension_rail_end.png b/src/main/resources/assets/naturesaura/textures/blocks/dimension_rail_end.png new file mode 100644 index 00000000..8f0ecbcf Binary files /dev/null and b/src/main/resources/assets/naturesaura/textures/blocks/dimension_rail_end.png differ diff --git a/src/main/resources/assets/naturesaura/textures/blocks/dimension_rail_nether.png b/src/main/resources/assets/naturesaura/textures/blocks/dimension_rail_nether.png new file mode 100644 index 00000000..8a36ea01 Binary files /dev/null and b/src/main/resources/assets/naturesaura/textures/blocks/dimension_rail_nether.png differ diff --git a/src/main/resources/assets/naturesaura/textures/blocks/dimension_rail_overworld.png b/src/main/resources/assets/naturesaura/textures/blocks/dimension_rail_overworld.png new file mode 100644 index 00000000..3effb522 Binary files /dev/null and b/src/main/resources/assets/naturesaura/textures/blocks/dimension_rail_overworld.png differ