diff options
| author | Draknyte1 <Draknyte1@hotmail.com> | 2017-04-30 00:13:36 +1000 |
|---|---|---|
| committer | Draknyte1 <Draknyte1@hotmail.com> | 2017-04-30 00:13:36 +1000 |
| commit | 568f05651e187e9bd7af44d72742665ebcee274f (patch) | |
| tree | d5a3ce884b0d9b1c49e6378ff59f169a0695ea53 /src/Java/gtPlusPlus/xmod/thermalfoundation/block | |
| parent | c2f45087c471dc57ef08bf3b22e98c619960daad (diff) | |
| download | GT5-Unofficial-568f05651e187e9bd7af44d72742665ebcee274f.tar.gz GT5-Unofficial-568f05651e187e9bd7af44d72742665ebcee274f.tar.bz2 GT5-Unofficial-568f05651e187e9bd7af44d72742665ebcee274f.zip | |
+ Added Resonant Ender.
$ Fixed COFH Fluids having incorrect textures.
$ Fixed the recipe for Clay plates not auto-generating.
Diffstat (limited to 'src/Java/gtPlusPlus/xmod/thermalfoundation/block')
| -rw-r--r-- | src/Java/gtPlusPlus/xmod/thermalfoundation/block/TF_Block_Fluid_Ender.java | 64 | ||||
| -rw-r--r-- | src/Java/gtPlusPlus/xmod/thermalfoundation/block/TF_Blocks.java | 3 |
2 files changed, 67 insertions, 0 deletions
diff --git a/src/Java/gtPlusPlus/xmod/thermalfoundation/block/TF_Block_Fluid_Ender.java b/src/Java/gtPlusPlus/xmod/thermalfoundation/block/TF_Block_Fluid_Ender.java new file mode 100644 index 0000000000..e22451b56a --- /dev/null +++ b/src/Java/gtPlusPlus/xmod/thermalfoundation/block/TF_Block_Fluid_Ender.java @@ -0,0 +1,64 @@ +package gtPlusPlus.xmod.thermalfoundation.block; + +import cofh.core.fluid.BlockFluidCoFHBase; +import cofh.core.util.CoreUtils; +import cpw.mods.fml.common.registry.GameRegistry; +import gtPlusPlus.core.lib.CORE; +import gtPlusPlus.xmod.thermalfoundation.fluid.TF_Fluids; +import net.minecraft.block.material.*; +import net.minecraft.entity.Entity; +import net.minecraft.world.IBlockAccess; +import net.minecraft.world.World; + +public class TF_Block_Fluid_Ender + extends BlockFluidCoFHBase +{ + public static final int LEVELS = 4; + public static final Material materialFluidEnder = new MaterialLiquid(MapColor.greenColor); + private static boolean effect = true; + + public TF_Block_Fluid_Ender() + { + super(CORE.MODID, TF_Fluids.fluidEnder, materialFluidEnder, "ender"); + setQuantaPerBlock(4); + setTickRate(20); + + setHardness(2000.0F); + setLightOpacity(7); + setParticleColor(0.05F, 0.2F, 0.2F); + } + + @Override +public boolean preInit() + { + GameRegistry.registerBlock(this, "FluidEnder"); + + String str1 = "Fluid.Ender"; + String str2 = "Enable this for Fluid Ender to randomly teleport entities on contact."; + + return true; + } + + @Override +public void onEntityCollidedWithBlock(World paramWorld, int paramInt1, int paramInt2, int paramInt3, Entity paramEntity) + { + if ((!effect) || (paramWorld.isRemote)) { + return; + } + if (paramWorld.getTotalWorldTime() % 8L == 0L) + { + int i = paramInt1 - 8 + paramWorld.rand.nextInt(17); + int j = paramInt2 + paramWorld.rand.nextInt(8); + int k = paramInt3 - 8 + paramWorld.rand.nextInt(17); + if (!paramWorld.getBlock(i, j, k).getMaterial().isSolid()) { + CoreUtils.teleportEntityTo(paramEntity, i, j, k); + } + } + } + + @Override +public int getLightValue(IBlockAccess paramIBlockAccess, int paramInt1, int paramInt2, int paramInt3) + { + return TF_Fluids.fluidEnder.getLuminosity(); + } +} diff --git a/src/Java/gtPlusPlus/xmod/thermalfoundation/block/TF_Blocks.java b/src/Java/gtPlusPlus/xmod/thermalfoundation/block/TF_Blocks.java index 522bafd053..6b56262b1a 100644 --- a/src/Java/gtPlusPlus/xmod/thermalfoundation/block/TF_Blocks.java +++ b/src/Java/gtPlusPlus/xmod/thermalfoundation/block/TF_Blocks.java @@ -7,14 +7,17 @@ public class TF_Blocks public static BlockFluidCoFHBase blockFluidPyrotheum; public static BlockFluidCoFHBase blockFluidCryotheum; + public static BlockFluidCoFHBase blockFluidEnder; public static void preInit() { blockFluidPyrotheum = new TF_Block_Fluid_Pyrotheum(); blockFluidCryotheum = new TF_Block_Fluid_Cryotheum(); + blockFluidEnder = new TF_Block_Fluid_Ender(); blockFluidPyrotheum.preInit(); blockFluidCryotheum.preInit(); + blockFluidEnder.preInit(); } public static void init() {} |
