mirror of
https://github.com/GTNewHorizons/Chisel.git
synced 2026-11-11 15:57:31 +00:00
Merge branch 'master' into dev
Conflicts: changelog
This commit is contained in:
commit
8a539dfeaa
7 files changed
+12
-16
No files matched your search
@@ -143,7 +143,7 @@ public enum Features {
|
||||
|
||||
@Override
|
||||
void addRecipes() {
|
||||
// TODO Add a recipe
|
||||
GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(ChiselBlocks.antiBlock, 8, 0), "SSS", "SGS", "SSS", 'S', "stone", 'G', "dustGlowstone"));
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -705,6 +705,11 @@ public enum Features {
|
||||
futura.carverHelper.registerAll(futura, "futura");
|
||||
Carving.chisel.registerOre("futura", "futura");
|
||||
}
|
||||
|
||||
@Override
|
||||
void addRecipes(){
|
||||
GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(ChiselBlocks.futura, 8, 0), "SSS", "SGS", "SSS", 'S', "stone", 'G', "dustRedstone"));
|
||||
}
|
||||
},
|
||||
|
||||
GLASS {
|
||||
|
||||
@@ -2,7 +2,6 @@ package com.cricketcraft.chisel.api;
|
||||
|
||||
import net.minecraft.block.Block;
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.inventory.IInventory;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.world.World;
|
||||
|
||||
@@ -34,7 +33,7 @@ public interface IChiselItem {
|
||||
* @param chisel
|
||||
* The {@link ItemStack} representing the chisel
|
||||
* @param target
|
||||
* The {@link ItemStack} representing the target item
|
||||
* The {@link ICarvingVariation} representing the target item
|
||||
* @return True if the chisel should be damaged. False otherwise.
|
||||
*/
|
||||
boolean onChisel(World world, ItemStack chisel, ICarvingVariation target);
|
||||
@@ -46,17 +45,13 @@ public interface IChiselItem {
|
||||
*
|
||||
* @param world
|
||||
* {@link World} object
|
||||
* @param inv
|
||||
* The inventory this chisel is currently in
|
||||
* @param slot
|
||||
* The slot index of the chisel in the inventory
|
||||
* @param chisel
|
||||
* The {@link ItemStack} representing the chisel
|
||||
* @param target
|
||||
* The {@link ItemStack} representing the target item
|
||||
* The {@link ICarvingVariation} representing the target item
|
||||
* @return True if the current target can be chiseled into anything. False otherwise.
|
||||
*/
|
||||
boolean canChisel(World world, IInventory inv, int slot, ItemStack chisel, ItemStack target);
|
||||
boolean canChisel(World world, ItemStack chisel, ICarvingVariation target);
|
||||
|
||||
/**
|
||||
* Allows you to control if your item can chisel this block in the world.
|
||||
|
||||
@@ -1,7 +1,5 @@
|
||||
package com.cricketcraft.chisel.api.carving;
|
||||
|
||||
import com.cricketcraft.chisel.carving.Carving;
|
||||
|
||||
import net.minecraft.item.ItemStack;
|
||||
|
||||
public class CarvingUtils {
|
||||
|
||||
@@ -15,7 +15,6 @@ import net.minecraft.tileentity.TileEntity;
|
||||
import net.minecraft.util.StatCollector;
|
||||
|
||||
import com.cricketcraft.chisel.api.IChiselItem;
|
||||
import com.cricketcraft.chisel.api.carving.CarvingUtils;
|
||||
import com.cricketcraft.chisel.carving.Carving;
|
||||
import com.cricketcraft.chisel.client.GeneralChiselClient;
|
||||
import com.cricketcraft.chisel.init.ChiselItems;
|
||||
|
||||
@@ -10,6 +10,7 @@ import net.minecraft.item.ItemStack;
|
||||
|
||||
import com.cricketcraft.chisel.api.IChiselItem;
|
||||
import com.cricketcraft.chisel.item.chisel.ItemChisel;
|
||||
import com.cricketcraft.chisel.utils.General;
|
||||
|
||||
public class InventoryChiselSelection implements IInventory {
|
||||
|
||||
@@ -120,7 +121,7 @@ public class InventoryChiselSelection implements IInventory {
|
||||
if (Block.getBlockFromItem(item) == null)
|
||||
return;
|
||||
|
||||
if (!((IChiselItem) chisel.getItem()).canChisel(container.playerInventory.player.worldObj, this, container.playerInventory.currentItem, chisel, chiseledItem))
|
||||
if (!((IChiselItem) chisel.getItem()).canChisel(container.playerInventory.player.worldObj, chisel, General.getVariation(chiseledItem)))
|
||||
return;
|
||||
|
||||
ArrayList<ItemStack> list = container.carving.getItems(chiseledItem);
|
||||
|
||||
@@ -6,7 +6,6 @@ import net.minecraft.inventory.Slot;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.util.MathHelper;
|
||||
|
||||
import com.cricketcraft.chisel.Chisel;
|
||||
import com.cricketcraft.chisel.api.IChiselItem;
|
||||
import com.cricketcraft.chisel.carving.Carving;
|
||||
import com.cricketcraft.chisel.utils.General;
|
||||
|
||||
@@ -8,7 +8,6 @@ import net.minecraft.entity.EntityLivingBase;
|
||||
import net.minecraft.entity.SharedMonsterAttributes;
|
||||
import net.minecraft.entity.ai.attributes.AttributeModifier;
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.inventory.IInventory;
|
||||
import net.minecraft.item.Item;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.world.World;
|
||||
@@ -106,7 +105,7 @@ public class ItemChisel extends Item implements IChiselItem {
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean canChisel(World world, IInventory inv, int slot, ItemStack chisel, ItemStack target) {
|
||||
public boolean canChisel(World world, ItemStack chisel, ICarvingVariation target) {
|
||||
return true;
|
||||
}
|
||||
|
||||
|
||||
Reference in new issue
Block a user