mirror of
https://github.com/GTNewHorizons/Chisel.git
synced 2026-11-12 16:27:45 +00:00
Merge branch 'dev' of https://github.com/TheCricket/Chisel-2 into dev
This commit is contained in:
commit
7741a8b4ea
11 files changed
+172
-75
No files matched your search
@@ -11,6 +11,7 @@ import org.apache.logging.log4j.LogManager;
|
||||
import org.apache.logging.log4j.Logger;
|
||||
|
||||
import com.cricketcraft.chisel.block.BlockCarvable;
|
||||
import com.cricketcraft.chisel.client.player.PlayerSpecials;
|
||||
import com.cricketcraft.chisel.compat.Compatibility;
|
||||
import com.cricketcraft.chisel.compat.IMCHandler;
|
||||
import com.cricketcraft.chisel.config.Configurations;
|
||||
@@ -32,9 +33,9 @@ import cpw.mods.fml.common.Mod.Instance;
|
||||
import cpw.mods.fml.common.SidedProxy;
|
||||
import cpw.mods.fml.common.event.FMLInitializationEvent;
|
||||
import cpw.mods.fml.common.event.FMLInterModComms;
|
||||
import cpw.mods.fml.common.event.FMLInterModComms.IMCEvent;
|
||||
import cpw.mods.fml.common.event.FMLInterModComms.IMCMessage;
|
||||
import cpw.mods.fml.common.event.FMLMissingMappingsEvent;
|
||||
import cpw.mods.fml.common.event.FMLInterModComms.IMCEvent;
|
||||
import cpw.mods.fml.common.event.FMLMissingMappingsEvent.MissingMapping;
|
||||
import cpw.mods.fml.common.event.FMLPostInitializationEvent;
|
||||
import cpw.mods.fml.common.event.FMLPreInitializationEvent;
|
||||
@@ -140,6 +141,9 @@ public class Chisel {
|
||||
MinecraftForge.EVENT_BUS.register(this);
|
||||
FMLCommonHandler.instance().bus().register(instance);
|
||||
|
||||
FMLCommonHandler.instance().bus().register(new PlayerSpecials());
|
||||
|
||||
|
||||
FMLInterModComms.sendMessage("Waila", "register", "com.cricketcraft.chisel.compat.WailaCompat.register");
|
||||
}
|
||||
|
||||
|
||||
@@ -388,8 +388,10 @@ public enum Features {
|
||||
void addItems() {
|
||||
ItemChisel chisel = (ItemChisel) new ItemChisel(ChiselType.IRON).setCreativeTab(ChiselTabs.tabChisel);
|
||||
ItemChisel diamondChisel = (ItemChisel) new ItemChisel(ChiselType.DIAMOND).setCreativeTab(ChiselTabs.tabChisel);
|
||||
ItemChisel obsidianChisel = (ItemChisel) new ItemChisel(ChiselType.OBSIDIAN).setCreativeTab(ChiselTabs.tabChisel);
|
||||
GameRegistry.registerItem(chisel, "chisel");
|
||||
GameRegistry.registerItem(diamondChisel, "diamondChisel");
|
||||
GameRegistry.registerItem(obsidianChisel, "obsidianChisel");
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -397,9 +399,11 @@ public enum Features {
|
||||
if (Configurations.chiselRecipe) {
|
||||
GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(ChiselItems.chisel), " YY", " YY", "X ", 'X', "stickWood", 'Y', "ingotIron"));
|
||||
GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(ChiselItems.diamondChisel), " YY", " YY", "x ", 'x', "stickWood", 'Y', "gemDiamond"));
|
||||
GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(ChiselItems.obsidianChisel), " YY", " YY", "x ", 'x', "stickWood", 'Y', Blocks.obsidian));
|
||||
} else {
|
||||
GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(ChiselItems.chisel), " Y", "X ", 'X', "stickWood", 'Y', "ingotIron"));
|
||||
GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(ChiselItems.diamondChisel), " Y", "X ", 'X', "stickWood", 'Y', "gemDiamond"));
|
||||
GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(ChiselItems.obsidianChisel), " Y", "X ", 'X', "stickWood", 'Y', Blocks.obsidian));
|
||||
}
|
||||
}
|
||||
},
|
||||
@@ -1822,7 +1826,9 @@ public enum Features {
|
||||
Carving.chisel.addVariation("RCAbyssalBlock", abyssal, 4, 4);
|
||||
Carving.chisel.addVariation("RCAbyssalBlock", abyssal, 5, 5);
|
||||
Carving.chisel.registerOre("RCAbyssalBlock", "RCAbyssalBlock");
|
||||
};
|
||||
}
|
||||
|
||||
;
|
||||
},
|
||||
RC_BLEACHED_BONE(RAILCRAFT.getRequiredMod(), RAILCRAFT) {
|
||||
|
||||
@@ -1913,7 +1919,9 @@ public enum Features {
|
||||
Carving.chisel.addVariation("RCQuarriedBlock", quarried, 4, 4);
|
||||
Carving.chisel.addVariation("RCQuarriedBlock", quarried, 5, 5);
|
||||
Carving.chisel.registerOre("RCQuarriedBlock", "RCQuarriedBlock");
|
||||
};
|
||||
}
|
||||
|
||||
;
|
||||
},
|
||||
|
||||
RC_SANDY_STONE(RAILCRAFT.getRequiredMod(), RAILCRAFT) {
|
||||
@@ -2122,8 +2130,7 @@ public enum Features {
|
||||
@Override
|
||||
void addBlocks() {
|
||||
BlockSnakestoneObsidian obsidian_snakestone = (BlockSnakestoneObsidian) new BlockSnakestoneObsidian("Chisel:snakestone/obsidian/").setBlockName("chisel.obsidianSnakestone")
|
||||
.setHardness(50.0F)
|
||||
.setResistance(2000.0F);
|
||||
.setHardness(50.0F).setResistance(2000.0F);
|
||||
GameRegistry.registerBlock(obsidian_snakestone, ItemCarvable.class, "obsidian_snakestone");
|
||||
Carving.chisel.addVariation("obsidian", obsidian_snakestone, 1, 16);
|
||||
Carving.chisel.addVariation("obsidian", obsidian_snakestone, 13, 17);
|
||||
@@ -2180,13 +2187,13 @@ public enum Features {
|
||||
stonebricksmooth.carverHelper.addVariation("tile.stonebricksmooth.15.desc", 15, "stonebrick/poison");
|
||||
stonebricksmooth.carverHelper.registerAll(stonebricksmooth, "stonebricksmooth");
|
||||
|
||||
BlockCarvable stonebricksmooth2 = (BlockCarvable) new BlockCarvable(Material.rock).setCreativeTab(ChiselTabs.tabStoneChiselBlocks).setHardness(1.5F).setResistance(10.0F)
|
||||
.setStepSound(Block.soundTypeStone);
|
||||
stonebricksmooth2.carverHelper.addVariation("tile.stonebricksmooth2.0.desc", 0, "stonebrick2/masonryPlain");
|
||||
stonebricksmooth2.carverHelper.addVariation("tile.stonebricksmooth2.1.desc", 1, "stonebrick2/masonryFelsic");
|
||||
stonebricksmooth2.carverHelper.addVariation("tile.stonebricksmooth2.2.desc", 2, "stonebrick2/masonryMafic");
|
||||
stonebricksmooth2.carverHelper.addVariation("tile.stonebricksmooth2.3.desc", 3, "stonebrick2/masonryMixed");
|
||||
stonebricksmooth2.carverHelper.registerAll(stonebricksmooth2, "stonebricksmooth2");
|
||||
BlockCarvable stonebricksmooth2 = (BlockCarvable) new BlockCarvable(Material.rock).setCreativeTab(ChiselTabs.tabStoneChiselBlocks).setHardness(1.5F).setResistance(10.0F)
|
||||
.setStepSound(Block.soundTypeStone);
|
||||
stonebricksmooth2.carverHelper.addVariation("tile.stonebricksmooth2.0.desc", 0, "stonebrick2/masonryPlain");
|
||||
stonebricksmooth2.carverHelper.addVariation("tile.stonebricksmooth2.1.desc", 1, "stonebrick2/masonryFelsic");
|
||||
stonebricksmooth2.carverHelper.addVariation("tile.stonebricksmooth2.2.desc", 2, "stonebrick2/masonryMafic");
|
||||
stonebricksmooth2.carverHelper.addVariation("tile.stonebricksmooth2.3.desc", 3, "stonebrick2/masonryMixed");
|
||||
stonebricksmooth2.carverHelper.registerAll(stonebricksmooth2, "stonebricksmooth2");
|
||||
Carving.chisel.registerOre("stonebricksmooth2", "stonebricksmooth");
|
||||
}
|
||||
},
|
||||
@@ -2303,7 +2310,9 @@ public enum Features {
|
||||
mossy_templeblock.carverHelper.addVariation("tile.mossy_templeblock.15.desc", 15, "templemossy/smalltiles-light");
|
||||
mossy_templeblock.carverHelper.registerAll(mossy_templeblock, "mossy_templeblock");
|
||||
Carving.chisel.registerOre("mossy_templeblock", "mossy_templeblock");
|
||||
};
|
||||
}
|
||||
|
||||
;
|
||||
},
|
||||
|
||||
TIN {
|
||||
@@ -2455,7 +2464,9 @@ public enum Features {
|
||||
},
|
||||
|
||||
VALENTINES {
|
||||
@Override void addBlocks() {
|
||||
|
||||
@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");
|
||||
@@ -2464,7 +2475,8 @@ public enum Features {
|
||||
Carving.chisel.registerOre("valentines", "blockValentines");
|
||||
}
|
||||
|
||||
@Override void addRecipes() {
|
||||
@Override
|
||||
void addRecipes() {
|
||||
GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(ChiselBlocks.valentines, 8, 0), "***", "*X*", "***", '*', "stone", 'X', new ItemStack(Items.dye, 1, 9)));
|
||||
}
|
||||
},
|
||||
@@ -2651,7 +2663,6 @@ public enum Features {
|
||||
return true;
|
||||
}
|
||||
},
|
||||
|
||||
;
|
||||
|
||||
private static final String[] dyeOres = { "dyeBlack", "dyeRed", "dyeGreen", "dyeBrown", "dyeBlue", "dyePurple", "dyeCyan", "dyeLightGray", "dyeGray", "dyePink", "dyeLime", "dyeYellow",
|
||||
|
||||
@@ -1,16 +1,15 @@
|
||||
package com.cricketcraft.chisel.block;
|
||||
|
||||
import java.util.Random;
|
||||
|
||||
import com.cricketcraft.chisel.client.GeneralChiselClient;
|
||||
import net.minecraft.client.renderer.texture.IIconRegister;
|
||||
import net.minecraft.util.IIcon;
|
||||
import net.minecraft.world.World;
|
||||
|
||||
import com.cricketcraft.chisel.client.GeneralChiselClient;
|
||||
import java.util.Random;
|
||||
|
||||
public class BlockSnakestoneObsidian extends BlockSnakestone {
|
||||
|
||||
public IIcon[] particles = new IIcon[8];
|
||||
public static IIcon[] particles = new IIcon[8];
|
||||
|
||||
public BlockSnakestoneObsidian(String iconPrefix) {
|
||||
super(iconPrefix);
|
||||
|
||||
@@ -1,17 +1,5 @@
|
||||
package com.cricketcraft.chisel.client;
|
||||
|
||||
import java.util.Random;
|
||||
|
||||
import net.minecraft.block.Block;
|
||||
import net.minecraft.client.Minecraft;
|
||||
import net.minecraft.client.entity.EntityPlayerSP;
|
||||
import net.minecraft.client.particle.EffectRenderer;
|
||||
import net.minecraft.client.particle.EntityDiggingFX;
|
||||
import net.minecraft.client.particle.EntityLavaFX;
|
||||
import net.minecraft.entity.Entity;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.world.World;
|
||||
|
||||
import com.cricketcraft.chisel.block.BlockGrimstone;
|
||||
import com.cricketcraft.chisel.block.BlockHolystone;
|
||||
import com.cricketcraft.chisel.block.BlockLavastone;
|
||||
@@ -24,6 +12,17 @@ import com.cricketcraft.chisel.entity.fx.EntityGrimstoneFX;
|
||||
import com.cricketcraft.chisel.entity.fx.EntityHolystoneFX;
|
||||
import com.cricketcraft.chisel.entity.fx.EntitySnakestoneObsidianFX;
|
||||
import com.cricketcraft.chisel.utils.GeneralClient;
|
||||
import net.minecraft.block.Block;
|
||||
import net.minecraft.client.Minecraft;
|
||||
import net.minecraft.client.entity.EntityPlayerSP;
|
||||
import net.minecraft.client.particle.EffectRenderer;
|
||||
import net.minecraft.client.particle.EntityDiggingFX;
|
||||
import net.minecraft.client.particle.EntityLavaFX;
|
||||
import net.minecraft.entity.Entity;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.world.World;
|
||||
|
||||
import java.util.Random;
|
||||
|
||||
public class GeneralChiselClient {
|
||||
|
||||
@@ -259,7 +258,8 @@ public class GeneralChiselClient {
|
||||
public static void spawnAutoChiselFX(TileEntityAutoChisel te, ItemStack base) {
|
||||
if (base != null) {
|
||||
for (int i = 0; i < 10; i++) {
|
||||
EntityDiggingFX particle = new EntityDiggingFX(te.getWorldObj(), te.xCoord + 0.5, te.yCoord + 0.95, te.zCoord + 0.5, 0, 0, 0, Block.getBlockFromItem(base.getItem()), base.getItemDamage());
|
||||
EntityDiggingFX particle = new EntityDiggingFX(te.getWorldObj(), te.xCoord + 0.5, te.yCoord + 0.95, te.zCoord + 0.5, 0, 0, 0, Block.getBlockFromItem(base.getItem()),
|
||||
base.getItemDamage());
|
||||
particle.setVelocity((te.getWorldObj().rand.nextDouble() / 4) - 0.125, te.getWorldObj().rand.nextDouble() / 8, (te.getWorldObj().rand.nextDouble() / 4) - 0.125);
|
||||
Minecraft.getMinecraft().effectRenderer.addEffect(particle);
|
||||
}
|
||||
|
||||
@@ -0,0 +1,84 @@
|
||||
package com.cricketcraft.chisel.client.player;
|
||||
|
||||
import com.cricketcraft.chisel.init.ChiselItems;
|
||||
import cpw.mods.fml.common.eventhandler.EventPriority;
|
||||
import cpw.mods.fml.common.eventhandler.SubscribeEvent;
|
||||
import cpw.mods.fml.relauncher.Side;
|
||||
import cpw.mods.fml.relauncher.SideOnly;
|
||||
import net.minecraft.client.Minecraft;
|
||||
import net.minecraft.client.renderer.ItemRenderer;
|
||||
import net.minecraft.client.renderer.OpenGlHelper;
|
||||
import net.minecraft.client.renderer.Tessellator;
|
||||
import net.minecraft.client.renderer.texture.TextureMap;
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.util.EnumChatFormatting;
|
||||
import net.minecraft.util.IIcon;
|
||||
import net.minecraftforge.client.event.RenderLivingEvent;
|
||||
import net.minecraftforge.client.event.RenderPlayerEvent;
|
||||
import org.lwjgl.opengl.GL11;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
@SideOnly(Side.CLIENT)
|
||||
public class PlayerSpecials {
|
||||
|
||||
private List<String> names = new ArrayList<String>();
|
||||
private boolean resetRender;
|
||||
|
||||
public PlayerSpecials() {
|
||||
names.add("Cricket");
|
||||
names.add("Drullkus");
|
||||
}
|
||||
|
||||
@SubscribeEvent(priority = EventPriority.HIGHEST)
|
||||
public void renderItem(RenderPlayerEvent.Specials.Post event) {
|
||||
EntityPlayer player = event.entityPlayer;
|
||||
|
||||
for (int x = 0; x < names.size(); x++) {
|
||||
if (player.getCommandSenderName().equals(names.get(x))) {
|
||||
GL11.glPushMatrix();
|
||||
Minecraft.getMinecraft().renderEngine.bindTexture(TextureMap.locationItemsTexture);
|
||||
if (player.isSneaking()) {
|
||||
GL11.glRotatef(28.64789F, 1.0F, 0.0F, 0.0F);
|
||||
}
|
||||
boolean armor = player.getCurrentArmor(1) != null;
|
||||
GL11.glRotatef(180.0F, 1.0F, 0.0F, 0.0F);
|
||||
GL11.glRotatef(90.0F, 0.0F, 1.0F, 0.0F);
|
||||
GL11.glTranslatef(-0.25F, -0.85F, armor ? 0.2F : 0.28F);
|
||||
GL11.glScalef(0.5F, 0.5F, 0.5F);
|
||||
GL11.glColor3f(1.0F, 1.0F, 1.0F);
|
||||
int light = 15728880;
|
||||
int lightmapX = light % 65536;
|
||||
int lightmapY = light / 65536;
|
||||
OpenGlHelper.setLightmapTextureCoords(OpenGlHelper.lightmapTexUnit, lightmapX, lightmapY);
|
||||
|
||||
IIcon icon = ChiselItems.obsidianChisel.getIcon(new ItemStack(ChiselItems.obsidianChisel, 1, 0), 1);
|
||||
ItemRenderer.renderItemIn2D(Tessellator.instance, icon.getMaxU(), icon.getMinV(), icon.getMinU(), icon.getMaxV(), icon.getIconWidth(), icon.getIconHeight(), 1.0F / 16.0F);
|
||||
GL11.glPopMatrix();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@SubscribeEvent(priority = EventPriority.HIGHEST)
|
||||
public void renderDev(RenderLivingEvent.Pre event) {
|
||||
for (int x = 0; x < names.size(); x++) {
|
||||
if (EnumChatFormatting.getTextWithoutFormattingCodes(event.entity.getCommandSenderName()).equals(names.get(x))) {
|
||||
GL11.glColor4f(1.0F, 1.0F, 1.0F, 0.75F);
|
||||
GL11.glEnable(3042);
|
||||
GL11.glBlendFunc(770, 771);
|
||||
resetRender = true;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@SubscribeEvent
|
||||
public void entityColorRender(RenderLivingEvent.Post event) {
|
||||
if (this.resetRender) {
|
||||
GL11.glColor4f(1.0F, 1.0F, 1.0F, 1.0F);
|
||||
GL11.glDisable(3042);
|
||||
resetRender = false;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -39,10 +39,12 @@ public class Configurations {
|
||||
public static boolean allowChiselDamage;
|
||||
public static int ironChiselMaxDamage;
|
||||
public static int diamondChiselMaxDamage;
|
||||
public static int obsidianChiselMaxDamage;
|
||||
public static boolean ironChiselCanLeftClick;
|
||||
public static boolean ironChiselHasModes;
|
||||
public static int ironChiselAttackDamage;
|
||||
public static int diamondChiselAttackDamage;
|
||||
public static int obsidianChiselAttackDamage;
|
||||
public static boolean allowChiselCrossColors;
|
||||
|
||||
public static boolean useRoadLineTool;
|
||||
@@ -91,12 +93,16 @@ public class Configurations {
|
||||
allowChiselDamage = config.get(category, "allowChiselDamage", true, "Should the chisel be damageable and take damage when it chisels something.").getBoolean();
|
||||
ironChiselMaxDamage = config.get(category, "ironChiselMaxDamage", 500, "The max damage of the standard iron chisel. Default: 500.").getInt();
|
||||
diamondChiselMaxDamage = config.get(category, "diamondChiselMaxDamage", 5000, "The max damage of the diamond chisel. Default: 5000").getInt();
|
||||
obsidianChiselMaxDamage = config.get(category, "obsidianChiselMaxDamage", 50000, "The max damage of the obsidian chisel. Default: 50000").getInt();
|
||||
ironChiselCanLeftClick = config.get(category, "ironChiselCanLeftClick", true, "If this is true, the iron chisel can left click chisel blocks. If false, it cannot.").getBoolean();
|
||||
ironChiselHasModes = config.get(category, "ironChiselHasModes", false, "If this is true, the iron chisel can change its chisel mode just as the diamond chisel can.").getBoolean();
|
||||
ironChiselAttackDamage = config.get(category, "ironChiselAttackDamage", 2, "The extra attack damage points (in half hearts) that the iron chisel inflicts when it is used to attack an entity.").getInt();
|
||||
diamondChiselAttackDamage = config.get(category, "diamondChiselAttackDamage", 2,
|
||||
"The extra attack damage points (in half hearts) that the diamond chisel inflicts when it is used to attack an entity.").getInt();
|
||||
allowChiselCrossColors = config.get(category, "allowChiselCrossColors", true, "Should someone be able to chisel something into a different color.").getBoolean();
|
||||
ironChiselAttackDamage = config.get(category, "ironChiselAttackDamage", 2, "The extra attack damage points (in half hearts) that the iron chisel inflicts when it is used to attack an entity.")
|
||||
.getInt();
|
||||
diamondChiselAttackDamage = config
|
||||
.get(category, "diamondChiselAttackDamage", 2, "The extra attack damage points (in half hearts) that the diamond chisel inflicts when it is used to attack an entity.").getInt();
|
||||
obsidianChiselAttackDamage = config
|
||||
.get(category, "obsidianChiselAttackDamage", 4, "The extra attack damage points (in half hearts) that the obsidian chisel inflicts when it is used to attack an entity.").getInt();
|
||||
|
||||
/* block */
|
||||
category = "block";
|
||||
@@ -131,7 +137,9 @@ public class Configurations {
|
||||
return config.get("features", featureName(feature), true).getBoolean(true) && refreshConfig();
|
||||
}
|
||||
|
||||
/** Makes the old camelCase names from the new CONSTANT_CASE names */
|
||||
/**
|
||||
* Makes the old camelCase names from the new CONSTANT_CASE names
|
||||
*/
|
||||
public static String featureName(Features feature) {
|
||||
String[] words = feature.name().toLowerCase(Locale.ENGLISH).split("_");
|
||||
if (words.length == 1) {
|
||||
|
||||
@@ -6,7 +6,6 @@ import com.cricketcraft.chisel.item.ItemCloudInABottle;
|
||||
import com.cricketcraft.chisel.item.ItemSmashingRock;
|
||||
import com.cricketcraft.chisel.item.ItemUpgrade;
|
||||
import com.cricketcraft.chisel.item.chisel.ItemChisel;
|
||||
|
||||
import cpw.mods.fml.common.registry.GameRegistry.ObjectHolder;
|
||||
|
||||
@ObjectHolder(Chisel.MOD_ID)
|
||||
@@ -14,6 +13,7 @@ public final class ChiselItems {
|
||||
|
||||
public static final ItemChisel chisel = null;
|
||||
public static final ItemChisel diamondChisel = null;
|
||||
public static final ItemChisel obsidianChisel = null;
|
||||
public static final ItemCloudInABottle cloudinabottle = null;
|
||||
public static final ItemBallOMoss ballomoss = null;
|
||||
public static final ItemSmashingRock smashingrock = null;
|
||||
|
||||
@@ -1,7 +1,13 @@
|
||||
package com.cricketcraft.chisel.item.chisel;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import com.cricketcraft.chisel.Chisel;
|
||||
import com.cricketcraft.chisel.api.IChiselItem;
|
||||
import com.cricketcraft.chisel.api.carving.ICarvingRegistry;
|
||||
import com.cricketcraft.chisel.api.carving.ICarvingVariation;
|
||||
import com.cricketcraft.chisel.carving.Carving;
|
||||
import com.cricketcraft.chisel.config.Configurations;
|
||||
import com.google.common.collect.HashMultimap;
|
||||
import com.google.common.collect.Multimap;
|
||||
import net.minecraft.block.Block;
|
||||
import net.minecraft.client.resources.I18n;
|
||||
import net.minecraft.entity.EntityLivingBase;
|
||||
@@ -13,20 +19,14 @@ import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.world.World;
|
||||
import net.minecraftforge.common.MinecraftForge;
|
||||
|
||||
import com.cricketcraft.chisel.Chisel;
|
||||
import com.cricketcraft.chisel.api.IChiselItem;
|
||||
import com.cricketcraft.chisel.api.carving.ICarvingRegistry;
|
||||
import com.cricketcraft.chisel.api.carving.ICarvingVariation;
|
||||
import com.cricketcraft.chisel.carving.Carving;
|
||||
import com.cricketcraft.chisel.config.Configurations;
|
||||
import com.google.common.collect.HashMultimap;
|
||||
import com.google.common.collect.Multimap;
|
||||
import java.util.List;
|
||||
|
||||
public class ItemChisel extends Item implements IChiselItem {
|
||||
|
||||
public enum ChiselType {
|
||||
IRON(Configurations.ironChiselMaxDamage, Configurations.ironChiselAttackDamage),
|
||||
DIAMOND(Configurations.diamondChiselMaxDamage, Configurations.diamondChiselAttackDamage);
|
||||
DIAMOND(Configurations.diamondChiselMaxDamage, Configurations.diamondChiselAttackDamage),
|
||||
OBSIDIAN(Configurations.obsidianChiselMaxDamage, Configurations.obsidianChiselAttackDamage);
|
||||
|
||||
final int maxDamage;
|
||||
final int attackDamage;
|
||||
@@ -71,11 +71,11 @@ public class ItemChisel extends Item implements IChiselItem {
|
||||
String lc2 = I18n.format(base + "lc2");
|
||||
String modes = I18n.format(base + "modes");
|
||||
list.add(gui);
|
||||
if (type == ChiselType.DIAMOND || Configurations.ironChiselCanLeftClick) {
|
||||
if (type == ChiselType.DIAMOND || type == ChiselType.OBSIDIAN || Configurations.ironChiselCanLeftClick) {
|
||||
list.add(lc1);
|
||||
list.add(lc2);
|
||||
}
|
||||
if (type == ChiselType.DIAMOND || Configurations.ironChiselHasModes) {
|
||||
if (type == ChiselType.DIAMOND || type == ChiselType.OBSIDIAN || Configurations.ironChiselHasModes) {
|
||||
list.add("");
|
||||
list.add(modes);
|
||||
}
|
||||
@@ -99,7 +99,7 @@ public class ItemChisel extends Item implements IChiselItem {
|
||||
stack.damageItem(1, attacker);
|
||||
return super.hitEntity(stack, attacker, target);
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public boolean canOpenGui(World world, EntityPlayer player, ItemStack chisel) {
|
||||
return true;
|
||||
@@ -117,11 +117,11 @@ public class ItemChisel extends Item implements IChiselItem {
|
||||
|
||||
@Override
|
||||
public boolean canChiselBlock(World world, EntityPlayer player, int x, int y, int z, Block block, int metadata) {
|
||||
return type == ChiselType.DIAMOND || Configurations.ironChiselCanLeftClick;
|
||||
return type == ChiselType.DIAMOND || type == ChiselType.OBSIDIAN || Configurations.ironChiselCanLeftClick;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean hasModes(ItemStack chisel) {
|
||||
return type == ChiselType.DIAMOND || Configurations.ironChiselHasModes;
|
||||
return type == ChiselType.DIAMOND || type == ChiselType.OBSIDIAN || Configurations.ironChiselHasModes;
|
||||
}
|
||||
}
|
||||
@@ -1,27 +1,9 @@
|
||||
package com.cricketcraft.chisel.proxy;
|
||||
|
||||
import net.minecraft.client.Minecraft;
|
||||
import net.minecraft.client.renderer.entity.RenderSnowball;
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.item.Item;
|
||||
import net.minecraft.world.World;
|
||||
import net.minecraftforge.client.MinecraftForgeClient;
|
||||
|
||||
import com.cricketcraft.chisel.block.tileentity.TileEntityAutoChisel;
|
||||
import com.cricketcraft.chisel.block.tileentity.TileEntityPresent;
|
||||
import com.cricketcraft.chisel.client.render.BlockAdvancedMarbleRenderer;
|
||||
import com.cricketcraft.chisel.client.render.BlockCTMNoLightRenderer;
|
||||
import com.cricketcraft.chisel.client.render.BlockCarpetRenderer;
|
||||
import com.cricketcraft.chisel.client.render.BlockEldritchRenderer;
|
||||
import com.cricketcraft.chisel.client.render.BlockGlowRenderer;
|
||||
import com.cricketcraft.chisel.client.render.BlockLayeredRenderer;
|
||||
import com.cricketcraft.chisel.client.render.BlockMarblePaneRenderer;
|
||||
import com.cricketcraft.chisel.client.render.BlockMarblePillarRenderer;
|
||||
import com.cricketcraft.chisel.client.render.BlockMarbleStairsRenderer;
|
||||
import com.cricketcraft.chisel.client.render.BlockRoadLineRenderer;
|
||||
import com.cricketcraft.chisel.client.render.BlockSnakeStoneRenderer;
|
||||
import com.cricketcraft.chisel.client.render.BlockTexturedOreRenderer;
|
||||
import com.cricketcraft.chisel.client.render.RenderStandardBlockNoSunlight;
|
||||
import com.cricketcraft.chisel.client.player.PlayerSpecials;
|
||||
import com.cricketcraft.chisel.client.render.*;
|
||||
import com.cricketcraft.chisel.client.render.item.ItemChiselRenderer;
|
||||
import com.cricketcraft.chisel.client.render.tile.RenderAutoChisel;
|
||||
import com.cricketcraft.chisel.client.render.tile.RenderPresent;
|
||||
@@ -30,9 +12,15 @@ import com.cricketcraft.chisel.entity.EntityCloudInABottle;
|
||||
import com.cricketcraft.chisel.entity.EntitySmashingRock;
|
||||
import com.cricketcraft.chisel.init.ChiselBlocks;
|
||||
import com.cricketcraft.chisel.init.ChiselItems;
|
||||
|
||||
import cpw.mods.fml.client.registry.ClientRegistry;
|
||||
import cpw.mods.fml.client.registry.RenderingRegistry;
|
||||
import net.minecraft.client.Minecraft;
|
||||
import net.minecraft.client.renderer.entity.RenderSnowball;
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.item.Item;
|
||||
import net.minecraft.world.World;
|
||||
import net.minecraftforge.client.MinecraftForgeClient;
|
||||
import net.minecraftforge.common.MinecraftForge;
|
||||
|
||||
public class ClientProxy extends CommonProxy {
|
||||
|
||||
@@ -74,6 +62,8 @@ public class ClientProxy extends CommonProxy {
|
||||
|
||||
MinecraftForgeClient.registerItemRenderer(ChiselItems.chisel, renderer);
|
||||
MinecraftForgeClient.registerItemRenderer(ChiselItems.diamondChisel, renderer);
|
||||
|
||||
MinecraftForge.EVENT_BUS.register(new PlayerSpecials());
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
@@ -9,6 +9,7 @@ item.chisel.chisel.desc.lc2=Can target a block by leaving it in the inventory
|
||||
item.chisel.chisel.desc.modes=Has multiple modes for chiseling.
|
||||
|
||||
item.chisel.chisel_diamond.name=Diamond Chisel
|
||||
item.chisel.chisel_obsidian.name=Obsidian Chisel
|
||||
|
||||
item.ballMoss.name=Ball O' Moss
|
||||
item.ballMoss.desc=Right-Click to throw. This will turn Cobblestone to Moss Stone on impact.
|
||||
|
||||
Binary file not shown.
|
Before Width: | Height: | Size: 290 B After Width: | Height: | Size: 641 B |
Reference in new issue
Block a user