mirror of
https://github.com/GTNewHorizons/Chisel.git
synced 2026-11-20 12:29:50 +00:00
Move CarvableHelper to API
This commit is contained in:
1 parent
3013e263a2
commit
47abdbbc10
33 files changed
+216
-220
No files matched your search
@@ -16,10 +16,10 @@ import net.minecraft.util.Vec3;
|
||||
import net.minecraft.world.World;
|
||||
|
||||
import com.cricketcraft.chisel.api.IAdvancedChisel;
|
||||
import com.cricketcraft.chisel.api.carving.CarvingUtils;
|
||||
import com.cricketcraft.chisel.api.carving.ICarvingVariation;
|
||||
import com.cricketcraft.chisel.api.carving.IChiselMode;
|
||||
import com.cricketcraft.chisel.carving.Carving;
|
||||
import com.cricketcraft.chisel.carving.CarvingVariation;
|
||||
import com.cricketcraft.chisel.item.chisel.ChiselMode;
|
||||
|
||||
public class General {
|
||||
@@ -143,9 +143,9 @@ public class General {
|
||||
initTag(chisel);
|
||||
chisel.stackTagCompound.setString(MODE_KEY, mode.name());
|
||||
}
|
||||
|
||||
|
||||
public static ICarvingVariation getVariation(ItemStack stack) {
|
||||
ICarvingVariation v = Carving.chisel.getVariation(Block.getBlockFromItem(stack.getItem()), stack.getItemDamage());
|
||||
return v == null ? new CarvingVariation(Block.getBlockFromItem(stack.getItem()), stack.getItemDamage(), 99) : v;
|
||||
return v == null ? CarvingUtils.getDefaultVariationFor(Block.getBlockFromItem(stack.getItem()), stack.getItemDamage(), 99) : v;
|
||||
}
|
||||
}
|
||||
@@ -4,8 +4,6 @@ import java.util.HashMap;
|
||||
import java.util.Random;
|
||||
|
||||
import net.minecraft.client.Minecraft;
|
||||
import net.minecraft.client.renderer.texture.TextureMap;
|
||||
import net.minecraft.util.IIcon;
|
||||
import net.minecraft.util.ResourceLocation;
|
||||
import net.minecraft.world.World;
|
||||
|
||||
@@ -19,10 +17,6 @@ public class GeneralClient {
|
||||
Minecraft.getMinecraft().theWorld.playSound(x + 0.5, y + 0.5, z + 0.5, sound, 0.3f + 0.7f * rand.nextFloat(), 0.6f + 0.4f * rand.nextFloat(), true);
|
||||
}
|
||||
|
||||
public static IIcon getMissingIcon() {
|
||||
return ((TextureMap) Minecraft.getMinecraft().getTextureManager().getTexture(TextureMap.locationBlocksTexture)).getAtlasSprite("missingno");
|
||||
}
|
||||
|
||||
static HashMap<String, ResourceLocation> resources = new HashMap<String, ResourceLocation>();
|
||||
|
||||
public static void bind(String textureName) {
|
||||
|
||||
Reference in new issue
Block a user