From 5ed6598b4d09cb54bf2161b1a19c0045290fa81b Mon Sep 17 00:00:00 2001 From: Ellpeck Date: Sun, 31 Mar 2019 12:28:59 +0200 Subject: [PATCH] some more texture and polishing work for the new features --- .../naturesaura/blocks/BlockChunkLoader.java | 17 +++++++++++++++++ .../naturesaura/blocks/BlockDimensionRail.java | 3 +++ .../assets/naturesaura/lang/en_US.lang | 3 +++ .../textures/blocks/dimension_rail_end.png | Bin 0 -> 347 bytes .../textures/blocks/dimension_rail_nether.png | Bin 0 -> 346 bytes .../blocks/dimension_rail_overworld.png | Bin 0 -> 349 bytes 6 files changed, 23 insertions(+) create mode 100644 src/main/resources/assets/naturesaura/textures/blocks/dimension_rail_end.png create mode 100644 src/main/resources/assets/naturesaura/textures/blocks/dimension_rail_nether.png create mode 100644 src/main/resources/assets/naturesaura/textures/blocks/dimension_rail_overworld.png 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 0000000000000000000000000000000000000000..8f0ecbcf142371b9dd9b81c1845c336d45a8f088 GIT binary patch literal 347 zcmeAS@N?(olHy`uVBq!ia0vp^0wB!61|;P_|4#%`Ea{HEjtmSN`?>!lvI6;>1s;*b z3=Dh+K$tP>S|=w^P@=>&q9iy!t)x7$D3zfgF*C13FE6!3!9>qc&osq70%Y<{PZ!4! z3;(N=HgYi;3b=e`o|dHEG*!W@X{uS#(yd>o{@m~<{fu|nITZaIN8u_vgGPsAuUiZ`mq-;=mID zBZHsE{MpWEF#o8Ux^7S9k;i4{7}dkyH&|uomrqFd;}yB$*tav)VJ=WL!@2ls=At<# z8SX7GlepWkxt~qsM1$qb?dC7aKYW!fh}E4W@PBgoft;=?_De+aC=GsJ;~td>gTe~DWM4f_s@qu literal 0 HcmV?d00001 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 0000000000000000000000000000000000000000..8a36ea01893bf31e4389546677470c68a59f1292 GIT binary patch literal 346 zcmeAS@N?(olHy`uVBq!ia0vp^0wB!61|;P_|4#%`Ea{HEjtmSN`?>!lvI6;>1s;*b z3=Dh+K$tP>S|=w^P@=>&q9iy!t)x7$D3zfgF*C13FE6!3!9>qc&osq70%YUW;1&iX>FLx+w`*Vz~QJ209z z$V>CM#O9^37oFEH4c&fup-5#%Jn94A% zOtoQY{$G{^cg7FXkLujN{`t=xUGE1ge@b6SfBcsB1J8vA%~I9e4)c4%IUAnGFK5WI z5oWl5g1IXHz~+7iDV7BPZ*!TJng94D`(c-risFCu`;5Ca|L{)XzHq0ZmgT@^?Z)sG nY7F;|t!CM=1WDyyLG5R^Kq79~nGd{an^LB{Ts5=!lvI6;>1s;*b z3=Dh+K$tP>S|=w^P@=>&q9iy!t)x7$D3zfgF*C13FE6!3!9>qc&osq70%Y=SPZ!4! z3;(N=6#1AOd0dY#5Qt%L-=N^(QJ}$clIxJ_HH8T=O~Geu+xN`;x70Y%K%?%`hugXG zx6_(Ml6@XqsCn;R)E?*EeQtZM-Y0?j$~T|ZA9~L8AlIhlaH%Py+3}|$S2*W$JLElf zWs0~pm0{Yxufh$otOwS&N8Y;s{N