mirror of
https://github.com/GTNewHorizons/Chisel.git
synced 2026-11-17 03:05:10 +00:00
IChiselItem items no longer need to worry about playing the sound fx.
Remove ChiselMode from API packages
This commit is contained in:
1 parent
a3f8c357e3
commit
4de7ef8190
7 files changed
+14
-13
No files matched your search
@@ -4,9 +4,13 @@ import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.inventory.IInventory;
|
||||
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;
|
||||
import com.cricketcraft.chisel.utils.GeneralClient;
|
||||
|
||||
public class SlotChiselSelection extends Slot {
|
||||
|
||||
@@ -58,6 +62,11 @@ public class SlotChiselSelection extends Slot {
|
||||
|
||||
((IChiselItem)container.chisel.getItem()).onChisel(player.worldObj, player.inventory, player.inventory.currentItem, container.chisel, General.getVariation(crafted));
|
||||
|
||||
if (player.worldObj.isRemote) {
|
||||
String sound = Carving.chisel.getVariationSound(crafted.getItem(), crafted.getItemDamage());
|
||||
GeneralClient.playChiselSound(player.worldObj, MathHelper.floor_double(player.posX), MathHelper.floor_double(player.posY), MathHelper.floor_double(player.posZ), sound);
|
||||
}
|
||||
|
||||
/*
|
||||
* ItemStack stack=player.inventory.getItemStack();
|
||||
*
|
||||
|
||||
Reference in new issue
Block a user