Added Grimstone and Fantasy Block 2

This commit is contained in:
TheCricket committed 2014-12-14 14:22:17 -05:00
1 parent cbc16fa1e0
commit 07502c6d60
63 files changed
+224 -8

No files matched your search

@@ -0,0 +1,35 @@
package info.jbcs.minecraft.chisel.block;
import info.jbcs.minecraft.chisel.Chisel;
import info.jbcs.minecraft.chisel.client.GeneralChiselClient;
import info.jbcs.minecraft.chisel.init.ModTabs;
import info.jbcs.minecraft.chisel.utils.General;
import net.minecraft.block.material.Material;
import net.minecraft.client.renderer.texture.IIconRegister;
import net.minecraft.util.IIcon;
import net.minecraft.world.World;
import java.util.Random;
public class BlockGrimstone extends BlockCarvable {
public IIcon iconStar;
public BlockGrimstone(Material m) {
super(m);
this.setCreativeTab(ModTabs.tabChiselBlocks);
}
@Override
public void randomDisplayTick(World world, int x, int y, int z, Random random) {
if (General.rand.nextInt(4) == 0 && world.isRemote)
GeneralChiselClient.spawnGrimstoneFX(world, this, x, y, z);
}
@Override
public void registerBlockIcons(IIconRegister register) {
super.registerBlockIcons(register);
iconStar = register.registerIcon(Chisel.MOD_ID + ":grimstone/particles/star");
}
}
@@ -1,14 +1,8 @@
package info.jbcs.minecraft.chisel.client;
import info.jbcs.minecraft.chisel.Configurations;
import info.jbcs.minecraft.chisel.block.BlockHolystone;
import info.jbcs.minecraft.chisel.block.BlockLavastone;
import info.jbcs.minecraft.chisel.block.BlockSnakestoneObsidian;
import info.jbcs.minecraft.chisel.block.BlockVoidstone;
import info.jbcs.minecraft.chisel.entity.fx.EntityBallOMossFX;
import info.jbcs.minecraft.chisel.entity.fx.EntityHolystoneFX;
import info.jbcs.minecraft.chisel.entity.fx.EntitySnakestoneObsidianFX;
import info.jbcs.minecraft.chisel.entity.fx.EntityVoidstoneFX;
import info.jbcs.minecraft.chisel.block.*;
import info.jbcs.minecraft.chisel.entity.fx.*;
import info.jbcs.minecraft.chisel.utils.GeneralClient;
import net.minecraft.block.Block;
import net.minecraft.client.Minecraft;
@@ -113,6 +107,47 @@ public class GeneralChiselClient {
Minecraft.getMinecraft().effectRenderer.addEffect(res);
}
public static void spawnGrimstoneFX(World world, BlockGrimstone block, int x, int y, int z) {
if (Configurations.particlesTickrate != 0 && tick++ % Configurations.particlesTickrate != 0) return;
float f = 0.15F;
double x1 = x + rand.nextDouble() * (block.getBlockBoundsMaxX() - block.getBlockBoundsMinX() - f * 2.0F) + f + block.getBlockBoundsMinX();
double y1 = y + rand.nextDouble() * (block.getBlockBoundsMaxY() - block.getBlockBoundsMinY() - f * 2.0F) + f + block.getBlockBoundsMinY();
double z1 = z + rand.nextDouble() * (block.getBlockBoundsMaxZ() - block.getBlockBoundsMinZ() - f * 2.0F) + f + block.getBlockBoundsMinZ();
switch (rand.nextInt(6)) {
case 0:
y1 = y + block.getBlockBoundsMinY() - f;
y--;
break;
case 1:
y1 = y + block.getBlockBoundsMaxY() + f;
y++;
break;
case 2:
z1 = z + block.getBlockBoundsMinZ() - f;
z--;
break;
case 3:
z1 = z + block.getBlockBoundsMaxZ() + f;
z++;
break;
case 4:
x1 = x + block.getBlockBoundsMinX() - f;
x--;
break;
case 5:
x1 = x + block.getBlockBoundsMaxX() + f;
x++;
break;
}
if (world.getBlock(x, y, z).isOpaqueCube()) return;
EntityGrimstoneFX res = new EntityGrimstoneFX(world, block, x1, y1, z1);
Minecraft.getMinecraft().effectRenderer.addEffect(res);
}
public static void spawnSnakestoneObsidianFX(World world, BlockSnakestoneObsidian block, int x, int y, int z) {
if (Configurations.particlesTickrate == 0 || tick++ % Configurations.particlesTickrate == 0) {
EntitySnakestoneObsidianFX res = new EntitySnakestoneObsidianFX(world, block, x, y, z);
@@ -0,0 +1,65 @@
package info.jbcs.minecraft.chisel.entity.fx;
import info.jbcs.minecraft.chisel.block.BlockGrimstone;
import info.jbcs.minecraft.chisel.utils.General;
import net.minecraft.client.particle.EntityFX;
import net.minecraft.client.renderer.Tessellator;
import net.minecraft.world.World;
public class EntityGrimstoneFX extends EntityFX
{
float initialScale;
float angleOffset;
static final float fadetime = 20f;
public EntityGrimstoneFX(World world, BlockGrimstone block, double x, double y, double z)
{
super(world, x, y, z, 0, 0, 0);
initialScale = 1.0f + 1.0f * General.rand.nextFloat();
angleOffset = rand.nextFloat() * 360;
particleMaxAge = (int) (Math.random() * 10.0D) + 80;
setPosition(x, y, z);
prevPosX = posX;
prevPosY = posY;
prevPosZ = posZ;
noClip = true;
setParticleIcon(block.iconStar);
}
@Override
public int getFXLayer()
{
return 1;
}
@Override
public void renderParticle(Tessellator tessellator, float partialTick, float rotX, float rotXZ, float rotZ, float rotYZ, float rotXY)
{
particleScale = 0.25f + initialScale * (float) Math.sin((particleAge + angleOffset) / 180.f);
if(particleAge < fadetime)
particleAlpha = particleAge / fadetime;
else if(particleAge + fadetime >= particleMaxAge)
particleAlpha = (particleMaxAge - particleAge) / fadetime;
else
particleAlpha = 1.0f;
super.renderParticle(tessellator, partialTick, rotX, rotXZ, rotZ, rotYZ, rotXY);
}
@Override
public void onUpdate()
{
if(particleAge++ >= particleMaxAge)
{
setDead();
}
}
}
@@ -51,10 +51,12 @@ public class ModBlocks {
public static BlockCarvable obsidian;
public static BlockCarvablePowered redstone;
public static BlockHolystone holystone;
public static BlockGrimstone grimstone;
public static BlockLavastone lavastone;
public static BlockWaterstone waterstone;
public static BlockCarvable leaf;
public static BlockCarvable fantasy;
public static BlockCarvable fantasy2;
public static BlockCarvable carpet;
public static BlockMarbleCarpet carpetFloor;
public static BlockCarvable bookshelf;
@@ -1373,5 +1375,48 @@ public class ModBlocks {
hexPlating.carverHelper.register(hexPlating, "hexPlating");
Carving.chisel.registerOre("hexPlating", "hexPlating");
}
if(Configurations.featureEnabled("fantasy2")){
fantasy2 = (BlockCarvable) new BlockCarvable().setHardness(2.0F).setResistance(10F);
fantasy2.carverHelper.addVariation(StatCollector.translateToLocal("tile.fantasyblock2.0.desc"), 0, "fantasy2/brick");
fantasy2.carverHelper.addVariation(StatCollector.translateToLocal("tile.fantasyblock2.1.desc"), 1, "fantasy2/brick-faded");
fantasy2.carverHelper.addVariation(StatCollector.translateToLocal("tile.fantasyblock2.2.desc"), 2, "fantasy2/brick-wear");
fantasy2.carverHelper.addVariation(StatCollector.translateToLocal("tile.fantasyblock2.3.desc"), 3, "fantasy2/bricks");
fantasy2.carverHelper.addVariation(StatCollector.translateToLocal("tile.fantasyblock2.4.desc"), 4, "fantasy2/decor");
fantasy2.carverHelper.addVariation(StatCollector.translateToLocal("tile.fantasyblock2.5.desc"), 5, "fantasy2/decor-block");
fantasy2.carverHelper.addVariation(StatCollector.translateToLocal("tile.fantasyblock2.6.desc"), 6, "fantasy2/pillar");
fantasy2.carverHelper.addVariation(StatCollector.translateToLocal("tile.fantasyblock2.7.desc"), 7, "fantasy2/pillar-decorated");
fantasy2.carverHelper.addVariation(StatCollector.translateToLocal("tile.fantasyblock2.8.desc"), 8, "fantasy2/gold-decor-1");
fantasy2.carverHelper.addVariation(StatCollector.translateToLocal("tile.fantasyblock2.9.desc"), 9, "fantasy2/gold-decor-2");
fantasy2.carverHelper.addVariation(StatCollector.translateToLocal("tile.fantasyblock2.10.desc"), 10, "fantasy2/gold-decor-3");
fantasy2.carverHelper.addVariation(StatCollector.translateToLocal("tile.fantasyblock2.11.desc"), 11, "fantasy2/gold-decor-4");
fantasy2.carverHelper.addVariation(StatCollector.translateToLocal("tile.fantasyblock2.12.desc"), 12, "fantasy2/plate");
fantasy2.carverHelper.addVariation(StatCollector.translateToLocal("tile.fantasyblock2.13.desc"), 13, "fantasy2/block");
fantasy2.carverHelper.addVariation(StatCollector.translateToLocal("tile.fantasyblock2.14.desc"), 14, "fantasy2/bricks-chaotic");
fantasy2.carverHelper.addVariation(StatCollector.translateToLocal("tile.fantasyblock2.15.desc"), 15, "fantasy2/bricks-wear");
fantasy2.carverHelper.register(fantasy2, "fantasyblock2");
OreDictionary.registerOre("fantasy2", fantasy2);
Carving.chisel.registerOre("fantasyblock2", "fantasy2");
}
if(Configurations.featureEnabled("grimstone")){
grimstone = (BlockGrimstone) new BlockGrimstone(Material.rock).setHardness(2.0F).setResistance(10F);
grimstone.carverHelper.addVariation(StatCollector.translateToLocal("tile.grimstone.0.desc"), 0, "grimstone/grimstone");
grimstone.carverHelper.addVariation(StatCollector.translateToLocal("tile.grimstone.1.desc"), 1, "grimstone/smooth");
grimstone.carverHelper.addVariation(StatCollector.translateToLocal("tile.grimstone.2.desc"), 2, "grimstone/hate");
grimstone.carverHelper.addVariation(StatCollector.translateToLocal("tile.grimstone.3.desc"), 3, "grimstone/chiseled");
grimstone.carverHelper.addVariation(StatCollector.translateToLocal("tile.grimstone.4.desc"), 4, "grimstone/blocks");
grimstone.carverHelper.addVariation(StatCollector.translateToLocal("tile.grimstone.5.desc"), 5, "grimstone/blocks-rough");
grimstone.carverHelper.addVariation(StatCollector.translateToLocal("tile.grimstone.6.desc"), 6, "grimstone/brick");
grimstone.carverHelper.addVariation(StatCollector.translateToLocal("tile.grimstone.7.desc"), 7, "grimstone/largebricks");
grimstone.carverHelper.addVariation(StatCollector.translateToLocal("tile.grimstone.8.desc"), 8, "grimstone/platform");
grimstone.carverHelper.addVariation(StatCollector.translateToLocal("tile.grimstone.9.desc"), 9, "grimstone/platform-tiles");
grimstone.carverHelper.addVariation(StatCollector.translateToLocal("tile.grimstone.10.desc"), 10, "grimstone/construction");
grimstone.carverHelper.addVariation(StatCollector.translateToLocal("tile.grimstone.11.desc"), 11, "grimstone/fancy-tiles");
grimstone.carverHelper.addVariation(StatCollector.translateToLocal("tile.grimstone.12.desc"), 12, "grimstone/plate");
grimstone.carverHelper.addVariation(StatCollector.translateToLocal("tile.grimstone.13.desc"), 13, "grimstone/plate-rough");
grimstone.carverHelper.register(grimstone, "grimstone");
Carving.chisel.registerOre("grimstone", "grimstone");
}
}
}
@@ -80,6 +80,23 @@ tile.hexPlating.13.desc=White Plating
tile.hexPlating.14.desc=Yellow Plating
tile.hexPlating.15.desc=Gray Plating
#Grimstone
tile.grimstone.name=Grimstone
tile.grimstone.0.desc=Grimstone
tile.grimstone.1.desc=Smooth Grimstone
tile.grimstone.2.desc=Mysterious Grimstone symbol
tile.grimstone.3.desc=Chiseled Grimstone
tile.grimstone.4.desc=Grimstone blocks
tile.grimstone.5.desc=Rough Grimstone bricks
tile.grimstone.6.desc=Grimstone bricks
tile.grimstone.7.desc=Large Grimstone bricks
tile.grimstone.8.desc=Grimstone platform
tile.grimstone.9.desc=Grimstone platform tiles
tile.grimstone.10.desc=Fancy Grimstone construction
tile.grimstone.11.desc=Fancy Grimstone tiles
tile.grimstone.12.desc=Smooth Grimstone plate
tile.grimstone.13.desc=Grimstone plate
#Chisel 1
#Cobblestone Blocks
@@ -895,6 +912,25 @@ tile.fantasyblock.13.desc=Fantasy block
tile.fantasyblock.14.desc=Fantasy bricks in disarray
tile.fantasyblock.15.desc=Weared fantasy bricks
#Fantasy block 2
tile.fantasyblock2.name=Fantasy Block
tile.fantasyblock2.0.desc=Fantasy brick
tile.fantasyblock2.1.desc=Faded fantasy brick
tile.fantasyblock2.2.desc=Weared fantasy brick
tile.fantasyblock2.3.desc=Damaged fantasy bricks
tile.fantasyblock2.4.desc=Fantasy decoration
tile.fantasyblock2.5.desc=Fantasy decoration block
tile.fantasyblock2.6.desc=Fantasy pillar
tile.fantasyblock2.7.desc=Fantasy pillar decoration
tile.fantasyblock2.8.desc=Fantasy gold snake decoration
tile.fantasyblock2.9.desc=Fantasy gold noise decoration
tile.fantasyblock2.10.desc=Fantasy gold engravings decoration
tile.fantasyblock2.11.desc=Fantasy gold chains decoration
tile.fantasyblock2.12.desc=Fantasy plate decoration
tile.fantasyblock2.13.desc=Fantasy block
tile.fantasyblock2.14.desc=Fantasy bricks in disarray
tile.fantasyblock2.15.desc=Weared fantasy bricks
#Paperwall
tile.paperwall.name=Paperwall
tile.paperwall.0.desc=Boxed Paperwall
Binary file not shown.

After

Width:  |  Height:  |  Size: 3.2 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.0 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.9 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.0 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.9 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.0 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.2 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.0 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.0 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.0 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.8 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.0 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.9 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.0 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.9 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 188 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 186 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 188 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 192 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 188 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 173 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 188 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 159 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 188 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.3 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.9 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.0 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.8 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.9 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.0 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.4 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.3 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.4 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.2 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.3 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.2 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.2 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.4 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.5 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.2 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.3 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.3 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.4 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.4 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.4 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.4 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.3 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.3 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.3 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.3 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.1 KiB