Merge remote-tracking branch 'origin/dev' into dev

This commit is contained in:
Drullkus committed 2015-02-13 18:44:36 -08:00
commit 828abb3ec8
13 files changed
+204 -87

No files matched your search

@@ -110,14 +110,15 @@ public enum Features {
void addBlocks() {
BlockCarvable antiBlock = (BlockCarvable) new BlockCarvableAntiBlock().setCreativeTab(ChiselTabs.tabOtherChiselBlocks);
antiBlock.carverHelper.setChiselBlockName("Anti Block");
if (!Configurations.allowChiselCrossColors)
if (!Configurations.allowChiselCrossColors) {
antiBlock.carverHelper.forbidChiseling = true;
}
for (int i = 0; i < 16; i++) {
antiBlock.carverHelper.addVariation("tile.antiBlock." + ItemDye.field_150921_b[i] + ".desc", i, "antiblock/" + ItemDye.field_150921_b[i] + "-antiBlock");
}
antiBlock.carverHelper.registerBlock(antiBlock, "antiBlock");
antiBlock.carverHelper.registerAll(antiBlock, "antiBlock");
OreDictionary.registerOre("antiBlock", antiBlock);
}
@@ -312,8 +313,9 @@ public enum Features {
carpet_block.carverHelper.addVariation("tile.carpet_block.13.desc", 13, "carpet/green");
carpet_block.carverHelper.addVariation("tile.carpet_block.14.desc", 14, "carpet/red");
carpet_block.carverHelper.addVariation("tile.carpet_block.15.desc", 15, "carpet/black");
if (!Configurations.allowChiselCrossColors)
if (!Configurations.allowChiselCrossColors) {
carpet_block.carverHelper.forbidChiseling = true;
}
carpet_block.carverHelper.registerAll(carpet_block, "carpet_block");
OreDictionary.registerOre("blockCarpet", carpet_block);
}
@@ -352,8 +354,9 @@ public enum Features {
carpet.carverHelper.addVariation("tile.carpet.13.desc", 13, "carpet/green");
carpet.carverHelper.addVariation("tile.carpet.14.desc", 14, "carpet/red");
carpet.carverHelper.addVariation("tile.carpet.15.desc", 15, "carpet/black");
if (!Configurations.allowChiselCrossColors)
if (!Configurations.allowChiselCrossColors) {
carpet.carverHelper.forbidChiseling = true;
}
carpet.carverHelper.registerAll(carpet, "carpet");
// for (int i = 0; i < 16; i++) {
@@ -2451,6 +2454,21 @@ public enum Features {
}
},
VALENTINES {
@Override void addBlocks() {
BlockCarvable valentines = (BlockCarvable) new BlockCarvable(Material.wood).setStepSound(Block.soundTypeStone).setCreativeTab(ChiselTabs.tabOtherChiselBlocks).setHardness(2F)
.setResistance(10F);
valentines.carverHelper.addVariation("tile.valentines.0.desc", 0, "valentines/bricks");
valentines.carverHelper.addVariation("tile.valentines.1.desc", 1, "valentines/companion");
valentines.carverHelper.registerAll(valentines, "valentines");
Carving.chisel.registerOre("valentines", "blockValentines");
}
@Override void addRecipes() {
GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(ChiselBlocks.valentines, 8, 0), "***", "*X*", "***", '*', "stone", 'X', new ItemStack(Items.dye, 1, 9)));
}
},
VOIDSTONE {
@Override
@@ -14,6 +14,7 @@ import net.minecraft.item.ItemStack;
import net.minecraft.tileentity.TileEntity;
import net.minecraft.util.AxisAlignedBB;
import net.minecraft.util.MathHelper;
import net.minecraft.util.MovingObjectPosition;
import net.minecraft.world.IBlockAccess;
import net.minecraft.world.World;
import net.minecraftforge.common.util.ForgeDirection;
@@ -76,13 +77,13 @@ public class BlockPresent extends Block implements ICarvable {
super.onBlockPlacedBy(world, x, y, z, player, stack);
int heading = MathHelper.floor_double(player.rotationYaw * 4.0F / 360.0F + 0.5D) & 3;
TileEntityPresent te = (TileEntityPresent) world.getTileEntity(x, y, z);
world.setBlockMetadataWithNotify(x, y, z, heading, 3);
world.setBlockMetadataWithNotify(x, y, z, stack.getItemDamage(), 3);
te.setRotation(heading);
te.findConnections();
if (te.isConnected()) {
TileEntityPresent other = te.getConnection();
world.setBlockMetadataWithNotify(other.xCoord, other.yCoord, other.zCoord, heading, 3);
other.setRotation(heading);
}
te.setType(stack.getItemDamage());
world.markBlockForUpdate(x, y, z);
}
@@ -92,8 +93,8 @@ public class BlockPresent extends Block implements ICarvable {
TileEntityPresent tileEntityPresent = (TileEntityPresent) world.getTileEntity(x, y, z);
if (tileEntityPresent != null) {
for (int c = 0; c < tileEntityPresent.getSizeInventory(); c++) {
ItemStack itemStack = tileEntityPresent.getStackInSlot(c);
for (int c = 0; c < tileEntityPresent.getTrueSizeInventory(); c++) {
ItemStack itemStack = tileEntityPresent.getTrueStackInSlot(c);
if (itemStack != null) {
dropBlockAsItem(world, x, y, z, itemStack);
@@ -132,7 +133,8 @@ public class BlockPresent extends Block implements ICarvable {
int x = me.xCoord, y = me.yCoord, z = me.zCoord;
if (me.isConnected()) {
ForgeDirection dir = me.getConnectionDir();
if (dir != ForgeDirection.NORTH && (!me.isParent() || dir == ForgeDirection.SOUTH)) {
// warning: magic below! Do not change this conditional
if (dir == ForgeDirection.EAST || (me.isParent() && dir == ForgeDirection.SOUTH) || (!me.isParent() && dir == ForgeDirection.SOUTH)) {
return AxisAlignedBB.getBoundingBox(x + minX, y + minY, z + minZ, x + maxX + dir.offsetX, y + maxY, z + maxZ + dir.offsetZ);
} else {
return AxisAlignedBB.getBoundingBox(x + dir.offsetX + minX, y + minY, z + dir.offsetZ + minZ, x + maxX, y + maxY, z + maxZ);
@@ -191,6 +193,16 @@ public class BlockPresent extends Block implements ICarvable {
}
return 0;
}
@Override
public int damageDropped(int meta) {
return meta;
}
@Override
public ItemStack getPickBlock(MovingObjectPosition target, World world, int x, int y, int z) {
return new ItemStack(this, 1, world.getBlockMetadata(x, y, z));
}
@Override
@SideOnly(Side.CLIENT)
@@ -200,8 +212,7 @@ public class BlockPresent extends Block implements ICarvable {
@Override
public CarvableVariation getVariation(IBlockAccess world, int x, int y, int z, int metadata) {
TileEntity te = world.getTileEntity(x, y, z);
return te instanceof TileEntityPresent ? carverHelper.getVariation(((TileEntityPresent) te).getType()) : carverHelper.getVariation(metadata);
return carverHelper.getVariation(metadata);
}
@Override
@@ -0,0 +1,29 @@
package com.cricketcraft.chisel.block.tileentity;
import net.minecraft.item.ItemStack;
public interface IDoubleChest {
/**
* @return The size of this specific chest's inventory. Does not account for the connection.
*/
int getTrueSizeInventory();
/**
* @param slot
* The true slot index.
* @return The actual stack in this chest's slot. Does not account for the connection.
*/
ItemStack getTrueStackInSlot(int slot);
/**
* Puts a stack in this chest's real slot at the given true index.
*
* @param slot
* The true slot index.
* @param stack
* The ItemStack to place in the slot.
*/
void putStackInTrueSlot(int slot, ItemStack stack);
}
@@ -1,5 +1,6 @@
package com.cricketcraft.chisel.block.tileentity;
import net.minecraft.block.Block;
import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.inventory.IInventory;
import net.minecraft.item.ItemStack;
@@ -10,19 +11,20 @@ import net.minecraft.network.Packet;
import net.minecraft.network.play.server.S35PacketUpdateTileEntity;
import net.minecraft.tileentity.TileEntity;
import net.minecraft.util.AxisAlignedBB;
import net.minecraft.world.World;
import net.minecraftforge.common.util.ForgeDirection;
import com.cricketcraft.chisel.init.ChiselBlocks;
import com.cricketcraft.chisel.network.PacketHandler;
import com.cricketcraft.chisel.network.message.MessagePresentConnect;
public class TileEntityPresent extends TileEntity implements IInventory {
public class TileEntityPresent extends TileEntity implements IInventory, IDoubleChest {
private TileEntityPresent connection = null;
private ForgeDirection cachedDir = null;
private boolean isParent;
private ItemStack[] inventory = new ItemStack[27];
private int type;
private final ItemStack[] inventory = new ItemStack[27];
private int rotation;
private boolean autoSearch = true;
@Override
@@ -46,12 +48,14 @@ public class TileEntityPresent extends TileEntity implements IInventory {
}
private boolean connectTo(TileEntityPresent present, ForgeDirection dir) {
if (present.type == type && !present.isConnected() && Math.abs(present.xCoord - xCoord + present.yCoord - yCoord + present.zCoord - zCoord) == 1) {
if (present.getBlockMetadata() == getBlockMetadata() && !present.isConnected() && Math.abs(present.xCoord - xCoord + present.yCoord - yCoord + present.zCoord - zCoord) == 1) {
connection = present;
connection.connection = this;
connection.cachedDir = dir.getOpposite();
connection.markDirty();
cachedDir = dir;
isParent = !present.isParent;
markDirty();
PacketHandler.INSTANCE.sendToDimension(new MessagePresentConnect(this, dir, true), worldObj.provider.dimensionId);
return true;
}
@@ -70,8 +74,10 @@ public class TileEntityPresent extends TileEntity implements IInventory {
if (isConnected()) {
this.connection.cachedDir = null;
this.connection.connection = null;
this.connection.markDirty();
this.cachedDir = null;
this.connection = null;
this.markDirty();
PacketHandler.INSTANCE.sendToDimension(new MessagePresentConnect(this, ForgeDirection.UNKNOWN, false), worldObj.provider.dimensionId);
}
}
@@ -88,12 +94,12 @@ public class TileEntityPresent extends TileEntity implements IInventory {
return isParent || !isConnected();
}
public int getType() {
return type;
public int getRotation() {
return rotation;
}
public void setType(int type) {
this.type = type;
public void setRotation(int rot) {
this.rotation = rot;
}
public void findConnections() {
@@ -123,7 +129,7 @@ public class TileEntityPresent extends TileEntity implements IInventory {
super.writeToNBT(tag);
NBTTagList nbttaglist = new NBTTagList();
for (int i = 0; i < inventory.length; ++i)
for (int i = 0; i < getTrueSizeInventory(); ++i)
{
if (inventory[i] != null)
{
@@ -136,7 +142,7 @@ public class TileEntityPresent extends TileEntity implements IInventory {
tag.setTag("Items", nbttaglist);
tag.setBoolean("isParent", isParent);
tag.setInteger("presentType", type);
tag.setInteger("rotation", rotation);
if (cachedDir != null) {
tag.setInteger("conDir", cachedDir.ordinal());
}
@@ -147,14 +153,13 @@ public class TileEntityPresent extends TileEntity implements IInventory {
{
super.readFromNBT(tag);
NBTTagList nbttaglist = tag.getTagList("Items", 10);
inventory = new ItemStack[this.getSizeInventory()];
for (int i = 0; i < nbttaglist.tagCount(); ++i)
{
NBTTagCompound nbttagcompound1 = nbttaglist.getCompoundTagAt(i);
int j = nbttagcompound1.getByte("Slot") & 255;
if (j >= 0 && j < inventory.length)
if (j >= 0 && j < getTrueSizeInventory())
{
inventory[j] = ItemStack.loadItemStackFromNBT(nbttagcompound1);
}
@@ -162,7 +167,7 @@ public class TileEntityPresent extends TileEntity implements IInventory {
this.isParent = tag.getBoolean("isParent");
this.type = tag.getInteger("presentType");
this.rotation = tag.getInteger("rotation");
if (tag.hasKey("conDir")) {
cachedDir = ForgeDirection.values()[tag.getInteger("conDir")];
}
@@ -180,18 +185,33 @@ public class TileEntityPresent extends TileEntity implements IInventory {
public void onDataPacket(NetworkManager net, S35PacketUpdateTileEntity packet) {
readFromNBT(packet.func_148857_g());
}
@Override
public boolean shouldRefresh(Block oldBlock, Block newBlock, int oldMeta, int newMeta, World world, int x, int y, int z) {
// prevent losing TE data when in-world chiseling
return oldBlock != newBlock;
}
private int getAdjustedSlot(int slot) {
slot %= getSizeInventory();
if (isConnected() && !isParent) {
slot = (slot + getTrueSizeInventory()) % getSizeInventory();
}
return slot;
}
/* IInventory */
@Override
public int getSizeInventory() {
return isConnected() ? inventory.length + connection.inventory.length : inventory.length;
return isConnected() ? getTrueSizeInventory() + connection.getTrueSizeInventory() : getTrueSizeInventory();
}
@Override
public ItemStack getStackInSlot(int slot) {
if (slot >= inventory.length) {
return isConnected() ? connection.inventory[slot % inventory.length] : null;
slot = getAdjustedSlot(slot);
if (slot >= getTrueSizeInventory()) {
return isConnected() ? connection.inventory[slot % getTrueSizeInventory()] : null;
} else {
return inventory[slot];
}
@@ -200,10 +220,11 @@ public class TileEntityPresent extends TileEntity implements IInventory {
@Override
public ItemStack decrStackSize(int slot, int amount)
{
slot = getAdjustedSlot(slot);
ItemStack[] inv = inventory;
if (isConnected() && slot >= inventory.length) {
if (isConnected() && slot >= getTrueSizeInventory()) {
inv = connection.inventory;
slot %= inventory.length;
slot %= getTrueSizeInventory();
}
if (inv[slot] != null)
@@ -243,10 +264,11 @@ public class TileEntityPresent extends TileEntity implements IInventory {
@Override
public void setInventorySlotContents(int slot, ItemStack stack) {
if (slot < inventory.length) {
slot = getAdjustedSlot(slot);
if (slot < getTrueSizeInventory()) {
inventory[slot] = stack;
} else if (isConnected()) {
connection.inventory[slot % inventory.length] = stack;
connection.inventory[slot % getTrueSizeInventory()] = stack;
}
}
@@ -284,4 +306,21 @@ public class TileEntityPresent extends TileEntity implements IInventory {
public boolean isItemValidForSlot(int p_94041_1_, ItemStack p_94041_2_) {
return true;
}
/* IDoubleChest */
@Override
public int getTrueSizeInventory() {
return inventory.length;
}
@Override
public ItemStack getTrueStackInSlot(int slot) {
return inventory[slot % getTrueSizeInventory()];
}
@Override
public void putStackInTrueSlot(int slot, ItemStack stack) {
inventory[slot % getTrueSizeInventory()] = stack;
}
}
@@ -255,19 +255,40 @@ public class CarvableHelper {
else if (n)
return variation.seamsCtmVert.icons[reverse ? 3 : 2];
return variation.seamsCtmVert.icons[0];
case V9:
case V4:
int index = x + y + z;
if ((side==2)||(side==5))
{
index=-index;
}
while (index < 0)
{
index = index+10000;
case V9:
case V4:
int variationSize = (variation.kind == V9) ? 3 : 2;
int xModulus = x % variationSize;
int zModulus = z % variationSize;
//This ensures that blocks placed near 0,0 or it's axis' do not misbehave
int textureX = (xModulus < 0) ? (xModulus + variationSize) : xModulus;
int textureZ = (zModulus < 0) ? (zModulus + variationSize) : zModulus;
//Always invert the y index
int textureY = (variationSize - (y % variationSize) - 1);
if (side == 2 || side == 5) {
//For WEST, SOUTH reverse the indexes for both X and Z
textureX = (variationSize - textureX - 1);
textureZ = (variationSize - textureZ - 1);
} else if (side == 0) {
//For DOWN, reverse the indexes for only Z
textureZ = (variationSize - textureZ - 1);
}
return variation.variations9.icons[index % ((variation.kind == V9) ? 9 : 4)];
int index;
if (side == 0 || side == 1) {
// DOWN || UP
index = textureX + textureZ * variationSize;
} else if (side == 2 || side == 3) {
// NORTH || SOUTH
index = textureX + textureY * variationSize;
} else {
// WEST || EAST
index = textureZ + textureY * variationSize;
}
return variation.variations9.icons[index];
case CTMX:
return variation.icon;
case R16:
@@ -1,5 +1,6 @@
package com.cricketcraft.chisel.client.render;
import com.cricketcraft.chisel.config.Configurations;
import net.minecraft.block.Block;
import net.minecraft.client.renderer.RenderBlocks;
import net.minecraft.client.renderer.Tessellator;
@@ -25,7 +26,7 @@ public class BlockGlowRenderer implements ISimpleBlockRenderingHandler {
@Override
public void renderInventoryBlock(Block block, int metadata, int modelId, RenderBlocks renderer) {
GL11.glTranslatef(-0.5F, -0.5F, -0.5F);
GeneralClient.setGLColorFromInt(ItemDye.field_150922_c[metadata]);
GeneralClient.setGLColorFromInt(Configurations.configColors[metadata]);
GL11.glDisable(GL11.GL_LIGHTING);
Drawing.drawBlock(block, ((BlockCarvableGlow)block).getGlowTexture(), renderer);
GL11.glEnable(GL11.GL_LIGHTING);
@@ -36,7 +37,7 @@ public class BlockGlowRenderer implements ISimpleBlockRenderingHandler {
@Override
public boolean renderWorldBlock(IBlockAccess world, int x, int y, int z, Block block, int modelId, RenderBlocks renderer) {
Tessellator.instance.setColorOpaque_I(ItemDye.field_150922_c[world.getBlockMetadata(x, y, z)]);
Tessellator.instance.setColorOpaque_I(Configurations.configColors[world.getBlockMetadata(x, y, z)]);
Tessellator.instance.setBrightness(0xF000F0);
Drawing.renderAllFaces(renderer, block, x, y, z, ((BlockCarvableGlow) block).getGlowTexture());
renderer.renderStandardBlock(block, x, y, z);
@@ -34,11 +34,11 @@ public class RenderPresent extends TileEntitySpecialRenderer implements IItemRen
GL11.glColor4f(1.0F, 1.0F, 1.0F, 1.0F);
GL11.glTranslatef((float) x, (float) y + 1.0F, (float) z + 1.0F);
GL11.glScalef(1.0F, -1.0F, -1.0F);
int meta = present.getBlockMetadata();
int rotation = present.getRotation();
bindTexture(present);
if (!present.isConnected()) {
GL11.glRotatef(90 * meta + 180, 0, 1, 0);
switch(present.getBlockMetadata()) {
GL11.glRotatef(90 * rotation + 180, 0, 1, 0);
switch(rotation) {
case 0:
GL11.glTranslatef(-1, 0, -1);
break;
@@ -67,7 +67,7 @@ public class RenderPresent extends TileEntitySpecialRenderer implements IItemRen
default:
break;
}
if (meta == 0 || meta == 3) {
if (rotation == 0 || rotation == 3) {
GL11.glRotatef(180, 0, 1, 0);
GL11.glTranslatef(-2, 0, -1);
}
@@ -77,10 +77,10 @@ public class RenderPresent extends TileEntitySpecialRenderer implements IItemRen
}
private void bindTexture(TileEntityPresent present) {
int idx = present.getType() + (present.isConnected() ? 0 : 16);
int idx = present.getWorldObj().getBlockMetadata(present.xCoord, present.yCoord, present.zCoord) + (present.isConnected() ? 0 : 16);
ResourceLocation rl = textureCache.get(idx);
if (rl == null) {
String res = ChiselBlocks.present.getModelTexture(present.getType());
String res = ChiselBlocks.present.getModelTexture(idx % 16);
res += present.isConnected() ? "_double.png" : ".png";
rl = new ResourceLocation("chisel", res);
textureCache.put(idx, rl);
@@ -1,6 +1,8 @@
package com.cricketcraft.chisel.config;
import com.cricketcraft.chisel.Chisel;
import com.cricketcraft.chisel.Features;
import net.minecraft.item.ItemDye;
import net.minecraftforge.common.config.Configuration;
import org.apache.commons.lang3.StringUtils;
@@ -47,6 +49,8 @@ public class Configurations {
public static String getRoadLineTool;
public static int roadLineToolLevel;
public static int[] configColors = new int[ItemDye.field_150923_a.length];
public static boolean refreshConfig() {
String category;
@@ -63,8 +67,7 @@ public class Configurations {
enableFMP = config.get(category, "enableFMP", true, "Do you want to enable FMP").getBoolean(true);
chiselStoneToCobbleBricks = config.get(category, "chiselStoneToCobbleBricks", true, "Chisel stone to cobblestone and bricks by left clicking.").getBoolean(false);
chiselBackToVanillaLeaves = config.get(category, "chiselBackToVanillaLeaves", false, "If this is true, you can chisel from the chisel leaves back to vanilla ones. If it is false, you cannot.")
.getBoolean(
false);
.getBoolean(false);
/* worldgen */
category = "worldgen";
@@ -103,6 +106,21 @@ public class Configurations {
"The lowest harvest level of the tool able to break the road lines (requires useRoadLineTool to be true to take effect) (0 = Wood/Gold, 1 = Stone, 2 = Iron, 3 = Diamond) Default: 0")
.getInt();
/* hexColors */
category = "hexColors";
for(int i = 0; i < ItemDye.field_150923_a.length; i++) {
// tterrag... don't kill me over this formatting.
String temp = config.get(category, "hex" + ItemDye.field_150923_a[i], "#" + Integer.toHexString(ItemDye.field_150922_c[i]), Character.toUpperCase(ItemDye.field_150923_a[i].charAt(0)) + ItemDye.field_150923_a[i].substring(1) + " color for hex block overlay #RRGGBB").getString();
// Or this
try {
configColors[i] = Integer.decode(temp);
} catch (NumberFormatException e) {
Chisel.logger.warn("Configuration error, " + temp + " was not recognized as a color. Using default: #" + Integer.toHexString(ItemDye.field_150922_c[i]));
configColors[i] = ItemDye.field_150922_c[i];
}
}
if (config.hasChanged()) {
config.save();
}
@@ -1,40 +1,9 @@
package com.cricketcraft.chisel.init;
import net.minecraft.block.Block;
import com.cricketcraft.chisel.Chisel;
import com.cricketcraft.chisel.block.BlockCarvable;
import com.cricketcraft.chisel.block.BlockCarvableGlass;
import com.cricketcraft.chisel.block.BlockCarvableGlowstone;
import com.cricketcraft.chisel.block.BlockCarvableIce;
import com.cricketcraft.chisel.block.BlockCarvableIcePillar;
import com.cricketcraft.chisel.block.BlockCarvableIceStairs;
import com.cricketcraft.chisel.block.BlockCarvableLayered;
import com.cricketcraft.chisel.block.BlockCarvablePackedIce;
import com.cricketcraft.chisel.block.BlockCarvablePackedIcePillar;
import com.cricketcraft.chisel.block.BlockCarvablePackedIceStairs;
import com.cricketcraft.chisel.block.BlockCarvablePane;
import com.cricketcraft.chisel.block.BlockCarvablePillar;
import com.cricketcraft.chisel.block.BlockCarvablePowered;
import com.cricketcraft.chisel.block.BlockCarvablePumpkin;
import com.cricketcraft.chisel.block.BlockCarvableSlab;
import com.cricketcraft.chisel.block.BlockCarvableStairs;
import com.cricketcraft.chisel.block.BlockCarvableTorch;
import com.cricketcraft.chisel.block.BlockCloud;
import com.cricketcraft.chisel.block.BlockConcrete;
import com.cricketcraft.chisel.block.BlockGrimstone;
import com.cricketcraft.chisel.block.BlockHolystone;
import com.cricketcraft.chisel.block.BlockLavastone;
import com.cricketcraft.chisel.block.BlockMarbleCarpet;
import com.cricketcraft.chisel.block.BlockMarbleTexturedOre;
import com.cricketcraft.chisel.block.BlockMarbleWall;
import com.cricketcraft.chisel.block.BlockPresent;
import com.cricketcraft.chisel.block.BlockRoadLine;
import com.cricketcraft.chisel.block.BlockSnakestone;
import com.cricketcraft.chisel.block.BlockSnakestoneObsidian;
import com.cricketcraft.chisel.block.BlockWaterstone;
import com.cricketcraft.chisel.block.*;
import cpw.mods.fml.common.registry.GameRegistry.ObjectHolder;
import net.minecraft.block.Block;
@ObjectHolder(Chisel.MOD_ID)
public final class ChiselBlocks {
@@ -122,6 +91,8 @@ public final class ChiselBlocks {
public static final BlockCarvable bloodRune = null;
public static final BlockCarvable bloodBrick = null;
// Holidays
public static final BlockCarvable valentines = null;
public static final BlockPresent present = null;
// Arrays can't be final because of how @ObjectHolder works
@@ -102,7 +102,11 @@ public enum ChiselMode implements IChiselMode {
}
if (held != null && held.getItem() instanceof IChiselItem) {
world.setBlock(x, y, z, v.getBlock(), v.getBlockMeta(), 3);
if (origBlock == block) {
world.setBlockMetadataWithNotify(x, y, z, v.getBlockMeta(), 3);
} else {
world.setBlock(x, y, z, v.getBlock(), v.getBlockMeta(), 3);
}
boolean breakChisel = false;
if (((IChiselItem) player.getCurrentEquippedItem().getItem()).onChisel(world, player.getCurrentEquippedItem(), v)) {
player.getCurrentEquippedItem().damageItem(1, player);
@@ -29,6 +29,11 @@ item.upgrade_stack.desc=Allows it to manufacture stacks at a time
#Chisel 2
#Valentines
tile.chisel.valentines.name=Valentines Block
tile.valentines.0.desc=Valentines Bricks
tile.valentines.1.desc=If it speaks, I wouldn't touch it
#AntiBlocks
tile.chisel.antiBlock.name=Anti Block
tile.antiBlock.black.desc=Black Anti Block
Binary file not shown.

After

Width:  |  Height:  |  Size: 512 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 504 B