mirror of
https://github.com/GTNewHorizons/Chisel.git
synced 2026-10-26 14:24:34 +00:00
Merge branch '1.7/dev' into 1.7/release
Conflicts: gradle.properties
This commit is contained in:
commit
f694b007ea
265 files changed
+2263
-2422
No files matched your search
+3
-3
@@ -32,8 +32,8 @@ ext.buildnumber = 0
|
||||
project.buildnumber = System.getenv('BUILD_NUMBER') != null ? System.getenv('BUILD_NUMBER') : project.ext.gitHash
|
||||
|
||||
version = "${mod_version}.${buildnumber}"
|
||||
group = "com.cricketcraft.chisel" // http://maven.apache.org/guides/mini/guide-naming-conventions.html
|
||||
archivesBaseName = dev ? "Chisel2_DEV" : "Chisel2"
|
||||
group = "team.chisel" // http://maven.apache.org/guides/mini/guide-naming-conventions.html
|
||||
archivesBaseName = dev ? "Chisel_DEV" : "Chisel"
|
||||
|
||||
minecraft {
|
||||
version = "${minecraft_version}-${forge_version}"
|
||||
@@ -185,7 +185,7 @@ curse {
|
||||
projectId = project.projectId
|
||||
changelog = System.getenv("CHANGELOG").equals("none") ? getChangelogText() : System.getenv("CHANGELOG")
|
||||
releaseType = 'release'
|
||||
displayName = "Chisel 2 - ${mod_version}"
|
||||
displayName = "Chisel - ${mod_version}"
|
||||
additionalArtifact deobfJar, sourcesJar, apiJar
|
||||
}
|
||||
|
||||
|
||||
@@ -1,3 +1,29 @@
|
||||
CT2.5.0:
|
||||
New
|
||||
- Lots of new endstone variants
|
||||
- Purpur blocks
|
||||
- New technical blocks (piping, battery, and more)
|
||||
|
||||
Changes
|
||||
- Under new management! Name of the project has been changed to "Chisel"
|
||||
- Now includes CTMLib 1.2.0-10
|
||||
- Greatly improve the look of energized voidstone
|
||||
- Retexture 2 of the voidstone variants (bevel and metalborder)
|
||||
- Removed special player rendering
|
||||
- Fixed EMC registrations so that they are actually dynamic
|
||||
- Lavastone and Waterstone now use the still texture, not flowing
|
||||
|
||||
Fixes
|
||||
- Fix "The Turkey Bug"
|
||||
- Fix crash when an unchiselable item made its way into the autochisel
|
||||
- Fix VariationInfos always returning CUSTOM for their texture type
|
||||
- Fix antiblocks not working when smooth lighting is off
|
||||
- Fix Botania compat
|
||||
- Fix pick block on bookshelves
|
||||
|
||||
API
|
||||
- Add IConnectable for allowing other blocks to determine if chisel blocks will connect to them
|
||||
|
||||
2.4.1:
|
||||
New
|
||||
- New UberWavy futura block
|
||||
|
||||
+2
-2
@@ -26,12 +26,12 @@
|
||||
<setting id="org.eclipse.jdt.core.formatter.insert_space_after_semicolon_in_for" value="insert"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.disabling_tag" value="@formatter:off"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.continuation_indentation" value="2"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.alignment_for_enum_constants" value="0"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.alignment_for_enum_constants" value="49"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.blank_lines_before_imports" value="1"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.blank_lines_after_package" value="1"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.insert_space_after_binary_operator" value="insert"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.insert_space_after_comma_in_multiple_local_declarations" value="insert"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.alignment_for_arguments_in_enum_constant" value="16"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.alignment_for_arguments_in_enum_constant" value="1"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.insert_space_after_opening_angle_bracket_in_parameterized_type_reference" value="do not insert"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.comment.indent_root_tags" value="true"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.wrap_before_or_operator_multicatch" value="true"/>
|
||||
|
||||
+6
-6
@@ -1,12 +1,12 @@
|
||||
mod_version=2.4.1
|
||||
mod_version=CT2.5.0
|
||||
minecraft_version=1.7.10
|
||||
forge_version=10.13.4.1481-1.7.10
|
||||
|
||||
ctmlib_version=1.0.1.5
|
||||
ccl_version=1.1.3.136
|
||||
ccc_version=1.0.6.43
|
||||
nei_version=1.0.4.107
|
||||
ctmlib_version=1.2.0-10
|
||||
ccl_version=1.1.3.140
|
||||
ccc_version=1.0.7.46
|
||||
nei_version=1.0.5.111
|
||||
waila_version=1.5.10
|
||||
fmp_version=1.2.0.344
|
||||
|
||||
projectId=225236
|
||||
projectId=235279
|
||||
+1
-1
@@ -1 +1 @@
|
||||
rootProject.name = 'Chisel2'
|
||||
rootProject.name = 'Chisel'
|
||||
@@ -3,5 +3,5 @@ package com.cricketcraft.chisel.api;
|
||||
public class ChiselAPIProps {
|
||||
|
||||
public static final String VERSION = "0.1.0";
|
||||
public static String MOD_ID = null; // Set by Chisel
|
||||
public static String MOD_ID = null; // Set by Chisel
|
||||
}
|
||||
@@ -1,18 +1,16 @@
|
||||
package com.cricketcraft.chisel.api;
|
||||
|
||||
import com.cricketcraft.chisel.api.carving.IChiselMode;
|
||||
|
||||
import net.minecraft.item.ItemStack;
|
||||
|
||||
import com.cricketcraft.chisel.api.carving.IChiselMode;
|
||||
|
||||
/**
|
||||
* Implement this on chisel items which require more control over chisel modes
|
||||
* (including adding new modes).
|
||||
* Implement this on chisel items which require more control over chisel modes (including adding new modes).
|
||||
*/
|
||||
public interface IAdvancedChisel {
|
||||
|
||||
/**
|
||||
* Gets the next mode the button in the GUI should switch to given the
|
||||
* current mode.
|
||||
* Gets the next mode the button in the GUI should switch to given the current mode.
|
||||
*
|
||||
* @param stack
|
||||
* The {@link ItemStack} representing the chisel
|
||||
|
||||
@@ -1,16 +1,16 @@
|
||||
package com.cricketcraft.chisel.api;
|
||||
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.world.IBlockAccess;
|
||||
|
||||
import com.cricketcraft.chisel.api.carving.CarvableHelper;
|
||||
import com.cricketcraft.chisel.api.carving.IVariationInfo;
|
||||
import com.cricketcraft.ctmlib.ICTMBlock;
|
||||
import com.cricketcraft.ctmlib.ISubmapManager;
|
||||
|
||||
/**
|
||||
* To be implemented on blocks that can be chiseled and need advanced metadata to variation mapping. Currently not very usable without internal classes.
|
||||
*/
|
||||
public interface ICarvable {
|
||||
public interface ICarvable extends ICTMBlock<IVariationInfo> {
|
||||
|
||||
/**
|
||||
* Gets a {@link ISubmapManager} from this block, based on metadata.
|
||||
@@ -31,15 +31,14 @@ public interface ICarvable {
|
||||
* The metadata of the block
|
||||
* @return The {@link ISubmapManager} that represents this block in the world.
|
||||
*/
|
||||
public IVariationInfo getVariation(IBlockAccess world, int x, int y, int z, int metadata);
|
||||
@Override
|
||||
public IVariationInfo getManager(IBlockAccess world, int x, int y, int z, int metadata);
|
||||
|
||||
/**
|
||||
* Gets the {@link ISubmapManager} for this block when it is in item form.
|
||||
*
|
||||
* @param stack
|
||||
* The {@link ItemStack} representing this block;
|
||||
* @return A {@link ISubmapManager}
|
||||
*/
|
||||
public IVariationInfo getVariation(ItemStack stack);
|
||||
@Override
|
||||
public IVariationInfo getManager(int meta);
|
||||
}
|
||||
|
||||
@@ -0,0 +1,26 @@
|
||||
package com.cricketcraft.chisel.api;
|
||||
|
||||
import net.minecraft.world.IBlockAccess;
|
||||
|
||||
/**
|
||||
* This extension of {@link IFacade} allows the block to say whether or not OTHER CTM blocks can connect to IT.
|
||||
*/
|
||||
public interface IConnectable {
|
||||
|
||||
/**
|
||||
* Determines whether other CTM blocks can connect to this one.
|
||||
*
|
||||
* @param world
|
||||
* @param x
|
||||
* The X position of the block that is connecting to this one. NOT the position of your block.
|
||||
* @param y
|
||||
* The Y position of the block that is connecting to this one. NOT the position of your block.
|
||||
* @param z
|
||||
* The Z position of the block that is connecting to this one. NOT the position of your block.
|
||||
* @param side
|
||||
* The side being drawn.
|
||||
* @return True if a block can connect to this one from the given direction. False otherwise.
|
||||
*/
|
||||
boolean canConnectCTM(IBlockAccess world, int x, int y, int z, int side);
|
||||
|
||||
}
|
||||
@@ -5,36 +5,45 @@ import net.minecraft.world.IBlockAccess;
|
||||
import net.minecraft.world.World;
|
||||
|
||||
/**
|
||||
* To be implemented on blocks that "hide" another block inside, so connected textuers can still be
|
||||
* accomplished.
|
||||
* To be implemented on blocks that "hide" another block inside, so connected textuers can still be accomplished.
|
||||
*/
|
||||
public interface IFacade
|
||||
{
|
||||
/**
|
||||
* Gets the block this facade is acting as.
|
||||
*
|
||||
* @param world {@link World}
|
||||
* @param x X coord of your block
|
||||
* @param y Y coord of your block
|
||||
* @param z Z coord of your block
|
||||
* @param side The side being rendered, NOT the side being connected from.
|
||||
* <p>
|
||||
* This value can be -1 if no side is specified. Please handle this appropriately.
|
||||
* @return The block inside of your facade block.
|
||||
*/
|
||||
Block getFacade(IBlockAccess world, int x, int y, int z, int side);
|
||||
public interface IFacade {
|
||||
|
||||
/**
|
||||
* Gets the metadata of the block that this facade is acting as.
|
||||
*
|
||||
* @param world {@link World}
|
||||
* @param x X coord of your block
|
||||
* @param y Y coord of your block
|
||||
* @param z Z coord of your block
|
||||
* @param side The side being rendered, NOT the side being connected from.
|
||||
* <p>
|
||||
* This value can be -1 if no side is specified. Please handle this appropriately.
|
||||
* @return The metadata of your facade block.
|
||||
*/
|
||||
int getFacadeMetadata(IBlockAccess world, int x, int y, int z, int side);
|
||||
/**
|
||||
* Gets the block this facade is acting as.
|
||||
*
|
||||
* @param world
|
||||
* {@link World}
|
||||
* @param x
|
||||
* X coord of your block
|
||||
* @param y
|
||||
* Y coord of your block
|
||||
* @param z
|
||||
* Z coord of your block
|
||||
* @param side
|
||||
* The side being rendered, NOT the side being connected from.
|
||||
* <p>
|
||||
* This value can be -1 if no side is specified. Please handle this appropriately.
|
||||
* @return The block inside of your facade block.
|
||||
*/
|
||||
Block getFacade(IBlockAccess world, int x, int y, int z, int side);
|
||||
|
||||
/**
|
||||
* Gets the metadata of the block that this facade is acting as.
|
||||
*
|
||||
* @param world
|
||||
* {@link World}
|
||||
* @param x
|
||||
* X coord of your block
|
||||
* @param y
|
||||
* Y coord of your block
|
||||
* @param z
|
||||
* Z coord of your block
|
||||
* @param side
|
||||
* The side being rendered, NOT the side being connected from.
|
||||
* <p>
|
||||
* This value can be -1 if no side is specified. Please handle this appropriately.
|
||||
* @return The metadata of your facade block.
|
||||
*/
|
||||
int getFacadeMetadata(IBlockAccess world, int x, int y, int z, int side);
|
||||
}
|
||||
@@ -6,10 +6,10 @@ import net.minecraft.util.ChatComponentTranslation;
|
||||
|
||||
public class Statistics {
|
||||
|
||||
public static StatBase blocksChiseled = (new StatBasic("stat.blockChiseled", new ChatComponentTranslation("stat.blockChiseled", new Object[0])));
|
||||
public static StatBase blocksChiseled = (new StatBasic("stat.blockChiseled", new ChatComponentTranslation("stat.blockChiseled", new Object[0])));
|
||||
|
||||
public static void init(){
|
||||
blocksChiseled.initIndependentStat();
|
||||
blocksChiseled.registerStat();
|
||||
}
|
||||
public static void init() {
|
||||
blocksChiseled.initIndependentStat();
|
||||
blocksChiseled.registerStat();
|
||||
}
|
||||
}
|
||||
@@ -26,42 +26,42 @@ import cpw.mods.fml.relauncher.Side;
|
||||
import cpw.mods.fml.relauncher.SideOnly;
|
||||
|
||||
public class CarvableHelper {
|
||||
|
||||
|
||||
public static Class<? extends ItemBlock> itemCarvableClass = null;
|
||||
|
||||
private Block theBlock;
|
||||
|
||||
|
||||
public ArrayList<IVariationInfo> infoList = new ArrayList<IVariationInfo>();
|
||||
IVariationInfo[] infoMap = new IVariationInfo[16];
|
||||
public boolean forbidChiseling = false;
|
||||
|
||||
|
||||
public CarvableHelper(Block block) {
|
||||
this.theBlock = block;
|
||||
}
|
||||
|
||||
public void addVariation(String description, int metadata, ISubmapManager manager) {
|
||||
addVariation(description, metadata, null, manager);
|
||||
}
|
||||
|
||||
public void addVariation(String description, int metadata, Block bb) {
|
||||
addVariation(description, metadata, null, bb, 0, ChiselAPIProps.MOD_ID);
|
||||
}
|
||||
public void addVariation(String description, int metadata, ISubmapManager manager) {
|
||||
addVariation(description, metadata, null, manager);
|
||||
}
|
||||
|
||||
public void addVariation(String description, int metadata, Block bb, int blockMeta) {
|
||||
addVariation(description, metadata, null, bb, blockMeta, ChiselAPIProps.MOD_ID);
|
||||
}
|
||||
public void addVariation(String description, int metadata, Block bb) {
|
||||
addVariation(description, metadata, null, bb, 0, ChiselAPIProps.MOD_ID);
|
||||
}
|
||||
|
||||
public void addVariation(String description, int metadata, Block bb, int blockMeta, Material material) {
|
||||
addVariation(description, metadata, null, bb, blockMeta, ChiselAPIProps.MOD_ID);
|
||||
}
|
||||
public void addVariation(String description, int metadata, Block bb, int blockMeta) {
|
||||
addVariation(description, metadata, null, bb, blockMeta, ChiselAPIProps.MOD_ID);
|
||||
}
|
||||
|
||||
public void addVariation(String description, int metadata, String texture) {
|
||||
addVariation(description, metadata, texture, (ISubmapManager) null);
|
||||
}
|
||||
|
||||
public void addVariation(String description, int metadata, String texture, ISubmapManager manager) {
|
||||
addVariation(description, metadata, texture, null, 0, ChiselAPIProps.MOD_ID, manager, metadata);
|
||||
}
|
||||
public void addVariation(String description, int metadata, Block bb, int blockMeta, Material material) {
|
||||
addVariation(description, metadata, null, bb, blockMeta, ChiselAPIProps.MOD_ID);
|
||||
}
|
||||
|
||||
public void addVariation(String description, int metadata, String texture) {
|
||||
addVariation(description, metadata, texture, (ISubmapManager) null);
|
||||
}
|
||||
|
||||
public void addVariation(String description, int metadata, String texture, ISubmapManager manager) {
|
||||
addVariation(description, metadata, texture, null, 0, ChiselAPIProps.MOD_ID, manager, metadata);
|
||||
}
|
||||
|
||||
public void addVariation(String description, int metadata, Block bb, String modid) {
|
||||
addVariation(description, metadata, null, bb, 0, modid);
|
||||
@@ -92,9 +92,8 @@ public class CarvableHelper {
|
||||
if (infoList.size() >= 16)
|
||||
return;
|
||||
|
||||
IVariationInfo info = FMLCommonHandler.instance().getSide().isClient()
|
||||
? getClientInfo(modid, texture, description, metadata, block, blockMeta, customManager, order)
|
||||
: getServerInfo(modid, texture, description, metadata, block, blockMeta, customManager, order);
|
||||
IVariationInfo info = FMLCommonHandler.instance().getSide().isClient() ? getClientInfo(modid, texture, description, metadata, block, blockMeta, customManager, order) : getServerInfo(modid,
|
||||
texture, description, metadata, block, blockMeta, customManager, order);
|
||||
|
||||
infoList.add(info);
|
||||
infoMap[metadata] = info;
|
||||
@@ -106,7 +105,7 @@ public class CarvableHelper {
|
||||
if (type == TextureType.CUSTOM && customManager == null && block == null) {
|
||||
throw new IllegalArgumentException(String.format("Could not find texture %s, and no custom texture manager was provided.", texture));
|
||||
}
|
||||
|
||||
|
||||
ISubmapManager manager;
|
||||
if (customManager != null) {
|
||||
manager = customManager;
|
||||
@@ -115,9 +114,9 @@ public class CarvableHelper {
|
||||
} else {
|
||||
manager = type.createManagerFor(var, texture);
|
||||
}
|
||||
return new VariationInfoBase(var, description, manager);
|
||||
return new VariationInfoBase(var, description, manager, type);
|
||||
}
|
||||
|
||||
|
||||
private IVariationInfo getServerInfo(String modid, String texture, String description, int metadata, Block block, int blockMeta, ISubmapManager customManager, int order) {
|
||||
ICarvingVariation var = CarvingUtils.getDefaultVariationFor(theBlock, metadata, order);
|
||||
return new VariationInfoBase(var, description, null);
|
||||
@@ -141,8 +140,8 @@ public class CarvableHelper {
|
||||
IVariationInfo info = infoMap[metadata];
|
||||
if (info == null)
|
||||
return getMissingIcon();
|
||||
|
||||
return info.getSubmapManager().getIcon(side, metadata);
|
||||
|
||||
return info.getIcon(side, metadata);
|
||||
}
|
||||
|
||||
public IIcon getIcon(IBlockAccess world, int x, int y, int z, int side) {
|
||||
@@ -155,7 +154,7 @@ public class CarvableHelper {
|
||||
if (info == null)
|
||||
return getMissingIcon();
|
||||
|
||||
return info.getSubmapManager().getIcon(world, x, y, z, side);
|
||||
return info.getIcon(world, x, y, z, side);
|
||||
}
|
||||
|
||||
public void registerAll(Block block, String name) {
|
||||
@@ -199,7 +198,7 @@ public class CarvableHelper {
|
||||
@SideOnly(Side.CLIENT)
|
||||
public void registerBlockIcons(String modName, Block block, IIconRegister register) {
|
||||
for (IVariationInfo info : infoList) {
|
||||
info.getSubmapManager().registerIcons(modName, block, register);
|
||||
info.registerIcons(modName, block, register);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -119,6 +119,7 @@ public class CarvingUtils {
|
||||
this.name = name;
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<ICarvingVariation> getVariations() {
|
||||
return Lists.newArrayList(variations);
|
||||
}
|
||||
|
||||
@@ -3,13 +3,11 @@ package com.cricketcraft.chisel.api.carving;
|
||||
import com.cricketcraft.chisel.api.rendering.TextureType;
|
||||
import com.cricketcraft.ctmlib.ISubmapManager;
|
||||
|
||||
public interface IVariationInfo {
|
||||
|
||||
ISubmapManager getSubmapManager();
|
||||
public interface IVariationInfo extends ISubmapManager {
|
||||
|
||||
ICarvingVariation getVariation();
|
||||
|
||||
String getDescription();
|
||||
|
||||
|
||||
TextureType getType();
|
||||
}
|
||||
@@ -1,6 +1,12 @@
|
||||
package com.cricketcraft.chisel.api.carving;
|
||||
|
||||
import net.minecraft.block.Block;
|
||||
import net.minecraft.client.renderer.RenderBlocks;
|
||||
import net.minecraft.client.renderer.texture.IIconRegister;
|
||||
import net.minecraft.util.IIcon;
|
||||
import net.minecraft.util.StatCollector;
|
||||
import net.minecraft.world.IBlockAccess;
|
||||
import net.minecraftforge.common.util.ForgeDirection;
|
||||
|
||||
import com.cricketcraft.chisel.api.rendering.TextureType;
|
||||
import com.cricketcraft.ctmlib.ISubmapManager;
|
||||
@@ -33,13 +39,40 @@ public class VariationInfoBase implements IVariationInfo {
|
||||
return StatCollector.translateToLocal(unlocDesc);
|
||||
}
|
||||
|
||||
@Override
|
||||
public ISubmapManager getSubmapManager() {
|
||||
return manager;
|
||||
}
|
||||
|
||||
@Override
|
||||
public TextureType getType() {
|
||||
return type;
|
||||
}
|
||||
|
||||
// ISubmapManager delegation
|
||||
|
||||
@Override
|
||||
public IIcon getIcon(int side, int meta) {
|
||||
return manager.getIcon(side, meta);
|
||||
}
|
||||
|
||||
@Override
|
||||
public IIcon getIcon(IBlockAccess world, int x, int y, int z, int side) {
|
||||
return manager.getIcon(world, x, y, z, side);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void registerIcons(String modName, Block block, IIconRegister register) {
|
||||
manager.registerIcons(modName, block, register);
|
||||
}
|
||||
|
||||
@Override
|
||||
public RenderBlocks createRenderContext(RenderBlocks rendererOld, Block block, IBlockAccess world) {
|
||||
return manager.createRenderContext(rendererOld, block, world);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void preRenderSide(RenderBlocks renderer, IBlockAccess world, int x, int y, int z, ForgeDirection side) {
|
||||
manager.preRenderSide(renderer, world, x, y, z, side);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void postRenderSide(RenderBlocks renderer, IBlockAccess world, int x, int y, int z, ForgeDirection side) {
|
||||
manager.postRenderSide(renderer, world, x, y, z, side);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,7 @@
|
||||
package com.cricketcraft.chisel.api.rendering;
|
||||
|
||||
public class ClientUtils {
|
||||
|
||||
public static int renderCTMId;
|
||||
|
||||
}
|
||||
@@ -29,7 +29,7 @@ import cpw.mods.fml.relauncher.SideOnly;
|
||||
/**
|
||||
* Handles all default {@link ISubmapManager} behavior
|
||||
*/
|
||||
@SuppressWarnings({ "unchecked", "deprecation" })
|
||||
@SuppressWarnings("unchecked")
|
||||
public enum TextureType {
|
||||
|
||||
// @formatter:off
|
||||
|
||||
@@ -1,74 +0,0 @@
|
||||
package com.cricketcraft.chisel.block;
|
||||
|
||||
import net.minecraft.block.BlockBeacon;
|
||||
import net.minecraft.entity.EntityLivingBase;
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.tileentity.TileEntity;
|
||||
import net.minecraft.world.IBlockAccess;
|
||||
import net.minecraft.world.World;
|
||||
|
||||
import com.cricketcraft.chisel.api.ICarvable;
|
||||
import com.cricketcraft.chisel.api.carving.CarvableHelper;
|
||||
import com.cricketcraft.chisel.api.carving.IVariationInfo;
|
||||
import com.cricketcraft.chisel.block.tileentity.TileEntityCarvableBeacon;
|
||||
import com.cricketcraft.chisel.init.ChiselTabs;
|
||||
|
||||
public class BlockCarvableBeacon extends BlockBeacon implements ICarvable {
|
||||
|
||||
public static int renderId;
|
||||
|
||||
public CarvableHelper carverHelper;
|
||||
|
||||
public BlockCarvableBeacon() {
|
||||
super();
|
||||
setCreativeTab(ChiselTabs.tabOtherChiselBlocks);
|
||||
setLightLevel(5.0F);
|
||||
setBlockTextureName("beacon");
|
||||
carverHelper = new CarvableHelper(this);
|
||||
}
|
||||
|
||||
@Override
|
||||
public TileEntity createNewTileEntity(World world, int meta) {
|
||||
return new TileEntityCarvableBeacon();
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean onBlockActivated(World world, int x, int y, int z, EntityPlayer player, int par5, float hitX, float hitY, float hitZ) {
|
||||
if (world.isRemote) {
|
||||
return true;
|
||||
} else {
|
||||
TileEntityCarvableBeacon tileentitybeacon = (TileEntityCarvableBeacon) world.getTileEntity(x, y, z);
|
||||
|
||||
if (tileentitybeacon != null) {
|
||||
player.func_146104_a(tileentitybeacon);
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public int getRenderType() {
|
||||
return renderId;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onBlockPlacedBy(World world, int x, int y, int z, EntityLivingBase player, ItemStack stack) {
|
||||
super.onBlockPlacedBy(world, x, y, z, player, stack);
|
||||
|
||||
if (stack.hasDisplayName()) {
|
||||
((TileEntityCarvableBeacon) world.getTileEntity(x, y, z)).func_145999_a(stack.getDisplayName());
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public IVariationInfo getVariation(IBlockAccess world, int x, int y, int z, int metadata) {
|
||||
return carverHelper.getVariation(metadata);
|
||||
}
|
||||
|
||||
@Override
|
||||
public IVariationInfo getVariation(ItemStack stack) {
|
||||
return carverHelper.getVariation(stack.getItemDamage());
|
||||
}
|
||||
}
|
||||
@@ -1,26 +0,0 @@
|
||||
package com.cricketcraft.chisel.block;
|
||||
|
||||
import net.minecraft.block.material.Material;
|
||||
import net.minecraft.world.World;
|
||||
import net.minecraftforge.common.util.ForgeDirection;
|
||||
|
||||
public class BlockCarvableColor extends BlockCarvable {
|
||||
|
||||
public BlockCarvableColor() {
|
||||
this(Material.rock);
|
||||
}
|
||||
|
||||
public BlockCarvableColor(Material m) {
|
||||
super(m);
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean recolourBlock(World world, int x, int y, int z, ForgeDirection side, int color) {
|
||||
int newColor = 15 - color;
|
||||
if (world.getBlockMetadata(x, y, z) != newColor) {
|
||||
world.setBlockMetadataWithNotify(x, y, z, newColor, 3);
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
}
|
||||
@@ -1,126 +0,0 @@
|
||||
package com.cricketcraft.chisel.block;
|
||||
|
||||
import net.minecraft.block.Block;
|
||||
import net.minecraft.block.BlockPumpkin;
|
||||
import net.minecraft.client.renderer.texture.IIconRegister;
|
||||
import net.minecraft.entity.monster.EntityIronGolem;
|
||||
import net.minecraft.init.Blocks;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.util.IIcon;
|
||||
import net.minecraft.world.IBlockAccess;
|
||||
import net.minecraft.world.World;
|
||||
|
||||
import com.cricketcraft.chisel.Chisel;
|
||||
import com.cricketcraft.chisel.api.ICarvable;
|
||||
import com.cricketcraft.chisel.api.carving.CarvableHelper;
|
||||
import com.cricketcraft.chisel.api.carving.IVariationInfo;
|
||||
import com.cricketcraft.chisel.entity.EntityChiselSnowman;
|
||||
|
||||
import cpw.mods.fml.relauncher.Side;
|
||||
import cpw.mods.fml.relauncher.SideOnly;
|
||||
|
||||
public class BlockCarvablePumpkin extends BlockPumpkin implements ICarvable {
|
||||
|
||||
public CarvableHelper carverHelper;
|
||||
|
||||
@SideOnly(Side.CLIENT)
|
||||
private IIcon top, face;
|
||||
|
||||
private String faceLocation;
|
||||
|
||||
public BlockCarvablePumpkin(boolean isOn) {
|
||||
super(isOn);
|
||||
this.setStepSound(Block.soundTypeWood);
|
||||
if (isOn)
|
||||
setLightLevel(10.0F);
|
||||
carverHelper = new CarvableHelper(this);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onBlockAdded(World world, int x, int y, int z){
|
||||
if(world.getBlock(x, y - 1, z) == Blocks.snow && world.getBlock(x, y - 2, z) == Blocks.snow){
|
||||
if(!world.isRemote){
|
||||
//Let's grab the pumpkin before we start
|
||||
ItemStack pumpkin = new ItemStack(world.getBlock(x, y, z), world.getBlockMetadata(x, y, z));
|
||||
|
||||
world.setBlock(x, y, z, Blocks.air, 0, 2);
|
||||
world.setBlock(x, y - 1, z, Blocks.air, 0, 2);
|
||||
world.setBlock(x, y - 2, z, Blocks.air, 0, 2);
|
||||
EntityChiselSnowman snowman = new EntityChiselSnowman(world);
|
||||
snowman.setCurrentItemOrArmor(2, pumpkin);
|
||||
snowman.setLocationAndAngles((double) x + 0.5D, (double) y - 1.95D, (double) z + 0.5D, 0.0F, 0.0F);
|
||||
world.spawnEntityInWorld(snowman);
|
||||
world.notifyBlockChange(x, y, z, Blocks.air);
|
||||
world.notifyBlockChange(x, y - 1, z, Blocks.air);
|
||||
world.notifyBlockChange(x, y - 2, z, Blocks.air);
|
||||
}
|
||||
|
||||
//Spawn some lovely particles
|
||||
for(int c = 0; c < 120; ++c){
|
||||
world.spawnParticle("snowshovel", (double)x + world.rand.nextDouble(), (double) (y - 2) + world.rand.nextDouble() * 2.5D, (double) z + world.rand.nextDouble(), 0.0D, 0.0D, 0.0D);
|
||||
}
|
||||
} else if(world.getBlock(x, y - 1, z) == Blocks.iron_block || world.getBlock(x, y - 2, z) == Blocks.iron_block){
|
||||
boolean flag = world.getBlock(x - 1, y - 1, z) == Blocks.iron_block && world.getBlock(x + 1, y - 1, z) == Blocks.iron_block;
|
||||
boolean flag1 = world.getBlock(x, y - 1, z - 1) == Blocks.iron_block && world.getBlock(x, y - 1, z + 1) == Blocks.iron_block;
|
||||
|
||||
if(flag || flag1){
|
||||
world.setBlock(x, y, z, Blocks.air, 0, 2);
|
||||
world.setBlock(x, y - 1, z, Blocks.air, 0, 2);
|
||||
world.setBlock(x, y - 2, z, Blocks.air, 0, 2);
|
||||
|
||||
if(flag){
|
||||
world.setBlock(x - 1, y - 1, z, Blocks.air, 0, 2);
|
||||
world.setBlock(x + 1, y - 1, z, Blocks.air, 0, 2);
|
||||
} else {
|
||||
world.setBlock(x, y - 1, z - 1, Blocks.air, 0, 2);
|
||||
world.setBlock(x, y - 1, z + 1, Blocks.air, 0, 2);
|
||||
}
|
||||
|
||||
EntityIronGolem ironGolem = new EntityIronGolem(world);
|
||||
ironGolem.setPlayerCreated(true);
|
||||
ironGolem.setLocationAndAngles((double) x + 0.5D, (double) y - 1.95D, (double) z + 0.5D, 0.0F, 0.0F);
|
||||
world.spawnEntityInWorld(ironGolem);
|
||||
|
||||
world.notifyBlockChange(x, y, z, Blocks.air);
|
||||
world.notifyBlockChange(x, y - 1, z, Blocks.air);
|
||||
world.notifyBlockChange(x, y - 2, z, Blocks.air);
|
||||
|
||||
if(flag){
|
||||
world.notifyBlockChange(x - 1, y - 1, z, Blocks.air);
|
||||
world.notifyBlockChange(x + 1, y - 1, z, Blocks.air);
|
||||
} else {
|
||||
world.notifyBlockChange(x, y - 1, z - 1, Blocks.air);
|
||||
world.notifyBlockChange(x, y - 1, z + 1, Blocks.air);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
@SideOnly(Side.CLIENT)
|
||||
public IIcon getIcon(int side, int meta) {
|
||||
return side == 1 ? top : (side == 0 ? top : (meta == 2 && side == 2 ? face : (meta == 3 && side == 5 ? face
|
||||
: (meta == 0 && side == 3 ? face : (meta == 1 && side == 4 ? face : this.blockIcon)))));
|
||||
}
|
||||
|
||||
@Override
|
||||
public void registerBlockIcons(IIconRegister icon) {
|
||||
top = icon.registerIcon(Chisel.MOD_ID + ":pumpkin/pumpkin_top");
|
||||
face = icon.registerIcon(Chisel.MOD_ID + ":" + faceLocation);
|
||||
this.blockIcon = icon.registerIcon(Chisel.MOD_ID + ":pumpkin/pumpkin_side");
|
||||
}
|
||||
|
||||
@Override
|
||||
public IVariationInfo getVariation(IBlockAccess world, int x, int y, int z, int metadata) {
|
||||
return carverHelper.getVariation(metadata);
|
||||
}
|
||||
|
||||
@Override
|
||||
public IVariationInfo getVariation(ItemStack stack) {
|
||||
return carverHelper.getVariation(stack.getItemDamage());
|
||||
}
|
||||
|
||||
public void setInformation(String textureLocation) {
|
||||
this.faceLocation = textureLocation;
|
||||
}
|
||||
}
|
||||
@@ -1,157 +0,0 @@
|
||||
package com.cricketcraft.chisel.client.player;
|
||||
|
||||
import java.util.Collection;
|
||||
import java.util.UUID;
|
||||
|
||||
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.Entity;
|
||||
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 net.minecraftforge.common.MinecraftForge;
|
||||
|
||||
import org.lwjgl.opengl.GL11;
|
||||
|
||||
import com.cricketcraft.chisel.init.ChiselItems;
|
||||
import com.google.common.collect.ArrayListMultimap;
|
||||
import com.google.common.collect.Lists;
|
||||
import com.google.common.collect.Multimap;
|
||||
|
||||
import cpw.mods.fml.common.eventhandler.EventPriority;
|
||||
import cpw.mods.fml.common.eventhandler.SubscribeEvent;
|
||||
|
||||
public class PlayerSpecials {
|
||||
|
||||
private interface IDevRenderer {
|
||||
|
||||
void renderPlayer(EntityPlayer player, boolean post);
|
||||
|
||||
void renderExtras(EntityPlayer player, boolean post);
|
||||
}
|
||||
|
||||
private class RenderHolstered implements IDevRenderer {
|
||||
|
||||
private ItemStack toRender;
|
||||
|
||||
private RenderHolstered(ItemStack toRender) {
|
||||
this.toRender = toRender;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void renderExtras(EntityPlayer player, boolean post) {
|
||||
if (!post) {
|
||||
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 = 0xF000F0;
|
||||
int lightmapX = light % 0x10000;
|
||||
int lightmapY = light / 0x10000;
|
||||
OpenGlHelper.setLightmapTextureCoords(OpenGlHelper.lightmapTexUnit, lightmapX, lightmapY);
|
||||
|
||||
IIcon icon = toRender.getIconIndex();
|
||||
ItemRenderer.renderItemIn2D(Tessellator.instance, icon.getMaxU(), icon.getMinV(), icon.getMinU(), icon.getMaxV(), icon.getIconWidth(), icon.getIconHeight(), 1.0F / 16.0F);
|
||||
GL11.glPopMatrix();
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void renderPlayer(EntityPlayer player, boolean post) {
|
||||
}
|
||||
}
|
||||
|
||||
private class RenderTranslucent implements IDevRenderer {
|
||||
|
||||
@Override
|
||||
public void renderExtras(EntityPlayer player, boolean post) {
|
||||
}
|
||||
|
||||
@Override
|
||||
public void renderPlayer(EntityPlayer player, boolean post) {
|
||||
if (!post) {
|
||||
GL11.glColor4f(1.0F, 1.0F, 1.0F, 0.75F);
|
||||
GL11.glEnable(GL11.GL_BLEND);
|
||||
GL11.glBlendFunc(GL11.GL_SRC_ALPHA, GL11.GL_ONE_MINUS_SRC_ALPHA);
|
||||
} else {
|
||||
GL11.glColor4f(1.0F, 1.0F, 1.0F, 1.0F);
|
||||
GL11.glDisable(GL11.GL_BLEND);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public static final PlayerSpecials INSTANCE = new PlayerSpecials();
|
||||
|
||||
private Multimap<UUID, IDevRenderer> renderMap = ArrayListMultimap.create();
|
||||
|
||||
private PlayerSpecials() {
|
||||
RenderHolstered backChisel = new RenderHolstered(new ItemStack(ChiselItems.obsidianChisel));
|
||||
RenderTranslucent translucent = new RenderTranslucent();
|
||||
|
||||
renderMap.putAll(UUID.fromString("a7529984-8cb2-4fb9-b799-97980f770101"), Lists.newArrayList(backChisel, translucent)); // Cricket
|
||||
renderMap.putAll(UUID.fromString("a1d2532b-ee11-4ca3-b4c5-76e168d4c98e"), Lists.newArrayList(backChisel, translucent)); // TheCricket26
|
||||
renderMap.putAll(UUID.fromString("5399b615-3440-4c66-939d-ab1375952ac3"), Lists.newArrayList(backChisel, translucent)); // Drullkus
|
||||
|
||||
renderMap.put(UUID.fromString("671516b1-4fb3-4c03-aa7c-9c88cfab3ae8"), new RenderHolstered(new ItemStack(ChiselItems.diamondChisel))); // tterrag
|
||||
renderMap.put(UUID.fromString("ad18f501-08fa-4e7e-b324-86750009106e"), new RenderHolstered(new ItemStack(ChiselItems.chisel)));//minecreatr
|
||||
|
||||
MinecraftForge.EVENT_BUS.register(this);
|
||||
}
|
||||
|
||||
public static void init() {
|
||||
}
|
||||
|
||||
@SubscribeEvent(priority = EventPriority.HIGHEST)
|
||||
public void onPlayerRenderPre(RenderLivingEvent.Pre event) {
|
||||
if(nameIsGood(event.entity)){
|
||||
GL11.glColor4f(1.0F, 1.0F, 1.0F, 0.75F);
|
||||
GL11.glEnable(GL11.GL_BLEND);
|
||||
GL11.glBlendFunc(GL11.GL_SRC_ALPHA, GL11.GL_ONE_MINUS_SRC_ALPHA);
|
||||
}
|
||||
}
|
||||
|
||||
@SubscribeEvent
|
||||
public void onPlayerRenderPost(RenderLivingEvent.Post event) {
|
||||
if(nameIsGood(event.entity)){
|
||||
GL11.glColor4f(1.0F, 1.0F, 1.0F, 1.0F);
|
||||
GL11.glDisable(GL11.GL_BLEND);
|
||||
}
|
||||
}
|
||||
|
||||
@SubscribeEvent
|
||||
public void onPlayerRenderSpecialPre(RenderPlayerEvent.Specials.Pre event) {
|
||||
Collection<IDevRenderer> renders = renderMap.get(event.entityPlayer.getUniqueID());
|
||||
for (IDevRenderer r : renders) {
|
||||
r.renderExtras(event.entityPlayer, false);
|
||||
}
|
||||
}
|
||||
|
||||
@SubscribeEvent
|
||||
public void onPlayerRenderSpecialPost(RenderPlayerEvent.Specials.Post event) {
|
||||
Collection<IDevRenderer> renders = renderMap.get(event.entityPlayer.getUniqueID());
|
||||
for (IDevRenderer r : renders) {
|
||||
r.renderExtras(event.entityPlayer, true);
|
||||
}
|
||||
}
|
||||
|
||||
private boolean nameIsGood(Entity entity){
|
||||
if(EnumChatFormatting.getTextWithoutFormattingCodes(entity.getCommandSenderName()).equals("Cricket")
|
||||
|| EnumChatFormatting.getTextWithoutFormattingCodes(entity.getCommandSenderName()).equals("Drullkus")
|
||||
|| EnumChatFormatting.getTextWithoutFormattingCodes(entity.getCommandSenderName()).equals("minecreatr"))
|
||||
return true;
|
||||
return false;
|
||||
}
|
||||
}
|
||||
@@ -1,65 +0,0 @@
|
||||
package com.cricketcraft.chisel.client.render;
|
||||
|
||||
import com.cricketcraft.chisel.entity.EntityChiselSnowman;
|
||||
import net.minecraft.block.Block;
|
||||
import net.minecraft.client.model.ModelSnowMan;
|
||||
import net.minecraft.client.renderer.RenderBlocks;
|
||||
import net.minecraft.client.renderer.entity.RenderLiving;
|
||||
import net.minecraft.entity.Entity;
|
||||
import net.minecraft.entity.EntityLivingBase;
|
||||
import net.minecraft.item.ItemBlock;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.util.ResourceLocation;
|
||||
import net.minecraftforge.client.IItemRenderer;
|
||||
import net.minecraftforge.client.MinecraftForgeClient;
|
||||
import static net.minecraftforge.client.IItemRenderer.ItemRenderType.*;
|
||||
import static net.minecraftforge.client.IItemRenderer.ItemRendererHelper.*;
|
||||
import org.lwjgl.opengl.GL11;
|
||||
|
||||
public class RenderChiselSnowman extends RenderLiving{
|
||||
|
||||
private static final ResourceLocation snowManTextures = new ResourceLocation("textures/entity/snowman.png");
|
||||
private ModelSnowMan snowMan;
|
||||
|
||||
public RenderChiselSnowman() {
|
||||
super(new ModelSnowMan(), 0.5F);
|
||||
snowMan = (ModelSnowMan)super.mainModel;
|
||||
setRenderPassModel(this.snowMan);
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void renderEquippedItems(EntityLivingBase entityLivingBase, float size){
|
||||
this.renderEquippedItems((EntityChiselSnowman) entityLivingBase, size);
|
||||
}
|
||||
|
||||
@Override
|
||||
protected ResourceLocation getEntityTexture(Entity entity) {
|
||||
return this.getEntityTexture((EntityChiselSnowman) entity);
|
||||
}
|
||||
|
||||
protected ResourceLocation getEntityTexture(EntityChiselSnowman snowman){
|
||||
return snowManTextures;
|
||||
}
|
||||
|
||||
protected void renderEquippedItems(EntityChiselSnowman snowman, float size){
|
||||
super.renderEquippedItems(snowman, size);
|
||||
ItemStack itemStack = snowman.getEquipmentInSlot(2);
|
||||
|
||||
if(itemStack.getItem() instanceof ItemBlock){
|
||||
GL11.glPushMatrix();
|
||||
this.snowMan.head.postRender(0.0625F);
|
||||
|
||||
IItemRenderer customRenderer = MinecraftForgeClient.getItemRenderer(itemStack, EQUIPPED);
|
||||
boolean is3D = (customRenderer != null && customRenderer.shouldUseRenderHelper(EQUIPPED, itemStack, BLOCK_3D));
|
||||
|
||||
if(is3D || RenderBlocks.renderItemIn3d(Block.getBlockFromItem(itemStack.getItem()).getRenderType())){
|
||||
float f1 = 0.625F;
|
||||
GL11.glTranslatef(0.0F, -0.34375F, 0.0F);
|
||||
GL11.glRotatef(90.0F, 0.0F, 1.0F, 0.0F);
|
||||
GL11.glScalef(f1, -f1, f1);
|
||||
}
|
||||
this.renderManager.itemRenderer.renderItem(snowman, itemStack, 0);
|
||||
GL11.glPopMatrix();
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1,147 +0,0 @@
|
||||
package com.cricketcraft.chisel.client.render;
|
||||
|
||||
import net.minecraft.block.Block;
|
||||
import net.minecraft.client.renderer.RenderBlocks;
|
||||
import net.minecraft.client.renderer.texture.IIconRegister;
|
||||
import net.minecraft.util.IIcon;
|
||||
import net.minecraft.util.MathHelper;
|
||||
import net.minecraft.world.IBlockAccess;
|
||||
import net.minecraftforge.client.event.TextureStitchEvent.Post;
|
||||
import net.minecraftforge.common.util.ForgeDirection;
|
||||
|
||||
import org.apache.commons.lang3.tuple.Triple;
|
||||
|
||||
import com.cricketcraft.chisel.api.carving.CarvingUtils;
|
||||
import com.cricketcraft.chisel.api.rendering.TextureType;
|
||||
import com.cricketcraft.chisel.api.rendering.TextureType.AbstractSubmapManager;
|
||||
import com.cricketcraft.ctmlib.RenderBlocksCTM;
|
||||
import com.cricketcraft.ctmlib.TextureSubmap;
|
||||
|
||||
import cpw.mods.fml.relauncher.Side;
|
||||
import cpw.mods.fml.relauncher.SideOnly;
|
||||
|
||||
public class SubmapManagerRCTM extends SubmapManagerBase {
|
||||
|
||||
@SideOnly(Side.CLIENT)
|
||||
private class RenderBlocksRCTM extends RenderBlocksCTM {
|
||||
|
||||
@Override
|
||||
public void renderFaceXNeg(Block block, double x, double y, double z, IIcon icon) {
|
||||
submap = (TextureSubmap) TextureType.getRIcon(rType, SubmapManagerRCTM.this.submap, MathHelper.floor_double(x), MathHelper.floor_double(y), MathHelper.floor_double(z), ForgeDirection.WEST.ordinal());
|
||||
submapSmall = (TextureSubmap) TextureType.getRIcon(rType, SubmapManagerRCTM.this.smallSubmap, MathHelper.floor_double(x), MathHelper.floor_double(y), MathHelper.floor_double(z), ForgeDirection.WEST.ordinal());
|
||||
super.renderFaceXNeg(block, x, y, z, icon);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void renderFaceXPos(Block block, double x, double y, double z, IIcon icon) {
|
||||
submap = (TextureSubmap) TextureType.getRIcon(rType, SubmapManagerRCTM.this.submap, MathHelper.floor_double(x), MathHelper.floor_double(y), MathHelper.floor_double(z), ForgeDirection.EAST.ordinal());
|
||||
submapSmall = (TextureSubmap) TextureType.getRIcon(rType, SubmapManagerRCTM.this.smallSubmap, MathHelper.floor_double(x), MathHelper.floor_double(y), MathHelper.floor_double(z), ForgeDirection.EAST.ordinal());
|
||||
super.renderFaceXPos(block, x, y, z, icon);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void renderFaceYNeg(Block block, double x, double y, double z, IIcon icon) {
|
||||
submap = (TextureSubmap) TextureType.getRIcon(rType, SubmapManagerRCTM.this.submap, MathHelper.floor_double(x), MathHelper.floor_double(y), MathHelper.floor_double(z), ForgeDirection.DOWN.ordinal());
|
||||
submapSmall = (TextureSubmap) TextureType.getRIcon(rType, SubmapManagerRCTM.this.smallSubmap, MathHelper.floor_double(x), MathHelper.floor_double(y), MathHelper.floor_double(z), ForgeDirection.DOWN.ordinal());
|
||||
super.renderFaceYNeg(block, x, y, z, icon);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void renderFaceYPos(Block block, double x, double y, double z, IIcon icon) {
|
||||
submap = (TextureSubmap) TextureType.getRIcon(rType, SubmapManagerRCTM.this.submap, MathHelper.floor_double(x), MathHelper.floor_double(y), MathHelper.floor_double(z), ForgeDirection.UP.ordinal());
|
||||
submapSmall = (TextureSubmap) TextureType.getRIcon(rType, SubmapManagerRCTM.this.smallSubmap, MathHelper.floor_double(x), MathHelper.floor_double(y), MathHelper.floor_double(z), ForgeDirection.UP.ordinal());
|
||||
super.renderFaceYPos(block, x, y, z, icon);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void renderFaceZNeg(Block block, double x, double y, double z, IIcon icon) {
|
||||
submap = (TextureSubmap) TextureType.getRIcon(rType, SubmapManagerRCTM.this.submap, MathHelper.floor_double(x), MathHelper.floor_double(y), MathHelper.floor_double(z), ForgeDirection.NORTH.ordinal());
|
||||
submapSmall = (TextureSubmap) TextureType.getRIcon(rType, SubmapManagerRCTM.this.smallSubmap, MathHelper.floor_double(x), MathHelper.floor_double(y), MathHelper.floor_double(z), ForgeDirection.UP.ordinal());
|
||||
super.renderFaceZNeg(block, x, y, z, icon);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void renderFaceZPos(Block block, double x, double y, double z, IIcon icon) {
|
||||
submap = (TextureSubmap) TextureType.getRIcon(rType, SubmapManagerRCTM.this.submap, MathHelper.floor_double(x), MathHelper.floor_double(y), MathHelper.floor_double(z), ForgeDirection.SOUTH.ordinal());
|
||||
submapSmall = (TextureSubmap) TextureType.getRIcon(rType, SubmapManagerRCTM.this.smallSubmap, MathHelper.floor_double(x), MathHelper.floor_double(y), MathHelper.floor_double(z), ForgeDirection.SOUTH.ordinal());
|
||||
super.renderFaceZPos(block, x, y, z, icon);
|
||||
}
|
||||
}
|
||||
|
||||
private class Submap extends TextureSubmap {
|
||||
|
||||
private TextureSubmap[][] submap;
|
||||
|
||||
public Submap(IIcon base, int wh, TextureSubmap[][] submap) {
|
||||
super(base, wh, wh);
|
||||
this.submap = submap;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void TexturesStitched(Post event) {
|
||||
super.TexturesStitched(event);
|
||||
for (int i = 0; i < icons.length; i++) {
|
||||
for (int j = 0; j < icons[i].length; j++) {
|
||||
icons[i][j] = submap[i][j];
|
||||
submap[i][j].TexturesStitched(event);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@SideOnly(Side.CLIENT)
|
||||
private RenderBlocksCTM rb;
|
||||
|
||||
private TextureSubmap submap, smallSubmap;
|
||||
private int size;
|
||||
private String texturePath;
|
||||
private int meta;
|
||||
private IIcon defaultIcon;
|
||||
private TextureType rType;
|
||||
|
||||
public SubmapManagerRCTM(int meta, String texturePath, TextureType rType) {
|
||||
assert rType == TextureType.R16 || rType == TextureType.R9 || rType == TextureType.R4
|
||||
: "Not a valid random type!";
|
||||
|
||||
this.meta = meta;
|
||||
this.texturePath = texturePath;
|
||||
this.size = Integer.parseInt(rType.name().substring(1, rType.name().length())); // >.>
|
||||
this.rType = rType;
|
||||
}
|
||||
|
||||
@Override
|
||||
public IIcon getIcon(int side, int meta) {
|
||||
return defaultIcon;
|
||||
}
|
||||
|
||||
@Override
|
||||
public RenderBlocks createRenderContext(RenderBlocks rendererOld, Block block, IBlockAccess world) {
|
||||
if (rb == null) {
|
||||
rb = new RenderBlocksRCTM();
|
||||
}
|
||||
rb.setRenderBoundsFromBlock(block);
|
||||
return rb;
|
||||
}
|
||||
|
||||
@SuppressWarnings("unchecked")
|
||||
@Override
|
||||
public void registerIcons(String modName, Block block, IIconRegister register) {
|
||||
IIcon base = register.registerIcon(modName + ":" + texturePath);
|
||||
TextureSubmap[][] submaps = new TextureSubmap[size][size];
|
||||
TextureSubmap[][] submapsSmall = new TextureSubmap[size][size];
|
||||
int wh = (int) Math.sqrt(size);
|
||||
for (int i = 0; i < size; i++) {
|
||||
AbstractSubmapManager manager = (AbstractSubmapManager) TextureType.CTMX.createManagerFor(CarvingUtils.getDefaultVariationFor(block, meta, 0), texturePath + "-ctm-" + i);
|
||||
manager.registerIcons(modName, block, register);
|
||||
Object cached = manager.getCachedObject();
|
||||
Triple<IIcon, TextureSubmap, TextureSubmap> triple = (Triple<IIcon, TextureSubmap, TextureSubmap>) cached;
|
||||
submaps[size % wh][size / wh] = triple.getMiddle();
|
||||
submapsSmall[size % wh][size / wh] = triple.getRight();
|
||||
if (i == 0) {
|
||||
defaultIcon = triple.getRight().getSubIcon(0, 0);
|
||||
}
|
||||
}
|
||||
submap = new Submap(base, wh, submaps);
|
||||
smallSubmap = new Submap(base, wh, submapsSmall);
|
||||
}
|
||||
}
|
||||
@@ -1,161 +0,0 @@
|
||||
package com.cricketcraft.chisel.client.render.tile;
|
||||
|
||||
import java.awt.Color;
|
||||
|
||||
import net.minecraft.block.Block;
|
||||
import net.minecraft.block.BlockBeacon;
|
||||
import net.minecraft.client.renderer.OpenGlHelper;
|
||||
import net.minecraft.client.renderer.RenderBlocks;
|
||||
import net.minecraft.client.renderer.Tessellator;
|
||||
import net.minecraft.client.renderer.tileentity.TileEntityBeaconRenderer;
|
||||
import net.minecraft.init.Blocks;
|
||||
import net.minecraft.item.ItemDye;
|
||||
import net.minecraft.tileentity.TileEntity;
|
||||
import net.minecraft.util.MathHelper;
|
||||
import net.minecraft.util.ResourceLocation;
|
||||
import net.minecraft.world.IBlockAccess;
|
||||
|
||||
import org.lwjgl.opengl.GL11;
|
||||
|
||||
import com.cricketcraft.chisel.block.tileentity.TileEntityCarvableBeacon;
|
||||
|
||||
import cpw.mods.fml.client.registry.ISimpleBlockRenderingHandler;
|
||||
import cpw.mods.fml.client.registry.RenderingRegistry;
|
||||
|
||||
public class RenderCarvableBeacon extends TileEntityBeaconRenderer implements ISimpleBlockRenderingHandler {
|
||||
private static final ResourceLocation texture = new ResourceLocation("textures/entity/beacon_beam.png");
|
||||
|
||||
private int renderId;
|
||||
|
||||
public RenderCarvableBeacon() {
|
||||
this.renderId = RenderingRegistry.getNextAvailableRenderId();
|
||||
}
|
||||
|
||||
public void renderTileEntityAt(TileEntityCarvableBeacon beacon, double x, double y, double z, float partialTicks) {
|
||||
float f1 = beacon.func_146002_i();
|
||||
GL11.glAlphaFunc(GL11.GL_GREATER, 0.1F);
|
||||
if(f1 > 0.1F){
|
||||
Color color = new Color(ItemDye.field_150922_c[beacon.getWorldObj().getBlockMetadata(beacon.xCoord, beacon.yCoord, beacon.zCoord)]);
|
||||
Tessellator tessellator = Tessellator.instance;
|
||||
this.bindTexture(texture);
|
||||
GL11.glTexParameterf(GL11.GL_TEXTURE_2D, GL11.GL_TEXTURE_WRAP_S, 10497.0F);
|
||||
GL11.glTexParameterf(GL11.GL_TEXTURE_2D, GL11.GL_TEXTURE_WRAP_T, 10497.0F);
|
||||
GL11.glDisable(GL11.GL_LIGHTING);
|
||||
GL11.glDisable(GL11.GL_CULL_FACE);
|
||||
GL11.glDisable(GL11.GL_BLEND);
|
||||
GL11.glDepthMask(true);
|
||||
OpenGlHelper.glBlendFunc(770, 1, 1, 0);
|
||||
float f2 = (float) beacon.getWorldObj().getTotalWorldTime() + partialTicks;
|
||||
float f3 = -f2 * 0.2F - (float) MathHelper.floor_float(-f2 * 0.1F);
|
||||
byte b0 = 1;
|
||||
double d3 = (double) f2 * 0.025D * (1.0D - (double) (b0 & 1) * 2.5D);
|
||||
tessellator.startDrawingQuads();
|
||||
tessellator.setColorRGBA(color.getRed(), color.getGreen(), color.getBlue(), 32);
|
||||
double d5 = (double) b0 * 0.2D;
|
||||
double d7 = 0.5D + Math.cos(d3 + 2.356194490192345D) * d5;
|
||||
double d9 = 0.5D + Math.sin(d3 + 2.356194490192345D) * d5;
|
||||
double d11 = 0.5D + Math.cos(d3 + (Math.PI / 4D)) * d5;
|
||||
double d13 = 0.5D + Math.sin(d3 + (Math.PI / 4D)) * d5;
|
||||
double d15 = 0.5D + Math.cos(d3 + 3.9269908169872414D) * d5;
|
||||
double d17 = 0.5D + Math.sin(d3 + 3.9269908169872414D) * d5;
|
||||
double d19 = 0.5D + Math.cos(d3 + 5.497787143782138D) * d5;
|
||||
double d21 = 0.5D + Math.sin(d3 + 5.497787143782138D) * d5;
|
||||
double d23 = (double) (256.0F * f1);
|
||||
double d25 = 0.0D;
|
||||
double d27 = 1.0D;
|
||||
double d28 = (double) (-1.0F + f3);
|
||||
double d29 = (double) (256.0F * f1) * (0.5D / d5) + d28;
|
||||
tessellator.addVertexWithUV(x + d7, y + d23, z + d9, d27, d29);
|
||||
tessellator.addVertexWithUV(x + d7, y, z + d9, d27, d28);
|
||||
tessellator.addVertexWithUV(x + d11, y, z + d13, d25, d28);
|
||||
tessellator.addVertexWithUV(x + d11, y + d23, z + d13, d25, d29);
|
||||
tessellator.addVertexWithUV(x + d19, y + d23, z + d21, d27, d29);
|
||||
tessellator.addVertexWithUV(x + d19, y, z + d21, d27, d28);
|
||||
tessellator.addVertexWithUV(x + d15, y, z + d17, d25, d28);
|
||||
tessellator.addVertexWithUV(x + d15, y + d23, z + d17, d25, d29);
|
||||
tessellator.addVertexWithUV(x + d11, y + d23, z + d13, d27, d29);
|
||||
tessellator.addVertexWithUV(x + d11, y, z + d13, d27, d28);
|
||||
tessellator.addVertexWithUV(x + d19, y, z + d21, d25, d28);
|
||||
tessellator.addVertexWithUV(x + d19, y + d23, z + d21, d25, d29);
|
||||
tessellator.addVertexWithUV(x + d15, y + d23, z + d17, d27, d29);
|
||||
tessellator.addVertexWithUV(x + d15, y, z + d17, d27, d28);
|
||||
tessellator.addVertexWithUV(x + d7, y, z + d9, d25, d28);
|
||||
tessellator.addVertexWithUV(x + d7, y + d23, z + d9, d25, d29);
|
||||
tessellator.draw();
|
||||
GL11.glEnable(GL11.GL_BLEND);
|
||||
OpenGlHelper.glBlendFunc(770, 771, 1, 0);
|
||||
GL11.glDepthMask(false);
|
||||
tessellator.startDrawingQuads();
|
||||
tessellator.setColorRGBA(color.getRed(), color.getGreen(), color.getBlue(), 32);
|
||||
double d30 = 0.2D;
|
||||
double d4 = 0.2D;
|
||||
double d6 = 0.8D;
|
||||
double d8 = 0.2D;
|
||||
double d10 = 0.2D;
|
||||
double d12 = 0.8D;
|
||||
double d14 = 0.8D;
|
||||
double d16 = 0.8D;
|
||||
double d18 = (double) (256.0F * f1);
|
||||
double d20 = 0.0D;
|
||||
double d22 = 1.0D;
|
||||
double d24 = (double) (-1.0F + f3);
|
||||
double d26 = (double) (256.0F * f1) + d24;
|
||||
tessellator.addVertexWithUV(x + d30, y + d18, z + d4, d22, d26);
|
||||
tessellator.addVertexWithUV(x + d30, y, z + d4, d22, d24);
|
||||
tessellator.addVertexWithUV(x + d6, y, z + d8, d20, d24);
|
||||
tessellator.addVertexWithUV(x + d6, y + d18, z + d8, d20, d26);
|
||||
tessellator.addVertexWithUV(x + d14, y + d18, z + d16, d22, d26);
|
||||
tessellator.addVertexWithUV(x + d14, y, z + d16, d22, d24);
|
||||
tessellator.addVertexWithUV(x + d10, y, z + d12, d20, d24);
|
||||
tessellator.addVertexWithUV(x + d10, y + d18, z + d12, d20, d26);
|
||||
tessellator.addVertexWithUV(x + d6, y + d18, z + d8, d22, d26);
|
||||
tessellator.addVertexWithUV(x + d6, y, z + d8, d22, d24);
|
||||
tessellator.addVertexWithUV(x + d14, y, z + d16, d20, d24);
|
||||
tessellator.addVertexWithUV(x + d14, y + d18, z + d16, d20, d26);
|
||||
tessellator.addVertexWithUV(x + d10, y + d18, z + d12, d22, d26);
|
||||
tessellator.addVertexWithUV(x + d10, y, z + d12, d22, d24);
|
||||
tessellator.addVertexWithUV(x + d30, y, z + d4, d20, d24);
|
||||
tessellator.addVertexWithUV(x + d30, y + d18, z + d4, d20, d26);
|
||||
tessellator.draw();
|
||||
GL11.glEnable(GL11.GL_LIGHTING);
|
||||
GL11.glEnable(GL11.GL_TEXTURE_2D);
|
||||
GL11.glDepthMask(true);
|
||||
}
|
||||
}
|
||||
|
||||
public void renderTileEntityAt(TileEntity tile, double x, double y, double z, float partialTicks) {
|
||||
this.renderTileEntityAt((TileEntityCarvableBeacon) tile, x, y, z, partialTicks);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void renderInventoryBlock(Block block, int metadata, int modelId, RenderBlocks renderer) {
|
||||
renderer.renderBlockAsItem(Blocks.beacon, 0, 1);
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean renderWorldBlock(IBlockAccess world, int x, int y, int z, Block block, int modelId, RenderBlocks renderer) {
|
||||
float f = 0.1875F;
|
||||
renderer.setOverrideBlockTexture(renderer.getBlockIcon(Blocks.glass));
|
||||
renderer.renderStandardBlockWithAmbientOcclusion(block, x, y, z, 1, 1, 1);
|
||||
renderer.renderAllFaces = true;
|
||||
renderer.setOverrideBlockTexture(renderer.getBlockIcon(Blocks.obsidian));
|
||||
renderer.setRenderBounds(0.125D, 0.00625D, 0.125D, 0.875D, (double)f, 0.875D);
|
||||
renderer.renderStandardBlockWithAmbientOcclusion(block, x, y, z, 1, 1, 1);
|
||||
renderer.setOverrideBlockTexture(renderer.getBlockIcon(Blocks.beacon));
|
||||
renderer.setRenderBounds(0.1875D, (double)f, 0.1875D, 0.8125D, 0.875D, 0.8125D);
|
||||
renderer.renderStandardBlockWithAmbientOcclusion(block, x, y, z, 1, 1, 1);
|
||||
renderer.renderAllFaces = false;
|
||||
renderer.clearOverrideBlockTexture();
|
||||
return true;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean shouldRender3DInInventory(int modelId) {
|
||||
return true;
|
||||
}
|
||||
|
||||
@Override
|
||||
public int getRenderId() {
|
||||
return renderId;
|
||||
}
|
||||
}
|
||||
@@ -1,245 +0,0 @@
|
||||
package com.cricketcraft.chisel.compat;
|
||||
|
||||
import java.util.Map;
|
||||
|
||||
import net.minecraft.block.Block;
|
||||
import net.minecraft.item.ItemStack;
|
||||
|
||||
import com.cricketcraft.chisel.Chisel;
|
||||
import com.cricketcraft.chisel.carving.Carving;
|
||||
import com.cricketcraft.chisel.init.ChiselBlocks;
|
||||
import com.cricketcraft.chisel.init.ChiselItems;
|
||||
import com.google.common.collect.Maps;
|
||||
import com.pahimar.ee3.api.exchange.EnergyValueRegistryProxy;
|
||||
|
||||
import cpw.mods.fml.common.FMLLog;
|
||||
import cpw.mods.fml.common.Loader;
|
||||
import cpw.mods.fml.common.event.FMLPostInitializationEvent;
|
||||
import cpw.mods.fml.common.registry.GameRegistry;
|
||||
|
||||
import org.apache.logging.log4j.Level;
|
||||
|
||||
public class Compatibility {
|
||||
|
||||
public static String[] rockColorNames = { "gray", "lightgray", "brown", "tan", "reddish", "bluish", "greenish" };
|
||||
|
||||
public static Map<Integer, String> tconMap = Maps.newHashMap();
|
||||
|
||||
static
|
||||
{
|
||||
tconMap.put(0, "obsidian");
|
||||
tconMap.put(1, "sandstone");
|
||||
tconMap.put(2, "netherrack");
|
||||
tconMap.put(3, "stonebricksmooth");
|
||||
tconMap.put(12, "end_stone");
|
||||
}
|
||||
|
||||
public static void init(FMLPostInitializationEvent event) {
|
||||
|
||||
/* Proj Red */
|
||||
addSupport("ProjRed|Exploration", "projectred.exploration.stone", "marble", 0, 99);
|
||||
addSupport("ProjRed|Exploration", "projectred.exploration.stone", "marble", 1, 99);
|
||||
|
||||
/* Bluepower */
|
||||
addSupport("bluepower", "marble", "marble", 0, 99);
|
||||
|
||||
/* Artifice */
|
||||
addSupport("Artifice", "artifice.marble", "marble", 0, 99);
|
||||
addSupport("Artifice", "artifice.marble.slab", "marble_slab", 0, 99);
|
||||
for (String s : rockColorNames) {
|
||||
addSupport("Artifice", "artifice.limestone." + s, "limestone", 0, 99);
|
||||
}
|
||||
|
||||
/* Mariculture */
|
||||
Block block = GameRegistry.findBlock("mariculture", "limestone");
|
||||
if (block != null) {
|
||||
for (int i = 0; i < 16; i++) {
|
||||
addSupport("limestone", block, i, 99);
|
||||
}
|
||||
}
|
||||
|
||||
/* Geologica */
|
||||
addSupport("PFAAGeologica", "strongStone", "marble", 5, 99);
|
||||
addSupport("PFAAGeologica", "strongStoneSlab", "marbleSlab", 5, 99);
|
||||
addSupport("PFAAGeologica", "strongStoneBrickStairs.marble", "marbleStairs", 0, 99);
|
||||
addSupport("PFAAGeologica", "mediumStone", "limestone", 0, 99);
|
||||
addSupport("PFAAGeologica", "mediumStoneSlab", "limestoneSlab", 0, 99);
|
||||
addSupport("PFAAGeologica", "mediumStoneBrickStairs.limestone", "limestoneStairs", 0, 99);
|
||||
addSupport("PFAAGeologica", "strongStoneBrick", "stoneBrick", 3, 99);
|
||||
addSupport("PFAAGeologica", "strongCobble", "cobblestone", 3, 99);
|
||||
|
||||
/* Thaumcraft TODO There is probably a cleaner way of doing this */
|
||||
if (Loader.isModLoaded("Thaumcraft")) {
|
||||
loadThaumcraftAspects();
|
||||
}
|
||||
|
||||
for (Integer i : tconMap.keySet())
|
||||
{
|
||||
addSupport("TConstruct", "decoration.multibrick", tconMap.get(i), i, 99);
|
||||
addSupport("TConstruct", "decoration.multibrickfancy", tconMap.get(i), i, 99);
|
||||
}
|
||||
|
||||
addSupport("TConstruct", "decoration.multibrickfancy", "stonebricksmooth", 14, 99);
|
||||
addSupport("TConstruct", "decoration.multibrickfancy", "stonebricksmooth", 15, 99);
|
||||
|
||||
addSupport("Botania", "endStoneBrick", "end_stone", 12, 0);
|
||||
|
||||
if(Loader.isModLoaded("EE3")){
|
||||
loadEE3Values();
|
||||
}
|
||||
}
|
||||
|
||||
public static void addSupport(String modname, String blockname, String name, int metadata, int order) {
|
||||
if (Loader.isModLoaded(modname) && GameRegistry.findBlock(modname, blockname) != null) {
|
||||
addSupport(name, GameRegistry.findBlock(modname, blockname), metadata, order);
|
||||
}
|
||||
}
|
||||
|
||||
public static void addSupport(String name, Block block, int metadata, int order) {
|
||||
Carving.chisel.addVariation(name, block, metadata, order);
|
||||
}
|
||||
|
||||
private static void loadThaumcraftAspects() {
|
||||
// ThaumcraftApi.registerObjectTag(new ItemStack(ChiselBlocks.cobblestone, 1, OreDictionary.WILDCARD_VALUE), (new AspectList()).add(Aspect.ENTROPY, 1).add(Aspect.EARTH, 1));
|
||||
// ThaumcraftApi.registerObjectTag(new ItemStack(ChiselBlocks.cobblestoneWall, 1, OreDictionary.WILDCARD_VALUE), (new AspectList()).add(Aspect.ENTROPY, 1).add(Aspect.EARTH, 1));
|
||||
}
|
||||
|
||||
private static void loadEE3Values(){
|
||||
FMLLog.log(Chisel.MOD_ID, Level.INFO, "[Chisel 2] Oooh is that Equivalent Exchange I see?");
|
||||
EnergyValueRegistryProxy.addPreAssignedEnergyValue(new ItemStack(ChiselItems.ballomoss, 1), 16);
|
||||
|
||||
EnergyValueRegistryProxy.addPreAssignedEnergyValue(new ItemStack(ChiselBlocks.sand_snakestone, 1, 1), 8);
|
||||
EnergyValueRegistryProxy.addPreAssignedEnergyValue(new ItemStack(ChiselBlocks.sand_snakestone, 1, 13), 8);
|
||||
EnergyValueRegistryProxy.addPreAssignedEnergyValue(new ItemStack(ChiselBlocks.cloud, 1, 0), 1);
|
||||
EnergyValueRegistryProxy.addPreAssignedEnergyValue(new ItemStack(ChiselBlocks.cloud, 1, 1), 1);
|
||||
EnergyValueRegistryProxy.addPreAssignedEnergyValue(new ItemStack(ChiselBlocks.cloud, 1, 2), 1);
|
||||
EnergyValueRegistryProxy.addPreAssignedEnergyValue(new ItemStack(ChiselBlocks.cloud, 1, 3), 1);
|
||||
EnergyValueRegistryProxy.addPreAssignedEnergyValue(new ItemStack(ChiselBlocks.cloud, 1, 4), 1);
|
||||
EnergyValueRegistryProxy.addPreAssignedEnergyValue(new ItemStack(ChiselBlocks.glass_pane, 1, 1), 1);
|
||||
EnergyValueRegistryProxy.addPreAssignedEnergyValue(new ItemStack(ChiselBlocks.glass_pane, 1, 2), 1);
|
||||
EnergyValueRegistryProxy.addPreAssignedEnergyValue(new ItemStack(ChiselBlocks.glass_pane, 1, 3), 1);
|
||||
EnergyValueRegistryProxy.addPreAssignedEnergyValue(new ItemStack(ChiselBlocks.glass_pane, 1, 4), 1);
|
||||
EnergyValueRegistryProxy.addPreAssignedEnergyValue(new ItemStack(ChiselBlocks.glass_pane, 1, 12), 1);
|
||||
EnergyValueRegistryProxy.addPreAssignedEnergyValue(new ItemStack(ChiselBlocks.glass_pane, 1, 13), 1);
|
||||
EnergyValueRegistryProxy.addPreAssignedEnergyValue(new ItemStack(ChiselBlocks.glass_pane, 1, 14), 1);
|
||||
EnergyValueRegistryProxy.addPreAssignedEnergyValue(new ItemStack(ChiselBlocks.glass_pane, 1, 15), 1);
|
||||
EnergyValueRegistryProxy.addPreAssignedEnergyValue(new ItemStack(ChiselBlocks.present, 1, 4), 80);
|
||||
EnergyValueRegistryProxy.addPreAssignedEnergyValue(new ItemStack(ChiselBlocks.road_line, 1, 0), 24);
|
||||
EnergyValueRegistryProxy.addPreAssignedEnergyValue(new ItemStack(ChiselBlocks.road_line, 1, 1), 24);
|
||||
EnergyValueRegistryProxy.addPreAssignedEnergyValue(new ItemStack(ChiselBlocks.road_line, 1, 2), 24);
|
||||
EnergyValueRegistryProxy.addPreAssignedEnergyValue(new ItemStack(ChiselBlocks.road_line, 1, 3), 24);
|
||||
EnergyValueRegistryProxy.addPreAssignedEnergyValue(new ItemStack(ChiselBlocks.technical2, 1, 0), 24);
|
||||
EnergyValueRegistryProxy.addPreAssignedEnergyValue(new ItemStack(ChiselBlocks.technical2, 1, 1), 24);
|
||||
EnergyValueRegistryProxy.addPreAssignedEnergyValue(new ItemStack(ChiselBlocks.technical2, 1, 2), 24);
|
||||
EnergyValueRegistryProxy.addPreAssignedEnergyValue(new ItemStack(ChiselBlocks.technical2, 1, 3), 24);
|
||||
EnergyValueRegistryProxy.addPreAssignedEnergyValue(new ItemStack(ChiselBlocks.glass2, 1), 1);
|
||||
EnergyValueRegistryProxy.addPreAssignedEnergyValue(new ItemStack(ChiselBlocks.technical2, 1, 0), 32);
|
||||
|
||||
for(int x = 0; x < ChiselBlocks.pumpkin.length; x++){
|
||||
EnergyValueRegistryProxy.addPreAssignedEnergyValue(new ItemStack(ChiselBlocks.pumpkin[x], 1), 144);
|
||||
EnergyValueRegistryProxy.addPreAssignedEnergyValue(new ItemStack(ChiselBlocks.jackolantern[x], 1), 153);
|
||||
}
|
||||
|
||||
for(int x = 0; x < ChiselBlocks.torches.length; x++){
|
||||
EnergyValueRegistryProxy.addPreAssignedEnergyValue(new ItemStack(ChiselBlocks.torches[x], 1), 9);
|
||||
}
|
||||
|
||||
for(int x = 0; x < 10; x++){
|
||||
EnergyValueRegistryProxy.addPreAssignedEnergyValue(new ItemStack(ChiselBlocks.valentines, 1, x), 3);
|
||||
}
|
||||
|
||||
for(int x = 0 ; x < 16; x++){
|
||||
if(x <= 10)EnergyValueRegistryProxy.addPreAssignedEnergyValue(new ItemStack(ChiselBlocks.concrete, 1, x), 8);
|
||||
if(x <= 14)EnergyValueRegistryProxy.addPreAssignedEnergyValue(new ItemStack(ChiselBlocks.grimstone, 1, x), 5);
|
||||
if(x < 14)EnergyValueRegistryProxy.addPreAssignedEnergyValue(new ItemStack(ChiselBlocks.grimstone, 1, x), 7);
|
||||
if(x < 12)EnergyValueRegistryProxy.addPreAssignedEnergyValue(new ItemStack(ChiselBlocks.dirt, 1, x), 1);
|
||||
if(x < 5){
|
||||
EnergyValueRegistryProxy.addPreAssignedEnergyValue(new ItemStack(ChiselBlocks.rebel, 1, x), 39);
|
||||
}
|
||||
|
||||
EnergyValueRegistryProxy.addPreAssignedEnergyValue(new ItemStack(ChiselBlocks.fantasyblock, 1, x), 29444);
|
||||
EnergyValueRegistryProxy.addPreAssignedEnergyValue(new ItemStack(ChiselBlocks.fantasyblock, 1, x), 31444);
|
||||
EnergyValueRegistryProxy.addPreAssignedEnergyValue(new ItemStack(ChiselBlocks.limestone, 1, x), 1);
|
||||
EnergyValueRegistryProxy.addPreAssignedEnergyValue(new ItemStack(ChiselBlocks.marble, 1, x), 1);
|
||||
EnergyValueRegistryProxy.addPreAssignedEnergyValue(new ItemStack(ChiselBlocks.marble_pillar, 1, x), 8);
|
||||
EnergyValueRegistryProxy.addPreAssignedEnergyValue(new ItemStack(ChiselBlocks.marble_pillar_slab, 1, x), 4);
|
||||
EnergyValueRegistryProxy.addPreAssignedEnergyValue(new ItemStack(ChiselBlocks.sandstone_scribbles, 1, x), 4);
|
||||
EnergyValueRegistryProxy.addPreAssignedEnergyValue(new ItemStack(ChiselBlocks.stonebricksmooth, 1, x), 1);
|
||||
EnergyValueRegistryProxy.addPreAssignedEnergyValue(new ItemStack(ChiselBlocks.templeblock, 1, x), 108);
|
||||
EnergyValueRegistryProxy.addPreAssignedEnergyValue(new ItemStack(ChiselBlocks.mossy_templeblock, 1, x), 108);
|
||||
EnergyValueRegistryProxy.addPreAssignedEnergyValue(new ItemStack(ChiselBlocks.glowstone, 1, x), 1536);
|
||||
EnergyValueRegistryProxy.addPreAssignedEnergyValue(new ItemStack(ChiselBlocks.ice, 1, x), 1);
|
||||
EnergyValueRegistryProxy.addPreAssignedEnergyValue(new ItemStack(ChiselBlocks.woolen_clay, 1, x), 153);
|
||||
EnergyValueRegistryProxy.addPreAssignedEnergyValue(new ItemStack(ChiselBlocks.factoryblock, 1, x), 32);
|
||||
EnergyValueRegistryProxy.addPreAssignedEnergyValue(new ItemStack(ChiselBlocks.hexPlating, 1, x), 37);
|
||||
EnergyValueRegistryProxy.addPreAssignedEnergyValue(new ItemStack(ChiselBlocks.gold_block, 1, x), 18432);
|
||||
EnergyValueRegistryProxy.addPreAssignedEnergyValue(new ItemStack(ChiselBlocks.iron_block, 1, x), 2304);
|
||||
EnergyValueRegistryProxy.addPreAssignedEnergyValue(new ItemStack(ChiselBlocks.laboratoryblock, 1, x), 33);
|
||||
EnergyValueRegistryProxy.addPreAssignedEnergyValue(new ItemStack(ChiselBlocks.technical, 1, x), 32);
|
||||
EnergyValueRegistryProxy.addPreAssignedEnergyValue(new ItemStack(ChiselBlocks.tyrian, 1, x), 33);
|
||||
EnergyValueRegistryProxy.addPreAssignedEnergyValue(new ItemStack(ChiselBlocks.hexLargePlating, 1, x), 37);
|
||||
EnergyValueRegistryProxy.addPreAssignedEnergyValue(new ItemStack(ChiselBlocks.circuits, 1, x), 37);
|
||||
EnergyValueRegistryProxy.addPreAssignedEnergyValue(new ItemStack(ChiselBlocks.factoryblock2, 1, x), 32);
|
||||
|
||||
if(x < 15)EnergyValueRegistryProxy.addPreAssignedEnergyValue(new ItemStack(ChiselBlocks.warningSign, 1, x), 6);
|
||||
|
||||
if(x < 4)EnergyValueRegistryProxy.addPreAssignedEnergyValue(new ItemStack(ChiselBlocks.factoryblock2, 1, x), 32);
|
||||
|
||||
for(int c = 0; c < ChiselBlocks.stainedGlass.length; c++){
|
||||
EnergyValueRegistryProxy.addPreAssignedEnergyValue(new ItemStack(ChiselBlocks.stainedGlass[c], 1, x), 1);
|
||||
}
|
||||
|
||||
for(int c = 0; c < ChiselBlocks.stainedGlassPane.length; c++){
|
||||
if(x <= 13)EnergyValueRegistryProxy.addPreAssignedEnergyValue(new ItemStack(ChiselBlocks.stainedGlassPane[c], 1, x), 1);
|
||||
}
|
||||
|
||||
if(x > 0) {
|
||||
EnergyValueRegistryProxy.addPreAssignedEnergyValue(new ItemStack(ChiselBlocks.cobblestone, 1, x), 1);
|
||||
EnergyValueRegistryProxy.addPreAssignedEnergyValue(new ItemStack(ChiselBlocks.mossy_cobblestone, 1, x), 1);
|
||||
EnergyValueRegistryProxy.addPreAssignedEnergyValue(new ItemStack(ChiselBlocks.netherrack, 1, x), 1);
|
||||
EnergyValueRegistryProxy.addPreAssignedEnergyValue(new ItemStack(ChiselBlocks.obsidian, 1, x), 64);
|
||||
EnergyValueRegistryProxy.addPreAssignedEnergyValue(new ItemStack(ChiselBlocks.sandstone, 1, x), 4);
|
||||
EnergyValueRegistryProxy.addPreAssignedEnergyValue(new ItemStack(ChiselBlocks.voidstonerunic, 1, x), 160);
|
||||
EnergyValueRegistryProxy.addPreAssignedEnergyValue(new ItemStack(ChiselBlocks.glass, 1, x), 1);
|
||||
EnergyValueRegistryProxy.addPreAssignedEnergyValue(new ItemStack(ChiselBlocks.redstone_block, 1, x), 288);
|
||||
if(x <= 8)EnergyValueRegistryProxy.addPreAssignedEnergyValue(new ItemStack(ChiselBlocks.bookshelf, 1, x), 528);
|
||||
if (x <= 12) {
|
||||
EnergyValueRegistryProxy.addPreAssignedEnergyValue(new ItemStack(ChiselBlocks.diamond_block, 1, x), 73728);
|
||||
if (x != 12)
|
||||
EnergyValueRegistryProxy.addPreAssignedEnergyValue(new ItemStack(ChiselBlocks.emerald_block, 1, x), 73728);
|
||||
}
|
||||
|
||||
for (int c = 0; c < ChiselBlocks.planks.length; c++) {
|
||||
EnergyValueRegistryProxy.addPreAssignedEnergyValue(new ItemStack(ChiselBlocks.planks[c], 1, x), 8);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
for(int x = 0; x <= 6; x++){
|
||||
EnergyValueRegistryProxy.addPreAssignedEnergyValue(new ItemStack(ChiselBlocks.andesite, 1, x), 129);
|
||||
EnergyValueRegistryProxy.addPreAssignedEnergyValue(new ItemStack(ChiselBlocks.diorite, 1, x), 257);
|
||||
EnergyValueRegistryProxy.addPreAssignedEnergyValue(new ItemStack(ChiselBlocks.granite, 1, x), 513);
|
||||
EnergyValueRegistryProxy.addPreAssignedEnergyValue(new ItemStack(ChiselBlocks.lavastone, 1, x), 9);
|
||||
EnergyValueRegistryProxy.addPreAssignedEnergyValue(new ItemStack(ChiselBlocks.lavastone, 1, 7), 9);
|
||||
EnergyValueRegistryProxy.addPreAssignedEnergyValue(new ItemStack(ChiselBlocks.voidstone, 1, x), 160);
|
||||
EnergyValueRegistryProxy.addPreAssignedEnergyValue(new ItemStack(ChiselBlocks.voidstone, 1, 7), 160);
|
||||
EnergyValueRegistryProxy.addPreAssignedEnergyValue(new ItemStack(ChiselBlocks.voidstone2, 1, x), 256);
|
||||
EnergyValueRegistryProxy.addPreAssignedEnergyValue(new ItemStack(ChiselBlocks.voidstone2, 1, 7), 256);
|
||||
EnergyValueRegistryProxy.addPreAssignedEnergyValue(new ItemStack(ChiselBlocks.waterstone, 1, x), 1);
|
||||
EnergyValueRegistryProxy.addPreAssignedEnergyValue(new ItemStack(ChiselBlocks.ice_pillar, 1, x), 1);
|
||||
EnergyValueRegistryProxy.addPreAssignedEnergyValue(new ItemStack(ChiselBlocks.iron_bars, 1, x), 96);
|
||||
EnergyValueRegistryProxy.addPreAssignedEnergyValue(new ItemStack(ChiselBlocks.iron_bars, 1, 7), 96);
|
||||
EnergyValueRegistryProxy.addPreAssignedEnergyValue(new ItemStack(ChiselBlocks.iron_bars, 1, 8), 96);
|
||||
EnergyValueRegistryProxy.addPreAssignedEnergyValue(new ItemStack(ChiselBlocks.iron_bars, 1, 9), 96);
|
||||
EnergyValueRegistryProxy.addPreAssignedEnergyValue(new ItemStack(ChiselBlocks.paperwall, 1, x), 32);
|
||||
EnergyValueRegistryProxy.addPreAssignedEnergyValue(new ItemStack(ChiselBlocks.paperwall, 1, 7), 32);
|
||||
EnergyValueRegistryProxy.addPreAssignedEnergyValue(new ItemStack(ChiselBlocks.paperwall, 1, 8), 32);
|
||||
EnergyValueRegistryProxy.addPreAssignedEnergyValue(new ItemStack(ChiselBlocks.paperwall_block, 1, x), 32);
|
||||
EnergyValueRegistryProxy.addPreAssignedEnergyValue(new ItemStack(ChiselBlocks.paperwall_block, 1, 7), 32);
|
||||
EnergyValueRegistryProxy.addPreAssignedEnergyValue(new ItemStack(ChiselBlocks.paperwall_block, 1, 8), 32);
|
||||
if(x > 0){
|
||||
EnergyValueRegistryProxy.addPreAssignedEnergyValue(new ItemStack(ChiselBlocks.brickCustom, 1, x), 256);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1,13 +0,0 @@
|
||||
package com.cricketcraft.chisel.entity;
|
||||
|
||||
import net.minecraft.entity.monster.EntitySnowman;
|
||||
import net.minecraft.world.World;
|
||||
|
||||
public class EntityChiselSnowman extends EntitySnowman{
|
||||
|
||||
public EntityChiselSnowman(World world){
|
||||
super(world);
|
||||
}
|
||||
|
||||
//No special features just needed to get around the hardcoding
|
||||
}
|
||||
@@ -1,62 +0,0 @@
|
||||
package com.cricketcraft.chisel.item;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import net.minecraft.block.Block;
|
||||
import net.minecraft.entity.Entity;
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.item.Item;
|
||||
import net.minecraft.item.ItemBlock;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.util.IIcon;
|
||||
|
||||
import com.cricketcraft.chisel.api.ICarvable;
|
||||
import com.cricketcraft.chisel.api.carving.IVariationInfo;
|
||||
import com.cricketcraft.chisel.config.Configurations;
|
||||
import com.cricketcraft.chisel.utils.General;
|
||||
|
||||
public class ItemCarvablePumpkin extends ItemBlock {
|
||||
|
||||
public ItemCarvablePumpkin(Block block) {
|
||||
super(block);
|
||||
setMaxDamage(0);
|
||||
setHasSubtypes(true);
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean isValidArmor(ItemStack itemStack, int armorType, Entity entity){
|
||||
return true;
|
||||
}
|
||||
|
||||
@Override
|
||||
public int getMetadata(int i) {
|
||||
return i;
|
||||
}
|
||||
|
||||
@Override
|
||||
public IIcon getIconFromDamage(int damage) {
|
||||
return Block.getBlockFromItem(this).getIcon(2, damage);
|
||||
}
|
||||
|
||||
@SuppressWarnings({ "unchecked", "rawtypes" })
|
||||
@Override
|
||||
public void addInformation(ItemStack stack, EntityPlayer player, List lines, boolean advancedTooltips) {
|
||||
if (!Configurations.blockDescriptions)
|
||||
return;
|
||||
|
||||
Item item = General.getItem(stack);
|
||||
if (item == null)
|
||||
return;
|
||||
|
||||
Block block = Block.getBlockFromItem(this);
|
||||
if (!(block instanceof ICarvable))
|
||||
return;
|
||||
|
||||
ICarvable carvable = (ICarvable) block;
|
||||
IVariationInfo var = carvable.getVariation(stack);
|
||||
if (var == null)
|
||||
return;
|
||||
|
||||
lines.add(var.getDescription());
|
||||
}
|
||||
}
|
||||
@@ -1,55 +0,0 @@
|
||||
package com.cricketcraft.chisel.utils;
|
||||
|
||||
import net.minecraft.block.Block;
|
||||
import net.minecraft.block.material.Material;
|
||||
import net.minecraft.client.renderer.texture.IIconRegister;
|
||||
import net.minecraft.util.IIcon;
|
||||
|
||||
public class BlockTexturedOre extends Block {
|
||||
|
||||
int currentPass;
|
||||
Block base;
|
||||
IIcon icon;
|
||||
String iconFile;
|
||||
|
||||
public BlockTexturedOre(Material mat, Block base) {
|
||||
super(mat);
|
||||
|
||||
this.base = base;
|
||||
}
|
||||
|
||||
public BlockTexturedOre(Material mat, String iconFile) {
|
||||
super(mat);
|
||||
|
||||
this.iconFile = iconFile;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean renderAsNormalBlock() {
|
||||
return false;
|
||||
}
|
||||
|
||||
@Override
|
||||
public int getRenderType() {
|
||||
return BlockTexturedOreRenderer.id;
|
||||
}
|
||||
|
||||
@Override
|
||||
public int getRenderBlockPass() {
|
||||
return 1;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean canRenderInPass(int pass) {
|
||||
currentPass = pass;
|
||||
|
||||
return pass == 1 || pass == 0;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void registerBlockIcons(IIconRegister register) {
|
||||
if (iconFile != null)
|
||||
icon = register.registerIcon(iconFile);
|
||||
}
|
||||
|
||||
}
|
||||
@@ -1,78 +0,0 @@
|
||||
package com.cricketcraft.chisel.utils;
|
||||
|
||||
import net.minecraft.block.Block;
|
||||
import net.minecraft.client.renderer.RenderBlocks;
|
||||
import net.minecraft.init.Blocks;
|
||||
import net.minecraft.world.IBlockAccess;
|
||||
|
||||
import org.lwjgl.opengl.GL11;
|
||||
|
||||
import com.cricketcraft.ctmlib.Drawing;
|
||||
|
||||
import cpw.mods.fml.client.registry.ISimpleBlockRenderingHandler;
|
||||
import cpw.mods.fml.client.registry.RenderingRegistry;
|
||||
|
||||
public class BlockTexturedOreRenderer implements ISimpleBlockRenderingHandler {
|
||||
|
||||
float bot = -0.001f, top = 1.0f - bot;
|
||||
static int id;
|
||||
|
||||
public BlockTexturedOreRenderer() {
|
||||
id = RenderingRegistry.getNextAvailableRenderId();
|
||||
}
|
||||
|
||||
@Override
|
||||
public void renderInventoryBlock(Block blck, int meta, int modelID, RenderBlocks renderer) {
|
||||
if (blck == null || !(blck instanceof BlockTexturedOre))
|
||||
return;
|
||||
|
||||
BlockTexturedOre block = (BlockTexturedOre) blck;
|
||||
|
||||
if (block.icon != null) {
|
||||
renderer.overrideBlockTexture = block.icon;
|
||||
renderer.renderBlockAsItem(Blocks.stone, meta, 1.0f);
|
||||
renderer.overrideBlockTexture = null;
|
||||
} else if (block.base != null) {
|
||||
renderer.renderBlockAsItem(block.base, meta, 1.0f);
|
||||
}
|
||||
|
||||
GL11.glEnable(3042);
|
||||
GL11.glBlendFunc(770, 771);
|
||||
renderer.setRenderBounds(bot, bot, bot, top, top, top);
|
||||
GL11.glTranslatef(-0.5F, -0.5F, -0.5F);
|
||||
Drawing.drawBlock(block, meta, renderer);
|
||||
GL11.glDisable(3042);
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean renderWorldBlock(IBlockAccess world, int x, int y, int z, Block blck, int modelId, RenderBlocks renderer) {
|
||||
if (blck == null || !(blck instanceof BlockTexturedOre))
|
||||
return false;
|
||||
BlockTexturedOre block = (BlockTexturedOre) blck;
|
||||
|
||||
if (block.currentPass == 0) {
|
||||
if (block.icon != null) {
|
||||
renderer.overrideBlockTexture = block.icon;
|
||||
renderer.renderStandardBlock(block, x, y, z);
|
||||
renderer.overrideBlockTexture = null;
|
||||
} else if (block.base != null) {
|
||||
renderer.renderBlockByRenderType(block.base, x, y, z);
|
||||
}
|
||||
} else {
|
||||
renderer.setRenderBounds(bot, bot, bot, top, top, top);
|
||||
renderer.renderStandardBlock(block, x, y, z);
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean shouldRender3DInInventory(int modelId) {
|
||||
return true;
|
||||
}
|
||||
|
||||
@Override
|
||||
public int getRenderId() {
|
||||
return id;
|
||||
}
|
||||
}
|
||||
@@ -1,12 +0,0 @@
|
||||
package com.cricketcraft.chisel.utils;
|
||||
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.inventory.Container;
|
||||
|
||||
public class DummyContainer extends Container {
|
||||
|
||||
@Override
|
||||
public boolean canInteractWith(EntityPlayer entityplayer) {
|
||||
return true;
|
||||
}
|
||||
}
|
||||
@@ -1,67 +0,0 @@
|
||||
package com.cricketcraft.chisel.utils;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.Collections;
|
||||
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.world.World;
|
||||
import cpw.mods.fml.common.network.IGuiHandler;
|
||||
import cpw.mods.fml.common.network.NetworkRegistry;
|
||||
|
||||
public abstract class GuiHandler implements Comparable<Object> {
|
||||
|
||||
static ArrayList<GuiHandler> items = new ArrayList<GuiHandler>();
|
||||
|
||||
int index;
|
||||
Object mod;
|
||||
String name;
|
||||
|
||||
public GuiHandler(String n) {
|
||||
items.add(this);
|
||||
name = n;
|
||||
}
|
||||
|
||||
public void open(EntityPlayer player, World world, int x, int y, int z) {
|
||||
player.openGui(mod, index, world, x, y, z);
|
||||
}
|
||||
|
||||
@Override
|
||||
public int compareTo(Object a) {
|
||||
return name.compareTo(((GuiHandler) a).name);
|
||||
}
|
||||
|
||||
public static void register(Object mod) {
|
||||
Collections.sort(items);
|
||||
int index = 0;
|
||||
|
||||
for (GuiHandler h : items) {
|
||||
h.mod = mod;
|
||||
h.index = index++;
|
||||
}
|
||||
|
||||
NetworkRegistry.INSTANCE.registerGuiHandler(mod, new IGuiHandler() {
|
||||
|
||||
@Override
|
||||
public Object getServerGuiElement(int id, EntityPlayer player, World world, int x, int y, int z) {
|
||||
if (id < 0 || id >= items.size()) {
|
||||
return null;
|
||||
}
|
||||
|
||||
return items.get(id).getServerGuiElement(id, player, world, x, y, z);
|
||||
}
|
||||
|
||||
@Override
|
||||
public Object getClientGuiElement(int id, EntityPlayer player, World world, int x, int y, int z) {
|
||||
if (id < 0 || id >= items.size()) {
|
||||
return null;
|
||||
}
|
||||
|
||||
return items.get(id).getClientGuiElement(id, player, world, x, y, z);
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
public abstract Object getServerGuiElement(int ID, EntityPlayer player, World world, int x, int y, int z);
|
||||
|
||||
public abstract Object getClientGuiElement(int ID, EntityPlayer player, World world, int x, int y, int z);
|
||||
}
|
||||
@@ -1,28 +0,0 @@
|
||||
package com.cricketcraft.chisel.utils;
|
||||
|
||||
import net.minecraft.block.Block;
|
||||
import net.minecraft.item.ItemBlock;
|
||||
import net.minecraft.item.ItemStack;
|
||||
|
||||
public class ItemMetaBlock extends ItemBlock {
|
||||
|
||||
public ItemMetaBlock(Block b) {
|
||||
super(b);
|
||||
setMaxDamage(0);
|
||||
setHasSubtypes(true);
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getUnlocalizedName(ItemStack itemstack) {
|
||||
if (itemstack == null) {
|
||||
return Block.getBlockFromItem(this).getUnlocalizedName();
|
||||
}
|
||||
|
||||
return Block.getBlockFromItem(this).getUnlocalizedName();
|
||||
}
|
||||
|
||||
@Override
|
||||
public int getMetadata(int i) {
|
||||
return i;
|
||||
}
|
||||
}
|
||||
+2
-4
@@ -1,12 +1,10 @@
|
||||
package com.cricketcraft.chisel;
|
||||
package team.chisel;
|
||||
|
||||
import java.util.HashMap;
|
||||
|
||||
import team.chisel.utils.General;
|
||||
import net.minecraft.block.Block;
|
||||
import net.minecraft.item.Item;
|
||||
|
||||
import com.cricketcraft.chisel.utils.General;
|
||||
|
||||
import cpw.mods.fml.common.FMLLog;
|
||||
import cpw.mods.fml.common.registry.GameRegistry;
|
||||
|
||||
+24
-43
@@ -1,16 +1,11 @@
|
||||
package com.cricketcraft.chisel;
|
||||
package team.chisel;
|
||||
|
||||
import java.io.File;
|
||||
|
||||
import net.minecraft.block.Block;
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.entity.player.EntityPlayerMP;
|
||||
import net.minecraft.item.Item;
|
||||
import net.minecraft.nbt.NBTTagCompound;
|
||||
import net.minecraft.util.ChatComponentText;
|
||||
import net.minecraftforge.common.MinecraftForge;
|
||||
import net.minecraftforge.common.config.Configuration;
|
||||
import net.minecraftforge.event.entity.EntityJoinWorldEvent;
|
||||
|
||||
import org.apache.logging.log4j.LogManager;
|
||||
import org.apache.logging.log4j.Logger;
|
||||
@@ -18,23 +13,23 @@ import org.apache.logging.log4j.Logger;
|
||||
import com.cricketcraft.chisel.api.ChiselAPIProps;
|
||||
import com.cricketcraft.chisel.api.Statistics;
|
||||
import com.cricketcraft.chisel.api.carving.CarvableHelper;
|
||||
import com.cricketcraft.chisel.block.BlockCarvable;
|
||||
import com.cricketcraft.chisel.carving.Carving;
|
||||
import com.cricketcraft.chisel.compat.Compatibility;
|
||||
import com.cricketcraft.chisel.compat.IMCHandler;
|
||||
import com.cricketcraft.chisel.compat.fmp.FMPCompat;
|
||||
import com.cricketcraft.chisel.config.Configurations;
|
||||
import com.cricketcraft.chisel.entity.EntityChiselSnowman;
|
||||
import com.cricketcraft.chisel.init.ChiselBlocks;
|
||||
import com.cricketcraft.chisel.init.ChiselTabs;
|
||||
import com.cricketcraft.chisel.item.ItemCarvable;
|
||||
import com.cricketcraft.chisel.item.chisel.ChiselController;
|
||||
import com.cricketcraft.chisel.network.ChiselGuiHandler;
|
||||
import com.cricketcraft.chisel.network.PacketHandler;
|
||||
import com.cricketcraft.chisel.proxy.CommonProxy;
|
||||
import com.cricketcraft.chisel.utils.General;
|
||||
import com.cricketcraft.chisel.world.GeneratorChisel;
|
||||
|
||||
import team.chisel.block.BlockCarvable;
|
||||
import team.chisel.carving.Carving;
|
||||
import team.chisel.compat.Compatibility;
|
||||
import team.chisel.compat.IMCHandler;
|
||||
import team.chisel.compat.fmp.FMPCompat;
|
||||
import team.chisel.config.Configurations;
|
||||
import team.chisel.entity.EntityChiselSnowman;
|
||||
import team.chisel.init.ChiselBlocks;
|
||||
import team.chisel.init.ChiselTabs;
|
||||
import team.chisel.item.ItemCarvable;
|
||||
import team.chisel.item.chisel.ChiselController;
|
||||
import team.chisel.network.ChiselGuiHandler;
|
||||
import team.chisel.network.PacketHandler;
|
||||
import team.chisel.proxy.CommonProxy;
|
||||
import team.chisel.utils.General;
|
||||
import team.chisel.world.GeneratorChisel;
|
||||
import cpw.mods.fml.client.event.ConfigChangedEvent;
|
||||
import cpw.mods.fml.common.FMLCommonHandler;
|
||||
import cpw.mods.fml.common.FMLLog;
|
||||
@@ -57,12 +52,12 @@ import cpw.mods.fml.common.registry.EntityRegistry;
|
||||
import cpw.mods.fml.common.registry.GameRegistry;
|
||||
import cpw.mods.fml.common.registry.GameRegistry.Type;
|
||||
|
||||
@Mod(modid = Chisel.MOD_ID, name = Chisel.MOD_NAME, version = Chisel.VERSION, guiFactory = "com.cricketcraft.chisel.client.gui.GuiFactory", dependencies = "after:EE3;after:ForgeMultipart;after:Thaumcraft;after:appliedenergistics2;after:Railcraft;after:AWWayofTime;after:TwilightForest")
|
||||
@Mod(modid = Chisel.MOD_ID, name = Chisel.MOD_NAME, version = Chisel.VERSION, guiFactory = "team.chisel.client.gui.GuiFactory", dependencies = "after:EE3;after:ForgeMultipart;after:Thaumcraft;after:appliedenergistics2;after:Railcraft;after:AWWayofTime;after:TwilightForest")
|
||||
public class Chisel {
|
||||
|
||||
public static final String MOD_ID = "chisel";
|
||||
public static final BlockCarvable.SoundType soundTempleFootstep = new BlockCarvable.SoundType("dig.stone", MOD_ID + ":step.templeblock", 1.0f, 1.0f);
|
||||
public static final String MOD_NAME = "Chisel 2";
|
||||
public static final String MOD_NAME = "Chisel";
|
||||
public static final String VERSION = "@VERSION@";
|
||||
public static final BlockCarvable.SoundType soundHolystoneFootstep = new BlockCarvable.SoundType("holystone", 1.0f, 1.0f);
|
||||
public static final BlockCarvable.SoundType soundMetalFootstep = new BlockCarvable.SoundType("metal", 1.0f, 1.0f);
|
||||
@@ -77,14 +72,14 @@ public class Chisel {
|
||||
|
||||
@Instance(MOD_ID)
|
||||
public static Chisel instance;
|
||||
|
||||
public Chisel() {
|
||||
|
||||
public Chisel() {
|
||||
ChiselAPIProps.MOD_ID = MOD_ID;
|
||||
CarvableHelper.itemCarvableClass = ItemCarvable.class;
|
||||
Carving.construct();
|
||||
}
|
||||
|
||||
@SidedProxy(clientSide = "com.cricketcraft.chisel.proxy.ClientProxy", serverSide = "com.cricketcraft.chisel.proxy.CommonProxy")
|
||||
@SidedProxy(clientSide = "team.chisel.proxy.ClientProxy", serverSide = "team.chisel.proxy.CommonProxy")
|
||||
public static CommonProxy proxy;
|
||||
|
||||
@EventHandler
|
||||
@@ -157,13 +152,13 @@ public class Chisel {
|
||||
addWorldgen(Features.DIORITE, ChiselBlocks.diorite, Configurations.dioriteAmount, 40, 100, 0.5);
|
||||
GameRegistry.registerWorldGenerator(GeneratorChisel.INSTANCE, 1000);
|
||||
|
||||
EntityRegistry.registerModEntity(EntityChiselSnowman.class, "snowman", 0, this, 80, 1, true);
|
||||
EntityRegistry.registerModEntity(EntityChiselSnowman.class, "snowman", 0, this, 80, 1, true);
|
||||
|
||||
proxy.init();
|
||||
MinecraftForge.EVENT_BUS.register(this);
|
||||
FMLCommonHandler.instance().bus().register(instance);
|
||||
|
||||
FMLInterModComms.sendMessage("Waila", "register", "com.cricketcraft.chisel.compat.WailaCompat.register");
|
||||
FMLInterModComms.sendMessage("Waila", "register", "team.chisel.compat.WailaCompat.register");
|
||||
}
|
||||
|
||||
private void addWorldgen(Features feature, Block block, double... data) {
|
||||
@@ -182,8 +177,6 @@ public class Chisel {
|
||||
public void postInit(FMLPostInitializationEvent event) {
|
||||
ChiselTabs.postInit();
|
||||
Compatibility.init(event);
|
||||
FMLLog.severe("Unable to lookup chisel:... is not an error, please do not treat it as such");
|
||||
FMLLog.bigWarning("In case you didn't see the red above I suggest you read it - Cricket");
|
||||
}
|
||||
|
||||
@EventHandler
|
||||
@@ -199,16 +192,4 @@ public class Chisel {
|
||||
Configurations.refreshConfig();
|
||||
}
|
||||
}
|
||||
|
||||
@SubscribeEvent
|
||||
public void thankYou(EntityJoinWorldEvent event){
|
||||
if(!event.world.isRemote && event.entity instanceof EntityPlayerMP){
|
||||
EntityPlayerMP player = (EntityPlayerMP) event.entity;
|
||||
if(!player.getEntityData().getCompoundTag(EntityPlayer.PERSISTED_NBT_TAG).getBoolean("thanked")){
|
||||
NBTTagCompound tag = player.getEntityData().getCompoundTag(EntityPlayer.PERSISTED_NBT_TAG);
|
||||
tag.setBoolean("thanked", true);
|
||||
player.addChatMessage(new ChatComponentText("Thank you for half a million downloads! - The Chisel Team"));
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
+233
-179
@@ -1,20 +1,33 @@
|
||||
package com.cricketcraft.chisel;
|
||||
|
||||
import static com.cricketcraft.chisel.init.ChiselBlocks.andesite;
|
||||
import static com.cricketcraft.chisel.init.ChiselBlocks.diorite;
|
||||
import static com.cricketcraft.chisel.init.ChiselBlocks.granite;
|
||||
import static com.cricketcraft.chisel.init.ChiselBlocks.jackolantern;
|
||||
import static com.cricketcraft.chisel.init.ChiselBlocks.planks;
|
||||
import static com.cricketcraft.chisel.init.ChiselBlocks.pumpkin;
|
||||
import static com.cricketcraft.chisel.init.ChiselBlocks.stainedGlass;
|
||||
import static com.cricketcraft.chisel.init.ChiselBlocks.stainedGlassPane;
|
||||
import static com.cricketcraft.chisel.init.ChiselBlocks.torches;
|
||||
import static com.cricketcraft.chisel.utils.General.featureColors;
|
||||
import static com.cricketcraft.chisel.utils.General.sGNames;
|
||||
package team.chisel;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import com.cricketcraft.chisel.item.chisel.ItemChisel;
|
||||
import team.chisel.block.*;
|
||||
import team.chisel.carving.Carving;
|
||||
import team.chisel.client.render.SubmapManagerAntiblock;
|
||||
import team.chisel.client.render.SubmapManagerCarpetFloor;
|
||||
import team.chisel.client.render.SubmapManagerCombinedCTM;
|
||||
import team.chisel.client.render.SubmapManagerFakeController;
|
||||
import team.chisel.client.render.SubmapManagerLeaves;
|
||||
import team.chisel.client.render.SubmapManagerSlab;
|
||||
import team.chisel.client.render.SubmapManagerVoidstone;
|
||||
import team.chisel.compat.fmp.ItemBlockChiselTorchPart;
|
||||
import team.chisel.config.Configurations;
|
||||
import team.chisel.entity.EntityBallOMoss;
|
||||
import team.chisel.entity.EntityCloudInABottle;
|
||||
import team.chisel.entity.EntitySmashingRock;
|
||||
import team.chisel.init.ChiselBlocks;
|
||||
import team.chisel.init.ChiselItems;
|
||||
import team.chisel.init.ChiselTabs;
|
||||
import team.chisel.item.ItemBallOMoss;
|
||||
import team.chisel.item.ItemBlockPresent;
|
||||
import team.chisel.item.ItemCarvable;
|
||||
import team.chisel.item.ItemCarvablePumpkin;
|
||||
import team.chisel.item.ItemCarvableSlab;
|
||||
import team.chisel.item.ItemCloudInABottle;
|
||||
import team.chisel.item.ItemSmashingRock;
|
||||
import team.chisel.item.ItemUpgrade;
|
||||
import team.chisel.item.chisel.ItemChisel;
|
||||
import net.minecraft.block.Block;
|
||||
import net.minecraft.block.material.Material;
|
||||
import net.minecraft.init.Blocks;
|
||||
@@ -24,39 +37,24 @@ import net.minecraft.item.ItemDye;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.item.crafting.FurnaceRecipes;
|
||||
import net.minecraft.world.World;
|
||||
|
||||
import com.cricketcraft.chisel.api.carving.CarvableHelper;
|
||||
import com.cricketcraft.chisel.api.carving.CarvingUtils.SimpleCarvingGroup;
|
||||
import com.cricketcraft.chisel.api.carving.ICarvingVariation;
|
||||
import com.cricketcraft.chisel.api.carving.IVariationInfo;
|
||||
import com.cricketcraft.chisel.block.*;
|
||||
import com.cricketcraft.chisel.carving.Carving;
|
||||
import com.cricketcraft.chisel.client.render.SubmapManagerAntiblock;
|
||||
import com.cricketcraft.chisel.client.render.SubmapManagerCarpetFloor;
|
||||
import com.cricketcraft.chisel.client.render.SubmapManagerFakeController;
|
||||
import com.cricketcraft.chisel.client.render.SubmapManagerLeaves;
|
||||
import com.cricketcraft.chisel.client.render.SubmapManagerSlab;
|
||||
import com.cricketcraft.chisel.client.render.SubmapManagerVoidstone;
|
||||
import com.cricketcraft.chisel.compat.fmp.ItemBlockChiselTorchPart;
|
||||
import com.cricketcraft.chisel.config.Configurations;
|
||||
import com.cricketcraft.chisel.entity.EntityBallOMoss;
|
||||
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 com.cricketcraft.chisel.init.ChiselTabs;
|
||||
import com.cricketcraft.chisel.item.*;
|
||||
import com.google.common.collect.Lists;
|
||||
|
||||
import cpw.mods.fml.common.Loader;
|
||||
import cpw.mods.fml.common.registry.EntityRegistry;
|
||||
import cpw.mods.fml.common.registry.GameRegistry;
|
||||
|
||||
import net.minecraftforge.common.util.ForgeDirection;
|
||||
import net.minecraftforge.oredict.OreDictionary;
|
||||
import net.minecraftforge.oredict.ShapedOreRecipe;
|
||||
import net.minecraftforge.oredict.ShapelessOreRecipe;
|
||||
|
||||
import com.cricketcraft.chisel.api.carving.CarvableHelper;
|
||||
import com.cricketcraft.chisel.api.carving.ICarvingVariation;
|
||||
import com.cricketcraft.chisel.api.carving.IVariationInfo;
|
||||
import com.cricketcraft.chisel.api.carving.CarvingUtils.SimpleCarvingGroup;
|
||||
import com.cricketcraft.chisel.api.rendering.TextureType;
|
||||
import com.google.common.collect.Lists;
|
||||
|
||||
import static team.chisel.init.ChiselBlocks.*;
|
||||
import static team.chisel.utils.General.*;
|
||||
import cpw.mods.fml.common.Loader;
|
||||
import cpw.mods.fml.common.registry.EntityRegistry;
|
||||
import cpw.mods.fml.common.registry.GameRegistry;
|
||||
|
||||
public enum Features {
|
||||
|
||||
AE_CERTUS_QUARTZ("appliedenergistics2") {
|
||||
@@ -126,13 +124,13 @@ public enum Features {
|
||||
@Override
|
||||
void addBlocks() {
|
||||
BlockCarvable andesite = (BlockCarvable) new BlockCarvable(Material.rock).setHardness(2.0F).setResistance(10.0F).setCreativeTab(ChiselTabs.tabStoneChiselBlocks);
|
||||
andesite.carverHelper.addVariation(Configurations.imTooGoodForDescriptions ? "" : "tile.andesite.0.desc", 0, "andesite/andesite");
|
||||
andesite.carverHelper.addVariation(Configurations.imTooGoodForDescriptions ? "" : "tile.andesite.0.desc", 0, "andesite/andesite");
|
||||
andesite.carverHelper.addVariation("tile.andesite.1.desc", 1, "andesite/andesitePolished");
|
||||
andesite.carverHelper.addVariation("tile.andesite.2.desc", 2, "andesite/andesitePillar");
|
||||
andesite.carverHelper.addVariation("tile.andesite.3.desc", 3, "andesite/andesiteLBrick");
|
||||
andesite.carverHelper.addVariation("tile.andesite.4.desc", 4, "andesite/andesiteOrnate");
|
||||
andesite.carverHelper.addVariation("tile.andesite.5.desc", 5, "andesite/andesitePrism");
|
||||
andesite.carverHelper.addVariation("tile.andesite.6.desc", 6, "andesite/andesiteTiles");
|
||||
andesite.carverHelper.addVariation("tile.andesite.2.desc", 2, "andesite/andesitePillar");
|
||||
andesite.carverHelper.addVariation("tile.andesite.3.desc", 3, "andesite/andesiteLBrick");
|
||||
andesite.carverHelper.addVariation("tile.andesite.4.desc", 4, "andesite/andesiteOrnate");
|
||||
andesite.carverHelper.addVariation("tile.andesite.5.desc", 5, "andesite/andesitePrism");
|
||||
andesite.carverHelper.addVariation("tile.andesite.6.desc", 6, "andesite/andesiteTiles");
|
||||
andesite.carverHelper.registerAll(andesite, "andesite");
|
||||
andesite.carverHelper.registerOre("blockAndesite");
|
||||
andesite.carverHelper.registerOre("stoneAndesite");
|
||||
@@ -167,8 +165,8 @@ public enum Features {
|
||||
if (meta == 0) {
|
||||
GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(ChiselBlocks.antiBlock, 8, 15), "SSS", "SGS", "SSS", 'S', "stone", 'G', "dustGlowstone"));
|
||||
}
|
||||
GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(ChiselBlocks.antiBlock, 8, meta), "BBB", "BdB", "BBB",
|
||||
'd', dyeOres[meta], 'B', new ItemStack(ChiselBlocks.antiBlock, 1, OreDictionary.WILDCARD_VALUE)));
|
||||
GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(ChiselBlocks.antiBlock, 8, meta), "BBB", "BdB", "BBB", 'd', dyeOres[meta], 'B', new ItemStack(ChiselBlocks.antiBlock, 1,
|
||||
OreDictionary.WILDCARD_VALUE)));
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -191,11 +189,11 @@ public enum Features {
|
||||
arcane.carverHelper.addVariation("tile.arcane.4.desc", 4, "arcane/runesGlow");
|
||||
arcane.carverHelper.addVariation("tile.arcane.5.desc", 5, "arcane/bigBrick");
|
||||
arcane.carverHelper.addVariation("tile.arcane.6.desc", 6, "arcane/conduitGlowAnim");
|
||||
arcane.carverHelper.addVariation("tile.arcane.7.desc", 7, "arcane/BorderBrain");
|
||||
arcane.carverHelper.addVariation("tile.arcane.8.desc", 8, "arcane/ArcaneBorder");
|
||||
arcane.carverHelper.addVariation("tile.arcane.9.desc", 9, "arcane/arcaneMatrix");
|
||||
arcane.carverHelper.addVariation("tile.arcane.10.desc", 10, "arcane/thaumcraftLogo");
|
||||
arcane.carverHelper.addVariation("tile.arcane.11.desc", 11, "arcane/arcaneCrackAnim");
|
||||
arcane.carverHelper.addVariation("tile.arcane.7.desc", 7, "arcane/BorderBrain");
|
||||
arcane.carverHelper.addVariation("tile.arcane.8.desc", 8, "arcane/ArcaneBorder");
|
||||
arcane.carverHelper.addVariation("tile.arcane.9.desc", 9, "arcane/arcaneMatrix");
|
||||
arcane.carverHelper.addVariation("tile.arcane.10.desc", 10, "arcane/thaumcraftLogo");
|
||||
arcane.carverHelper.addVariation("tile.arcane.11.desc", 11, "arcane/arcaneCrackAnim");
|
||||
arcane.carverHelper.registerAll(arcane, "arcane");
|
||||
Carving.chisel.registerOre("arcane", "arcane");
|
||||
}
|
||||
@@ -251,11 +249,12 @@ public enum Features {
|
||||
},
|
||||
|
||||
BEACON {
|
||||
|
||||
@Override
|
||||
void addBlocks(){
|
||||
void addBlocks() {
|
||||
BlockCarvableBeacon beacon = (BlockCarvableBeacon) new BlockCarvableBeacon().setCreativeTab(ChiselTabs.tabOtherChiselBlocks);
|
||||
Carving.chisel.addVariation("beacon", Blocks.beacon, 0, 0);
|
||||
for(int meta = 0; meta < 16; meta++){
|
||||
for (int meta = 0; meta < 16; meta++) {
|
||||
beacon.carverHelper.addVariation("tile.beacon." + ItemDye.field_150923_a[meta] + ".desc", meta, "beacon", (meta + 1));
|
||||
}
|
||||
beacon.carverHelper.registerAll(beacon, "beacon");
|
||||
@@ -392,8 +391,8 @@ public enum Features {
|
||||
|
||||
@Override
|
||||
void addBlocks() {
|
||||
BlockCarvableCarpet carpet = (BlockCarvableCarpet) new BlockCarvableCarpet(Material.cloth).setCreativeTab(ChiselTabs.tabOtherChiselBlocks).setHardness(0.1F).setStepSound(Block.soundTypeCloth)
|
||||
.setLightOpacity(0).setStepSound(Block.soundTypeCloth);
|
||||
BlockCarvableCarpet carpet = (BlockCarvableCarpet) new BlockCarvableCarpet(Material.cloth).setCreativeTab(ChiselTabs.tabOtherChiselBlocks).setHardness(0.1F)
|
||||
.setStepSound(Block.soundTypeCloth).setLightOpacity(0).setStepSound(Block.soundTypeCloth);
|
||||
|
||||
carpet.carverHelper.addVariation("tile.carpet.0.desc", 0, new SubmapManagerCarpetFloor("white"));
|
||||
carpet.carverHelper.addVariation("tile.carpet.1.desc", 1, new SubmapManagerCarpetFloor("orange"));
|
||||
@@ -580,8 +579,7 @@ public enum Features {
|
||||
}
|
||||
},
|
||||
|
||||
COPPER
|
||||
{
|
||||
COPPER {
|
||||
|
||||
@Override
|
||||
void addBlocks() {
|
||||
@@ -617,7 +615,7 @@ public enum Features {
|
||||
diamond_block.carverHelper.addVariation("tile.diamond.10.desc", 10, "diamond/terrain-diamond-fourornate");
|
||||
diamond_block.carverHelper.addVariation("tile.diamond.11.desc", 11, "diamond/terrain-diamond-zelda");
|
||||
diamond_block.carverHelper.addVariation("tile.diamond.12.desc", 12, "diamond/terrain-diamond-ornatelayer");
|
||||
diamond_block.carverHelper.registerAll(diamond_block, "diamond_block");
|
||||
diamond_block.carverHelper.registerAll(diamond_block, "diamond_block");
|
||||
Carving.chisel.registerOre("diamond_block", "blockDiamond");
|
||||
}
|
||||
},
|
||||
@@ -628,13 +626,13 @@ public enum Features {
|
||||
void addBlocks() {
|
||||
BlockCarvable diorite = (BlockCarvable) new BlockCarvable(Material.rock).setHardness(2.0F).setResistance(10.0F).setCreativeTab(ChiselTabs.tabStoneChiselBlocks);
|
||||
|
||||
diorite.carverHelper.addVariation(Configurations.imTooGoodForDescriptions ? "" : "tile.diorite.0.desc", 0, "diorite/diorite");
|
||||
diorite.carverHelper.addVariation(Configurations.imTooGoodForDescriptions ? "" : "tile.diorite.0.desc", 0, "diorite/diorite");
|
||||
diorite.carverHelper.addVariation("tile.diorite.1.desc", 1, "diorite/dioritePolished");
|
||||
diorite.carverHelper.addVariation("tile.diorite.2.desc", 2, "diorite/dioritePillar");
|
||||
diorite.carverHelper.addVariation("tile.diorite.3.desc", 3, "diorite/dioriteLBrick");
|
||||
diorite.carverHelper.addVariation("tile.diorite.4.desc", 4, "diorite/dioriteOrnate");
|
||||
diorite.carverHelper.addVariation("tile.diorite.5.desc", 5, "diorite/dioritePrism");
|
||||
diorite.carverHelper.addVariation("tile.diorite.6.desc", 6, "diorite/dioriteTiles");
|
||||
diorite.carverHelper.addVariation("tile.diorite.3.desc", 3, "diorite/dioriteLBrick");
|
||||
diorite.carverHelper.addVariation("tile.diorite.4.desc", 4, "diorite/dioriteOrnate");
|
||||
diorite.carverHelper.addVariation("tile.diorite.5.desc", 5, "diorite/dioritePrism");
|
||||
diorite.carverHelper.addVariation("tile.diorite.6.desc", 6, "diorite/dioriteTiles");
|
||||
diorite.carverHelper.registerAll(diorite, "diorite");
|
||||
diorite.carverHelper.registerOre("blockDiorite");
|
||||
diorite.carverHelper.registerOre("stoneDiorite");
|
||||
@@ -701,16 +699,30 @@ public enum Features {
|
||||
}
|
||||
},
|
||||
|
||||
END_STONE {
|
||||
END_STONE {
|
||||
|
||||
@Override
|
||||
void addBlocks() {
|
||||
//BlockCarvable end_stone = (BlockCarvable) new BlockCarvable(Material.rock).setHardness(2.0F).setResistance(10.0F).setCreativeTab(ChiselTabs.tabStoneChiselBlocks);
|
||||
Carving.chisel.addVariation("end_stone", Blocks.end_stone , 0, 0);
|
||||
//end_stone.carverHelper.registerAll(emerald_block, "endStone");
|
||||
Carving.chisel.registerOre("end_stone", "end_stone");
|
||||
}
|
||||
},
|
||||
@Override
|
||||
void addBlocks() {
|
||||
BlockCarvable end_Stone = (BlockCarvable) new BlockCarvable(Material.rock).setHardness(2.0F).setResistance(10.0F).setCreativeTab(ChiselTabs.tabStoneChiselBlocks);
|
||||
Carving.chisel.addVariation("end_Stone", Blocks.end_stone, 0, -1);
|
||||
end_Stone.carverHelper.addVariation("tile.end_Stone.0.desc", 0, "endstone/end_bricks");
|
||||
end_Stone.carverHelper.addVariation("tile.end_Stone.1.desc", 1, "endstone/chaoticBricks");
|
||||
end_Stone.carverHelper.addVariation("tile.end_Stone.2.desc", 2, "endstone/CheckeredTile");
|
||||
end_Stone.carverHelper.addVariation("tile.end_Stone.3.desc", 3, "endstone/enderCircuit");
|
||||
end_Stone.carverHelper.addVariation("tile.end_Stone.4.desc", 4, "endstone/endFrenchBricks");
|
||||
end_Stone.carverHelper.addVariation("tile.end_Stone.5.desc", 5, "endstone/endPillar");
|
||||
end_Stone.carverHelper.addVariation("tile.end_Stone.6.desc", 6, "endstone/endStoneEtched");
|
||||
end_Stone.carverHelper.addVariation("tile.end_Stone.7.desc", 7, "endstone/prismaticEndStone");
|
||||
end_Stone.carverHelper.addVariation("tile.end_Stone.8.desc", 8, "endstone/endStoneChunk");
|
||||
end_Stone.carverHelper.addVariation("tile.end_Stone.9.desc", 9, "endstone/EnderFrame", new SubmapManagerCombinedCTM(9, "endstone/EnderFrame", TextureType.V9));
|
||||
end_Stone.carverHelper.addVariation("tile.end_Stone.10.desc", 10, "endstone/arcaneEndStone");
|
||||
end_Stone.carverHelper.addVariation("tile.end_Stone.11.desc", 11, "endstone/framedEndStone");
|
||||
end_Stone.carverHelper.addVariation("tile.end_Stone.12.desc", 12, "endstone/endStoneOrnate");
|
||||
end_Stone.carverHelper.addVariation("tile.end_Stone.13.desc", 13, "endstone/endStoneLargeTile");
|
||||
end_Stone.carverHelper.registerAll(end_Stone, "end_Stone");
|
||||
Carving.chisel.registerOre("end_Stone", "end_Stone");
|
||||
}
|
||||
},
|
||||
|
||||
FACTORY {
|
||||
|
||||
@@ -822,14 +834,14 @@ public enum Features {
|
||||
futura.carverHelper.addVariation("tile.futura.5.desc", 5, "futura/WIP/controller", new SubmapManagerFakeController(5, "futura/WIP/uberWavy"));
|
||||
futura.carverHelper.registerAll(futura, "futura");
|
||||
|
||||
BlockCarvable circuits = (BlockCarvable) new BlockCarvableGlow("animations/strobe").setCreativeTab(ChiselTabs.tabMetalChiselBlocks).setHardness(2.0F).setResistance(10.0F);
|
||||
for (int i = 0; i < 16; i++) {
|
||||
circuits.carverHelper.addVariation("tile.futuraCircuit." + ItemDye.field_150921_b[i] + ".desc", i, "futura/circuitPlate", (i+20));
|
||||
}
|
||||
BlockCarvable circuits = (BlockCarvable) new BlockCarvableGlow("animations/strobe").setCreativeTab(ChiselTabs.tabMetalChiselBlocks).setHardness(2.0F).setResistance(10.0F);
|
||||
for (int i = 0; i < 16; i++) {
|
||||
circuits.carverHelper.addVariation("tile.futuraCircuit." + ItemDye.field_150921_b[i] + ".desc", i, "futura/circuitPlate", (i + 20));
|
||||
}
|
||||
|
||||
circuits.carverHelper.registerBlock(circuits, "futuraCircuit");
|
||||
circuits.carverHelper.registerVariations("futura");
|
||||
Carving.chisel.registerOre("futura", "futura");
|
||||
circuits.carverHelper.registerBlock(circuits, "futuraCircuit");
|
||||
circuits.carverHelper.registerVariations("futura");
|
||||
Carving.chisel.registerOre("futura", "futura");
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -864,8 +876,8 @@ public enum Features {
|
||||
|
||||
BlockCarvableGlass glass2 = (BlockCarvableGlass) new BlockCarvableGlass().setCreativeTab(ChiselTabs.tabOtherChiselBlocks).setHardness(0.3F).setStepSound(Block.soundTypeGlass);
|
||||
glass2.carverHelper.addVariation("tile.glass2.0.desc", 0, "glass/chrono", 20);
|
||||
glass2.carverHelper.registerBlock(glass2, "glass2");
|
||||
glass2.carverHelper.registerVariations("glass");
|
||||
glass2.carverHelper.registerBlock(glass2, "glass2");
|
||||
glass2.carverHelper.registerVariations("glass");
|
||||
}
|
||||
},
|
||||
|
||||
@@ -1000,18 +1012,18 @@ public enum Features {
|
||||
gold_block.carverHelper.addVariation("tile.gold.13.desc", 13, "gold/terrain-gold-spaceblack");
|
||||
gold_block.carverHelper.addVariation("tile.gold.14.desc", 14, "gold/terrain-gold-simple");
|
||||
|
||||
BlockCarvable gold2 = (BlockCarvable) new BlockBeaconBase(Material.iron).setStepSound(Block.soundTypeMetal).setCreativeTab(ChiselTabs.tabModdedChiselBlocks).setHardness(5F)
|
||||
.setResistance(10F);
|
||||
gold2.carverHelper.addVariation("tile.metalOre.0.desc", 0, "metals/gold/caution", 20);
|
||||
gold2.carverHelper.addVariation("tile.metalOre.1.desc", 1, "metals/gold/crate", 21);
|
||||
gold2.carverHelper.addVariation("tile.metalOre.2.desc", 2, "metals/gold/thermal", 22);
|
||||
gold2.carverHelper.addVariation("tile.metalOre.3.desc", 3, "metals/gold/adv", 23);
|
||||
gold2.carverHelper.addVariation("tile.metalOre.4.desc", 4, "metals/gold/egregious", 24);
|
||||
gold2.carverHelper.addVariation("tile.metalOre.5.desc", 5, "metals/gold/bolted", 25);
|
||||
gold2.carverHelper.registerBlock(gold2, "gold2");
|
||||
gold2.carverHelper.registerVariations("gold_block");
|
||||
BlockCarvable gold2 = (BlockCarvable) new BlockBeaconBase(Material.iron).setStepSound(Block.soundTypeMetal).setCreativeTab(ChiselTabs.tabModdedChiselBlocks).setHardness(5F)
|
||||
.setResistance(10F);
|
||||
gold2.carverHelper.addVariation("tile.metalOre.0.desc", 0, "metals/gold/caution", 20);
|
||||
gold2.carverHelper.addVariation("tile.metalOre.1.desc", 1, "metals/gold/crate", 21);
|
||||
gold2.carverHelper.addVariation("tile.metalOre.2.desc", 2, "metals/gold/thermal", 22);
|
||||
gold2.carverHelper.addVariation("tile.metalOre.3.desc", 3, "metals/gold/adv", 23);
|
||||
gold2.carverHelper.addVariation("tile.metalOre.4.desc", 4, "metals/gold/egregious", 24);
|
||||
gold2.carverHelper.addVariation("tile.metalOre.5.desc", 5, "metals/gold/bolted", 25);
|
||||
gold2.carverHelper.registerBlock(gold2, "gold2");
|
||||
gold2.carverHelper.registerVariations("gold_block");
|
||||
|
||||
gold_block.carverHelper.registerAll(gold_block, "gold_block");
|
||||
gold_block.carverHelper.registerAll(gold_block, "gold_block");
|
||||
Carving.chisel.registerOre("gold_block", "blockGold");
|
||||
}
|
||||
},
|
||||
@@ -1022,13 +1034,13 @@ public enum Features {
|
||||
void addBlocks() {
|
||||
BlockCarvable granite = (BlockCarvable) new BlockCarvable(Material.rock).setHardness(2.0F).setResistance(10.0F).setCreativeTab(ChiselTabs.tabStoneChiselBlocks);
|
||||
|
||||
granite.carverHelper.addVariation(Configurations.imTooGoodForDescriptions ? "" : "tile.granite.0.desc", 0, "granite/granite");
|
||||
granite.carverHelper.addVariation(Configurations.imTooGoodForDescriptions ? "" : "tile.granite.0.desc", 0, "granite/granite");
|
||||
granite.carverHelper.addVariation("tile.granite.1.desc", 1, "granite/granitePolished");
|
||||
granite.carverHelper.addVariation("tile.granite.2.desc", 2, "granite/granitePillar");
|
||||
granite.carverHelper.addVariation("tile.granite.3.desc", 3, "granite/graniteLBrick");
|
||||
granite.carverHelper.addVariation("tile.granite.4.desc", 4, "granite/graniteOrnate");
|
||||
granite.carverHelper.addVariation("tile.granite.5.desc", 5, "granite/granitePrism");
|
||||
granite.carverHelper.addVariation("tile.granite.6.desc", 6, "granite/graniteTiles");
|
||||
granite.carverHelper.addVariation("tile.granite.3.desc", 3, "granite/graniteLBrick");
|
||||
granite.carverHelper.addVariation("tile.granite.4.desc", 4, "granite/graniteOrnate");
|
||||
granite.carverHelper.addVariation("tile.granite.5.desc", 5, "granite/granitePrism");
|
||||
granite.carverHelper.addVariation("tile.granite.6.desc", 6, "granite/graniteTiles");
|
||||
granite.carverHelper.registerAll(granite, "granite");
|
||||
granite.carverHelper.registerOre("blockGranite");
|
||||
granite.carverHelper.registerOre("stoneGranite");
|
||||
@@ -1074,21 +1086,21 @@ public enum Features {
|
||||
|
||||
@Override
|
||||
void addBlocks() {
|
||||
BlockCarvable hexPlating = (BlockCarvable) new BlockCarvableGlow("animations/archetype2").setCreativeTab(ChiselTabs.tabMetalChiselBlocks).setHardness(2.0F).setResistance(9001.0F);
|
||||
for (int i = 0; i < 16; i++) {
|
||||
hexPlating.carverHelper.addVariation("tile.hexPlating." + ItemDye.field_150921_b[i] + ".desc", i, "hexPlating/hexBase");
|
||||
}
|
||||
hexPlating.carverHelper.registerAll(hexPlating, "hexPlating");
|
||||
Carving.chisel.registerOre("hexPlating", "hexPlating");
|
||||
BlockCarvable hexPlating = (BlockCarvable) new BlockCarvableGlow("animations/archetype2").setCreativeTab(ChiselTabs.tabMetalChiselBlocks).setHardness(2).setResistance(12);
|
||||
for (int i = 0; i < 16; i++) {
|
||||
hexPlating.carverHelper.addVariation("tile.hexPlating." + ItemDye.field_150921_b[i] + ".desc", i, "hexPlating/hexBase");
|
||||
}
|
||||
hexPlating.carverHelper.registerAll(hexPlating, "hexPlating");
|
||||
Carving.chisel.registerOre("hexPlating", "hexPlating");
|
||||
|
||||
BlockCarvable hexLargePlating = (BlockCarvable) new BlockCarvableGlow("animations/archetype2").setCreativeTab(ChiselTabs.tabMetalChiselBlocks).setHardness(2.0F).setResistance(9001.0F);
|
||||
for (int i = 0; i < 16; i++) {
|
||||
hexLargePlating.carverHelper.addVariation("tile.hexPlating." + ItemDye.field_150921_b[i] + ".desc", i, "hexPlating/hexNew", (i+20));
|
||||
}
|
||||
BlockCarvable hexLargePlating = (BlockCarvable) new BlockCarvableGlow("animations/archetype2").setCreativeTab(ChiselTabs.tabMetalChiselBlocks).setHardness(2).setResistance(12);
|
||||
for (int i = 0; i < 16; i++) {
|
||||
hexLargePlating.carverHelper.addVariation("tile.hexPlating." + ItemDye.field_150921_b[i] + ".desc", i, "hexPlating/hexNew", (i + 20));
|
||||
}
|
||||
|
||||
hexLargePlating.carverHelper.registerBlock(hexLargePlating, "hexLargePlating");
|
||||
hexLargePlating.carverHelper.registerVariations("hexPlating");
|
||||
Carving.chisel.registerOre("hexPlating", "hexPlating");
|
||||
hexLargePlating.carverHelper.registerBlock(hexLargePlating, "hexLargePlating");
|
||||
hexLargePlating.carverHelper.registerVariations("hexPlating");
|
||||
Carving.chisel.registerOre("hexPlating", "hexPlating");
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -1259,18 +1271,18 @@ public enum Features {
|
||||
iron_block.carverHelper.addVariation("tile.iron.14.desc", 14, "iron/terrain-iron-vents");
|
||||
iron_block.carverHelper.addVariation("tile.iron.15.desc", 15, "iron/terrain-iron-simple");
|
||||
|
||||
BlockCarvable iron2 = (BlockCarvable) new BlockBeaconBase(Material.iron).setStepSound(Block.soundTypeMetal).setCreativeTab(ChiselTabs.tabModdedChiselBlocks).setHardness(5F)
|
||||
.setResistance(10F);
|
||||
iron2.carverHelper.addVariation("tile.metalOre.0.desc", 0, "metals/iron/caution", 20);
|
||||
iron2.carverHelper.addVariation("tile.metalOre.1.desc", 1, "metals/iron/crate", 21);
|
||||
iron2.carverHelper.addVariation("tile.metalOre.2.desc", 2, "metals/iron/thermal", 22);
|
||||
iron2.carverHelper.addVariation("tile.metalOre.3.desc", 3, "metals/iron/adv", 23);
|
||||
iron2.carverHelper.addVariation("tile.metalOre.4.desc", 4, "metals/iron/egregious", 24);
|
||||
iron2.carverHelper.addVariation("tile.metalOre.5.desc", 5, "metals/iron/bolted", 25);
|
||||
iron2.carverHelper.registerBlock(iron2, "iron2");
|
||||
iron2.carverHelper.registerVariations("iron_block");
|
||||
BlockCarvable iron2 = (BlockCarvable) new BlockBeaconBase(Material.iron).setStepSound(Block.soundTypeMetal).setCreativeTab(ChiselTabs.tabModdedChiselBlocks).setHardness(5F)
|
||||
.setResistance(10F);
|
||||
iron2.carverHelper.addVariation("tile.metalOre.0.desc", 0, "metals/iron/caution", 20);
|
||||
iron2.carverHelper.addVariation("tile.metalOre.1.desc", 1, "metals/iron/crate", 21);
|
||||
iron2.carverHelper.addVariation("tile.metalOre.2.desc", 2, "metals/iron/thermal", 22);
|
||||
iron2.carverHelper.addVariation("tile.metalOre.3.desc", 3, "metals/iron/adv", 23);
|
||||
iron2.carverHelper.addVariation("tile.metalOre.4.desc", 4, "metals/iron/egregious", 24);
|
||||
iron2.carverHelper.addVariation("tile.metalOre.5.desc", 5, "metals/iron/bolted", 25);
|
||||
iron2.carverHelper.registerBlock(iron2, "iron2");
|
||||
iron2.carverHelper.registerVariations("iron_block");
|
||||
|
||||
iron_block.carverHelper.registerAll(iron_block, "iron_block");
|
||||
iron_block.carverHelper.registerAll(iron_block, "iron_block");
|
||||
Carving.chisel.registerOre("iron_block", "blockIron");
|
||||
}
|
||||
},
|
||||
@@ -1340,7 +1352,7 @@ public enum Features {
|
||||
lapis_block.carverHelper.addVariation("tile.lapis.7.desc", 7, "lapis/a1-blocklapis-smooth");
|
||||
lapis_block.carverHelper.addVariation("tile.lapis.8.desc", 8, "lapis/a1-blocklapis-ornatelayer");
|
||||
|
||||
lapis_block.carverHelper.registerAll(lapis_block, "lapis_block");
|
||||
lapis_block.carverHelper.registerAll(lapis_block, "lapis_block");
|
||||
Carving.chisel.registerOre("lapis_block", "lapis");
|
||||
}
|
||||
},
|
||||
@@ -1393,6 +1405,7 @@ public enum Features {
|
||||
BlockLeaf leaves = (BlockLeaf) new BlockLeaf(Material.leaves).setCreativeTab(ChiselTabs.tabOtherChiselBlocks).setHardness(0.2F).setStepSound(Block.soundTypeGrass);
|
||||
Carving.chisel.addGroup(new SimpleCarvingGroup("leaves") {
|
||||
|
||||
@Override
|
||||
public List<ICarvingVariation> getVariations() {
|
||||
if (Configurations.chiselBackToVanillaLeaves) {
|
||||
return super.getVariations();
|
||||
@@ -1680,38 +1693,37 @@ public enum Features {
|
||||
}
|
||||
},
|
||||
|
||||
NATION {
|
||||
NATION {
|
||||
|
||||
@Override
|
||||
void addBlocks() {
|
||||
BlockCarvable imperial = (BlockCarvable) new BlockCarvable(Material.rock).setCreativeTab(ChiselTabs.tabMetalChiselBlocks).setHardness(2.0F).setResistance(10F);
|
||||
imperial.carverHelper.addVariation("tile.imperial.0.desc", 0, "military/imperialCamo");
|
||||
imperial.carverHelper.addVariation("tile.imperial.1.desc", 1, "military/imperialCamoSecluded");
|
||||
imperial.carverHelper.addVariation("tile.imperial.2.desc", 2, "military/imperialPlate");
|
||||
imperial.carverHelper.addVariation("tile.imperial.3.desc", 3, "military/imperialCautionWhite");
|
||||
imperial.carverHelper.addVariation("tile.imperial.4.desc", 4, "military/imperialCautionOrange");
|
||||
imperial.carverHelper.registerBlock(imperial, "nation");
|
||||
@Override
|
||||
void addBlocks() {
|
||||
BlockCarvable imperial = (BlockCarvable) new BlockCarvable(Material.rock).setCreativeTab(ChiselTabs.tabMetalChiselBlocks).setHardness(2.0F).setResistance(10F);
|
||||
imperial.carverHelper.addVariation("tile.imperial.0.desc", 0, "military/imperialCamo");
|
||||
imperial.carverHelper.addVariation("tile.imperial.1.desc", 1, "military/imperialCamoSecluded");
|
||||
imperial.carverHelper.addVariation("tile.imperial.2.desc", 2, "military/imperialPlate");
|
||||
imperial.carverHelper.addVariation("tile.imperial.3.desc", 3, "military/imperialCautionWhite");
|
||||
imperial.carverHelper.addVariation("tile.imperial.4.desc", 4, "military/imperialCautionOrange");
|
||||
imperial.carverHelper.registerBlock(imperial, "nation");
|
||||
|
||||
BlockCarvable rebel = (BlockCarvable) new BlockCarvable(Material.rock).setCreativeTab(ChiselTabs.tabMetalChiselBlocks).setHardness(2.0F).setResistance(10F);
|
||||
rebel.carverHelper.addVariation("tile.rebel.0.desc", 0, "military/rebelCamo", 20);
|
||||
rebel.carverHelper.addVariation("tile.rebel.1.desc", 1, "military/rebelCamoSecluded", 21);
|
||||
rebel.carverHelper.addVariation("tile.rebel.2.desc", 2, "military/rebelPlate", 22);
|
||||
rebel.carverHelper.addVariation("tile.rebel.3.desc", 3, "military/rebelCautionWhite", 23);
|
||||
rebel.carverHelper.addVariation("tile.rebel.4.desc", 4, "military/rebelCautionRed", 24);
|
||||
rebel.carverHelper.registerBlock(rebel, "rebel");
|
||||
BlockCarvable rebel = (BlockCarvable) new BlockCarvable(Material.rock).setCreativeTab(ChiselTabs.tabMetalChiselBlocks).setHardness(2.0F).setResistance(10F);
|
||||
rebel.carverHelper.addVariation("tile.rebel.0.desc", 0, "military/rebelCamo", 20);
|
||||
rebel.carverHelper.addVariation("tile.rebel.1.desc", 1, "military/rebelCamoSecluded", 21);
|
||||
rebel.carverHelper.addVariation("tile.rebel.2.desc", 2, "military/rebelPlate", 22);
|
||||
rebel.carverHelper.addVariation("tile.rebel.3.desc", 3, "military/rebelCautionWhite", 23);
|
||||
rebel.carverHelper.addVariation("tile.rebel.4.desc", 4, "military/rebelCautionRed", 24);
|
||||
rebel.carverHelper.registerBlock(rebel, "rebel");
|
||||
|
||||
imperial.carverHelper.registerVariations("military");
|
||||
rebel.carverHelper.registerVariations("military");
|
||||
imperial.carverHelper.registerVariations("military");
|
||||
rebel.carverHelper.registerVariations("military");
|
||||
|
||||
Carving.chisel.registerOre("military", "military");
|
||||
}
|
||||
Carving.chisel.registerOre("military", "military");
|
||||
}
|
||||
|
||||
@Override
|
||||
void addRecipes() {
|
||||
GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(ChiselBlocks.rebel, 32, 0), new Object[] { "xyx", "yzy", "xyx", 'x', "stone", 'y',
|
||||
Items.iron_ingot, 'z', Items.gold_nugget }));
|
||||
}
|
||||
},
|
||||
@Override
|
||||
void addRecipes() {
|
||||
GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(ChiselBlocks.rebel, 32, 0), new Object[] { "xyx", "yzy", "xyx", 'x', "stone", 'y', Items.iron_ingot, 'z', Items.gold_nugget }));
|
||||
}
|
||||
},
|
||||
|
||||
NETHER_BRICK {
|
||||
|
||||
@@ -1780,7 +1792,8 @@ public enum Features {
|
||||
|
||||
@Override
|
||||
void addBlocks() {
|
||||
BlockCarvable obsidian = (BlockCarvable) new BlockCarvable(Material.rock).setCreativeTab(ChiselTabs.tabStoneChiselBlocks).setHardness(50.0F).setResistance(2000.0F).setStepSound(Block.soundTypeStone);
|
||||
BlockCarvable obsidian = (BlockCarvable) new BlockCarvable(Material.rock).setCreativeTab(ChiselTabs.tabStoneChiselBlocks).setHardness(50.0F).setResistance(2000.0F)
|
||||
.setStepSound(Block.soundTypeStone);
|
||||
|
||||
Carving.chisel.addVariation("obsidian", Blocks.obsidian, 0, 0);
|
||||
obsidian.carverHelper.addVariation("tile.obsidian.1.desc", 1, "obsidian/pillar");
|
||||
@@ -1799,7 +1812,7 @@ public enum Features {
|
||||
obsidian.carverHelper.addVariation("tile.obsidian.14.desc", 14, "obsidian/greek");
|
||||
obsidian.carverHelper.addVariation("tile.obsidian.15.desc", 15, "obsidian/crate");
|
||||
|
||||
obsidian.carverHelper.registerAll(obsidian, "obsidian");
|
||||
obsidian.carverHelper.registerAll(obsidian, "obsidian");
|
||||
Carving.chisel.registerOre("obsidian", "obsidian");
|
||||
}
|
||||
},
|
||||
@@ -1829,6 +1842,7 @@ public enum Features {
|
||||
packedice.carverHelper.registerAll(packedice, "packedice");
|
||||
Carving.chisel.registerOre("packedice", "packedice");
|
||||
}
|
||||
|
||||
@Override
|
||||
void addRecipes() {
|
||||
GameRegistry.addRecipe(new ItemStack(ChiselBlocks.packedice_pillar, 6, 0), "XX", "XX", "XX", 'X', new ItemStack(ChiselBlocks.packedice, 1, OreDictionary.WILDCARD_VALUE));
|
||||
@@ -1839,8 +1853,8 @@ public enum Features {
|
||||
|
||||
@Override
|
||||
void addBlocks() {
|
||||
BlockCarvablePackedIce packedice_pillar = (BlockCarvablePackedIce) new BlockCarvablePackedIce().setCreativeTab(ChiselTabs.tabOtherChiselBlocks)
|
||||
.setHardness(0.5F).setLightOpacity(3).setStepSound(Block.soundTypeGlass);
|
||||
BlockCarvablePackedIce packedice_pillar = (BlockCarvablePackedIce) new BlockCarvablePackedIce().setCreativeTab(ChiselTabs.tabOtherChiselBlocks).setHardness(0.5F).setLightOpacity(3)
|
||||
.setStepSound(Block.soundTypeGlass);
|
||||
|
||||
packedice_pillar.carverHelper.addVariation("tile.packedice_pillar.0.desc", 0, "icepillar/plainplain");
|
||||
packedice_pillar.carverHelper.addVariation("tile.packedice_pillar.1.desc", 1, "icepillar/plaingreek");
|
||||
@@ -1977,6 +1991,33 @@ public enum Features {
|
||||
}
|
||||
},
|
||||
|
||||
PURPUR {
|
||||
|
||||
@Override
|
||||
void addBlocks() {
|
||||
BlockCarvable purpur = (BlockCarvable) new BlockCarvable(Material.rock).setHardness(2.0F).setResistance(10.0F).setCreativeTab(ChiselTabs.tabStoneChiselBlocks);
|
||||
purpur.carverHelper.addVariation("tile.purpur.0.desc", 0, "end_purpur/purpur_block");
|
||||
purpur.carverHelper.addVariation("tile.purpur.1.desc", 1, "end_purpur/purpur_pillar");
|
||||
purpur.carverHelper.addVariation("tile.purpur.2.desc", 2, "end_purpur/shulker");
|
||||
purpur.carverHelper.addVariation("tile.purpur.3.desc", 3, "end_purpur/tilePurpur");
|
||||
purpur.carverHelper.addVariation("tile.purpur.4.desc", 4, "end_purpur/tileBrokenPurpur");
|
||||
purpur.carverHelper.addVariation("tile.purpur.5.desc", 5, "end_purpur/prismaticPurpur");
|
||||
purpur.carverHelper.addVariation("tile.purpur.6.desc", 6, "end_purpur/purpurBricks");
|
||||
purpur.carverHelper.addVariation("tile.purpur.7.desc", 7, "end_purpur/purpurCobble");
|
||||
purpur.carverHelper.addVariation("tile.purpur.8.desc", 8, "end_purpur/arcanePurpur");
|
||||
purpur.carverHelper.addVariation("tile.purpur.9.desc", 9, "end_purpur/purpurLargeTile");
|
||||
purpur.carverHelper.addVariation("tile.purpur.10.desc", 10, "end_purpur/purpurOrnate");
|
||||
|
||||
purpur.carverHelper.registerAll(purpur, "purpur");
|
||||
Carving.chisel.registerOre("purpur", "purpur");
|
||||
}
|
||||
|
||||
@Override
|
||||
void addRecipes() {
|
||||
GameRegistry.addShapelessRecipe(new ItemStack(ChiselBlocks.purpur), new ItemStack(Item.getItemFromBlock(Blocks.end_stone), 1), new ItemStack(Items.dye, 1, 5));
|
||||
}
|
||||
},
|
||||
|
||||
QUARTZ {
|
||||
|
||||
@Override
|
||||
@@ -2148,7 +2189,7 @@ public enum Features {
|
||||
redstone_block.carverHelper.addVariation("tile.redstone_block.14.desc", 14, "redstone/a1-blockredstone-skullred");
|
||||
redstone_block.carverHelper.addVariation("tile.redstone_block.15.desc", 15, "redstone/a1-blockredstone-redstonezelda");
|
||||
|
||||
redstone_block.carverHelper.registerAll(redstone_block, "redstone_block");
|
||||
redstone_block.carverHelper.registerAll(redstone_block, "redstone_block");
|
||||
Carving.chisel.registerOre("redstone_block", "redstone");
|
||||
}
|
||||
},
|
||||
@@ -2356,10 +2397,10 @@ public enum Features {
|
||||
}
|
||||
}
|
||||
|
||||
stonebricksmooth.carverHelper.addVariation("tile.stonebricksmooth.0.desc", 0, "stonebrick2/masonBricksPlain", 16);
|
||||
stonebricksmooth.carverHelper.addVariation("tile.stonebricksmooth.1.desc", 1, "stonebrick2/masonBricksFelsic", 17);
|
||||
stonebricksmooth.carverHelper.addVariation("tile.stonebricksmooth.2.desc", 2, "stonebrick2/masonBricksMafic", 18);
|
||||
stonebricksmooth.carverHelper.addVariation("tile.stonebricksmooth.3.desc", 3, "stonebrick2/masonBricksMixed", 19);
|
||||
stonebricksmooth.carverHelper.addVariation("tile.stonebricksmooth.0.desc", 0, "stonebrick2/masonBricksPlain", 16);
|
||||
stonebricksmooth.carverHelper.addVariation("tile.stonebricksmooth.1.desc", 1, "stonebrick2/masonBricksFelsic", 17);
|
||||
stonebricksmooth.carverHelper.addVariation("tile.stonebricksmooth.2.desc", 2, "stonebrick2/masonBricksMafic", 18);
|
||||
stonebricksmooth.carverHelper.addVariation("tile.stonebricksmooth.3.desc", 3, "stonebrick2/masonBricksMixed", 19);
|
||||
stonebricksmooth.carverHelper.addVariation("tile.stonebricksmooth.4.desc", 4, "stonebrick/smallbricks");
|
||||
stonebricksmooth.carverHelper.addVariation("tile.stonebricksmooth.5.desc", 5, "stonebrick/largebricks");
|
||||
stonebricksmooth.carverHelper.addVariation("tile.stonebricksmooth.6.desc", 6, "stonebrick/smallchaotic");
|
||||
@@ -2374,9 +2415,9 @@ public enum Features {
|
||||
stonebricksmooth.carverHelper.addVariation("tile.stonebricksmooth.15.desc", 15, "stonebrick/poison");
|
||||
|
||||
stonebricksmooth.carverHelper.registerAll(stonebricksmooth, "stonebricksmooth");
|
||||
Carving.chisel.registerOre("stonebricksmooth", "stonebricksmooth");
|
||||
Carving.chisel.registerOre("stonebricksmooth", "stonebricksmooth");
|
||||
|
||||
//Carving.chisel.addVariation("stonebricksmooth", GameRegistry.findBlock("Chisel-2", "tile.TFTowerStone"), 0, 0);
|
||||
// Carving.chisel.addVariation("stonebricksmooth", GameRegistry.findBlock("Chisel-2", "tile.TFTowerStone"), 0, 0);
|
||||
}
|
||||
},
|
||||
|
||||
@@ -2414,31 +2455,47 @@ public enum Features {
|
||||
technical.carverHelper.addVariation("tile.technical.13.desc", 13, "technical/grate");
|
||||
technical.carverHelper.addVariation("tile.technical.14.desc", 14, "technical/malfunctionFan");
|
||||
technical.carverHelper.addVariation("tile.technical.15.desc", 15, "technical/grateRusty");
|
||||
technical.carverHelper.registerAll(technical, "technical");
|
||||
technical.carverHelper.registerAll(technical, "technical");
|
||||
|
||||
BlockCarvableGlass technical2 = (BlockCarvableGlass) new BlockCarvableGlass().setHardness(2.0F).setResistance(10F);
|
||||
technical2.carverHelper.addVariation("tile.technical.0.desc", 0, "technical/scaffoldTransparent", 20);
|
||||
technical2.carverHelper.addVariation("tile.technical.4.desc", 1, "technical/fanFastTransparent", 21);
|
||||
technical2.carverHelper.addVariation("tile.technical.6.desc", 2, "technical/fanStillTransparent", 22);
|
||||
technical2.carverHelper.addVariation("tile.technical.14.desc", 3, "technical/fanStillTransparent", 23);
|
||||
technical2.carverHelper.registerBlock(technical2, "technical2");
|
||||
technical2.carverHelper.registerVariations("technical");
|
||||
technical2.carverHelper.registerBlock(technical2, "technical2");
|
||||
technical2.carverHelper.registerVariations("technical");
|
||||
|
||||
BlockCarvable technical3 = (BlockCarvable) new BlockCarvable(Material.rock).setCreativeTab(ChiselTabs.tabMetalChiselBlocks).setHardness(2.0F).setResistance(10F);
|
||||
technical3.carverHelper.addVariation("tile.technical3.0.desc", 0, "technical/massiveFan", 40);
|
||||
technical3.carverHelper.addVariation("tile.technical3.1.desc", 1, "technical/massiveHexPlating", 41);
|
||||
technical2.carverHelper.registerBlock(technical3, "technical3");
|
||||
technical2.carverHelper.registerVariations("technical");
|
||||
BlockCarvable technicalLarge = (BlockCarvable) new BlockCarvable(Material.rock).setCreativeTab(ChiselTabs.tabMetalChiselBlocks).setHardness(2.0F).setResistance(10F);
|
||||
technicalLarge.carverHelper.addVariation("tile.technical3.0.desc", 0, "technical/massiveFan", 40);
|
||||
technicalLarge.carverHelper.addVariation("tile.technical3.1.desc", 1, "technical/massiveHexPlating", 41);
|
||||
technicalLarge.carverHelper.registerBlock(technicalLarge, "technical3");
|
||||
technicalLarge.carverHelper.registerVariations("technical");
|
||||
|
||||
Carving.chisel.registerOre("technical", "technical");
|
||||
BlockCarvable technical4 = (BlockCarvable) new BlockCarvable(Material.rock).setCreativeTab(ChiselTabs.tabMetalChiselBlocks).setHardness(2.0F).setResistance(10F);
|
||||
technical4.carverHelper.addVariation("tile.technical4.0.desc", 0, "technical/new/weatheredGreenPanels");
|
||||
technical4.carverHelper.addVariation("tile.technical4.1.desc", 1, "technical/new/weatheredOrangePanels");
|
||||
technical4.carverHelper.addVariation("tile.technical4.2.desc", 2, "technical/new/Sturdy");
|
||||
technical4.carverHelper.addVariation("tile.technical4.3.desc", 3, "technical/new/MegaCell");
|
||||
technical4.carverHelper
|
||||
.addVariation("tile.technical4.4.desc", 4, "technical/new/ExhaustPlating"/* , new SubmapManagerCombinedCTM(4, "technical/new/test/ExhaustPlating", TextureType.R4) */);
|
||||
technical4.carverHelper.addVariation("tile.technical4.5.desc", 5, "technical/new/MakeshiftPanels");
|
||||
technical4.carverHelper.addVariation("tile.technical4.6.desc", 6, "technical/new/Piping");
|
||||
// The animation is malfunctioning. :(
|
||||
// technical4.carverHelper.addVariation("tile.technical4.7.desc", 7, "technical/new/TapeDrive");
|
||||
technical4.carverHelper.registerBlock(technical4, "technical4");
|
||||
technical4.carverHelper.registerVariations("technical");
|
||||
|
||||
Carving.chisel.registerOre("technical", "technical");
|
||||
}
|
||||
|
||||
@Override
|
||||
void addRecipes() {
|
||||
GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(ChiselBlocks.technical, Configurations.factoryBlockAmount, 0), new Object[] { "xyx", "yxy", "xyx", 'x', "stone", 'y',
|
||||
Items.iron_ingot }));
|
||||
/*GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(ChiselBlocks.technical2, Configurations.factoryBlockAmount, 0), new Object[] { "xyx", "yzy", "xyx", 'x', "stone", 'y',
|
||||
"ingotIron", 'z', Blocks.glass })); //*/
|
||||
/*
|
||||
* GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(ChiselBlocks.technical2, Configurations.factoryBlockAmount, 0), new Object[] { "xyx", "yzy", "xyx", 'x', "stone", 'y',
|
||||
* "ingotIron", 'z', Blocks.glass })); //
|
||||
*/
|
||||
}
|
||||
},
|
||||
|
||||
@@ -2701,8 +2758,7 @@ public enum Features {
|
||||
voidstone.carverHelper.registerAll(voidstone, "voidstone");
|
||||
Carving.chisel.registerOre("voidstone", "voidstone");
|
||||
|
||||
BlockCarvable voidstone2 = (BlockCarvable) new BlockCarvable().setStepSound(Block.soundTypeStone)
|
||||
.setCreativeTab(ChiselTabs.tabStoneChiselBlocks).setHardness(5.0F).setResistance(10.0F);
|
||||
BlockCarvable voidstone2 = (BlockCarvable) new BlockCarvable().setStepSound(Block.soundTypeStone).setCreativeTab(ChiselTabs.tabStoneChiselBlocks).setHardness(5.0F).setResistance(10.0F);
|
||||
voidstone2.carverHelper.addVariation("tile.voidstone.0.desc", 0, new SubmapManagerVoidstone("voidstone/animated/raw", 0));
|
||||
voidstone2.carverHelper.addVariation("tile.voidstone.1.desc", 1, new SubmapManagerVoidstone("voidstone/animated/quarters", 1));
|
||||
voidstone2.carverHelper.addVariation("tile.voidstone.2.desc", 2, new SubmapManagerVoidstone("voidstone/animated/smooth", 2));
|
||||
@@ -2717,7 +2773,6 @@ public enum Features {
|
||||
|
||||
BlockCarvable voidstonerunic = (BlockCarvable) new BlockCarvable(Material.rock).setCreativeTab(ChiselTabs.tabStoneChiselBlocks).setHardness(5.0F).setResistance(10.0F);
|
||||
|
||||
|
||||
for (int i = 1; i < 16; i++)
|
||||
voidstonerunic.carverHelper.addVariation("tile.voidstoneRunic." + sGNames[i].replaceAll(" ", "").toLowerCase() + ".desc", i, "voidstone/runes/rune" + sGNames[i].replaceAll(" ", ""));
|
||||
voidstonerunic.carverHelper.registerAll(voidstonerunic, "voidstoneRunic");
|
||||
@@ -2852,7 +2907,6 @@ public enum Features {
|
||||
void addBlocks() {
|
||||
BlockCarvable woolen_clay = (BlockCarvable) new BlockCarvable(Material.clay).setCreativeTab(ChiselTabs.tabOtherChiselBlocks).setHardness(2F).setResistance(10F);
|
||||
|
||||
|
||||
for (int i = 0; i < 16; i++)
|
||||
woolen_clay.carverHelper.addVariation("tile.woolenClay." + i + ".desc", i, "woolenClay/" + sGNames[i].replaceAll(" ", "").toLowerCase());
|
||||
woolen_clay.carverHelper.registerAll(woolen_clay, "woolen_clay");
|
||||
+3
-4
@@ -1,5 +1,7 @@
|
||||
package com.cricketcraft.chisel.block;
|
||||
package team.chisel.block;
|
||||
|
||||
import team.chisel.Chisel;
|
||||
import team.chisel.block.tileentity.TileEntityAutoChisel;
|
||||
import net.minecraft.block.Block;
|
||||
import net.minecraft.block.BlockContainer;
|
||||
import net.minecraft.block.material.Material;
|
||||
@@ -8,9 +10,6 @@ import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.tileentity.TileEntity;
|
||||
import net.minecraft.world.World;
|
||||
|
||||
import com.cricketcraft.chisel.Chisel;
|
||||
import com.cricketcraft.chisel.block.tileentity.TileEntityAutoChisel;
|
||||
|
||||
public class BlockAutoChisel extends BlockContainer {
|
||||
|
||||
public BlockAutoChisel() {
|
||||
+1
-1
@@ -1,4 +1,4 @@
|
||||
package com.cricketcraft.chisel.block;
|
||||
package team.chisel.block;
|
||||
|
||||
import net.minecraft.block.material.Material;
|
||||
import net.minecraft.world.IBlockAccess;
|
||||
+12
-15
@@ -1,24 +1,21 @@
|
||||
package com.cricketcraft.chisel.block;
|
||||
package team.chisel.block;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import com.cricketcraft.chisel.api.ICarvable;
|
||||
import com.cricketcraft.chisel.api.carving.CarvableHelper;
|
||||
import com.cricketcraft.chisel.api.carving.IVariationInfo;
|
||||
import com.cricketcraft.chisel.api.rendering.ClientUtils;
|
||||
|
||||
import team.chisel.Chisel;
|
||||
import team.chisel.init.ChiselTabs;
|
||||
import net.minecraft.block.Block;
|
||||
import net.minecraft.block.material.Material;
|
||||
import net.minecraft.client.renderer.texture.IIconRegister;
|
||||
import net.minecraft.creativetab.CreativeTabs;
|
||||
import net.minecraft.item.Item;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.util.IIcon;
|
||||
import net.minecraft.world.IBlockAccess;
|
||||
|
||||
import com.cricketcraft.chisel.Chisel;
|
||||
import com.cricketcraft.chisel.api.ChiselAPIProps;
|
||||
import com.cricketcraft.chisel.api.ICarvable;
|
||||
import com.cricketcraft.chisel.api.carving.CarvableHelper;
|
||||
import com.cricketcraft.chisel.api.carving.IVariationInfo;
|
||||
import com.cricketcraft.chisel.init.ChiselTabs;
|
||||
import com.cricketcraft.ctmlib.ClientUtils;
|
||||
|
||||
import cpw.mods.fml.relauncher.Side;
|
||||
import cpw.mods.fml.relauncher.SideOnly;
|
||||
|
||||
@@ -73,6 +70,7 @@ public class BlockCarvable extends Block implements ICarvable {
|
||||
carverHelper.registerBlockIcons(Chisel.MOD_ID, this, register);
|
||||
}
|
||||
|
||||
@SuppressWarnings({ "unchecked", "rawtypes" })
|
||||
@Override
|
||||
public void getSubBlocks(Item item, CreativeTabs tabs, List list) {
|
||||
carverHelper.registerSubBlocks(this, tabs, list);
|
||||
@@ -84,13 +82,13 @@ public class BlockCarvable extends Block implements ICarvable {
|
||||
}
|
||||
|
||||
@Override
|
||||
public IVariationInfo getVariation(IBlockAccess world, int x, int y, int z, int metadata) {
|
||||
public IVariationInfo getManager(IBlockAccess world, int x, int y, int z, int metadata) {
|
||||
return carverHelper.getVariation(metadata);
|
||||
}
|
||||
|
||||
@Override
|
||||
public IVariationInfo getVariation(ItemStack stack) {
|
||||
return carverHelper.getVariation(stack.getItemDamage());
|
||||
public IVariationInfo getManager(int meta) {
|
||||
return carverHelper.getVariation(meta);
|
||||
}
|
||||
|
||||
public static class SoundType extends Block.SoundType {
|
||||
@@ -180,5 +178,4 @@ public class BlockCarvable extends Block implements ICarvable {
|
||||
return this.soundNamePlace;
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
+4
-4
@@ -1,11 +1,11 @@
|
||||
package com.cricketcraft.chisel.block;
|
||||
package team.chisel.block;
|
||||
|
||||
import com.cricketcraft.chisel.api.ICarvable;
|
||||
|
||||
import net.minecraft.block.material.Material;
|
||||
import net.minecraft.entity.EnumCreatureType;
|
||||
import net.minecraft.world.IBlockAccess;
|
||||
|
||||
import com.cricketcraft.chisel.api.ICarvable;
|
||||
|
||||
public class BlockCarvableAntiBlock extends BlockCarvableColor implements ICarvable {
|
||||
|
||||
public BlockCarvableAntiBlock() {
|
||||
@@ -14,6 +14,6 @@ public class BlockCarvableAntiBlock extends BlockCarvableColor implements ICarva
|
||||
|
||||
@Override
|
||||
public boolean canCreatureSpawn(EnumCreatureType type, IBlockAccess world, int x, int y, int z) {
|
||||
return false;
|
||||
return false;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,74 @@
|
||||
package team.chisel.block;
|
||||
|
||||
import com.cricketcraft.chisel.api.ICarvable;
|
||||
import com.cricketcraft.chisel.api.carving.CarvableHelper;
|
||||
import com.cricketcraft.chisel.api.carving.IVariationInfo;
|
||||
|
||||
import team.chisel.block.tileentity.TileEntityCarvableBeacon;
|
||||
import team.chisel.init.ChiselTabs;
|
||||
import net.minecraft.block.BlockBeacon;
|
||||
import net.minecraft.entity.EntityLivingBase;
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.tileentity.TileEntity;
|
||||
import net.minecraft.world.IBlockAccess;
|
||||
import net.minecraft.world.World;
|
||||
|
||||
public class BlockCarvableBeacon extends BlockBeacon implements ICarvable {
|
||||
|
||||
public static int renderId;
|
||||
|
||||
public CarvableHelper carverHelper;
|
||||
|
||||
public BlockCarvableBeacon() {
|
||||
super();
|
||||
setCreativeTab(ChiselTabs.tabOtherChiselBlocks);
|
||||
setLightLevel(5.0F);
|
||||
setBlockTextureName("beacon");
|
||||
carverHelper = new CarvableHelper(this);
|
||||
}
|
||||
|
||||
@Override
|
||||
public TileEntity createNewTileEntity(World world, int meta) {
|
||||
return new TileEntityCarvableBeacon();
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean onBlockActivated(World world, int x, int y, int z, EntityPlayer player, int par5, float hitX, float hitY, float hitZ) {
|
||||
if (world.isRemote) {
|
||||
return true;
|
||||
} else {
|
||||
TileEntityCarvableBeacon tileentitybeacon = (TileEntityCarvableBeacon) world.getTileEntity(x, y, z);
|
||||
|
||||
if (tileentitybeacon != null) {
|
||||
player.func_146104_a(tileentitybeacon);
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public int getRenderType() {
|
||||
return renderId;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onBlockPlacedBy(World world, int x, int y, int z, EntityLivingBase player, ItemStack stack) {
|
||||
super.onBlockPlacedBy(world, x, y, z, player, stack);
|
||||
|
||||
if (stack.hasDisplayName()) {
|
||||
((TileEntityCarvableBeacon) world.getTileEntity(x, y, z)).func_145999_a(stack.getDisplayName());
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public IVariationInfo getManager(IBlockAccess world, int x, int y, int z, int metadata) {
|
||||
return carverHelper.getVariation(metadata);
|
||||
}
|
||||
|
||||
@Override
|
||||
public IVariationInfo getManager(int meta) {
|
||||
return carverHelper.getVariation(meta);
|
||||
}
|
||||
}
|
||||
+10
-5
@@ -1,4 +1,4 @@
|
||||
package com.cricketcraft.chisel.block;
|
||||
package team.chisel.block;
|
||||
|
||||
import java.util.Random;
|
||||
|
||||
@@ -44,10 +44,15 @@ public class BlockCarvableBookshelf extends BlockCarvable {
|
||||
return Items.book;
|
||||
}
|
||||
|
||||
@Override
|
||||
public int damageDropped(int damage){
|
||||
return 0;
|
||||
}
|
||||
@Override
|
||||
public int damageDropped(int damage) {
|
||||
return 0;
|
||||
}
|
||||
|
||||
@Override
|
||||
public int getDamageValue(World world, int x, int y, int z) {
|
||||
return world.getBlockMetadata(x, y, z);
|
||||
}
|
||||
|
||||
@Override
|
||||
public float getEnchantPowerBonus(World world, int x, int y, int z) {
|
||||
+11
-11
@@ -1,21 +1,20 @@
|
||||
package com.cricketcraft.chisel.block;
|
||||
package team.chisel.block;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import com.cricketcraft.chisel.api.ICarvable;
|
||||
import com.cricketcraft.chisel.api.carving.CarvableHelper;
|
||||
import com.cricketcraft.chisel.api.carving.IVariationInfo;
|
||||
import com.cricketcraft.chisel.api.rendering.ClientUtils;
|
||||
|
||||
import net.minecraft.block.BlockCarpet;
|
||||
import net.minecraft.block.material.Material;
|
||||
import net.minecraft.client.renderer.texture.IIconRegister;
|
||||
import net.minecraft.creativetab.CreativeTabs;
|
||||
import net.minecraft.item.Item;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.util.IIcon;
|
||||
import net.minecraft.world.IBlockAccess;
|
||||
|
||||
import com.cricketcraft.chisel.api.ICarvable;
|
||||
import com.cricketcraft.chisel.api.carving.CarvableHelper;
|
||||
import com.cricketcraft.chisel.api.carving.IVariationInfo;
|
||||
import com.cricketcraft.ctmlib.ClientUtils;
|
||||
|
||||
public class BlockCarvableCarpet extends BlockCarpet implements ICarvable {
|
||||
|
||||
public CarvableHelper carverHelper;
|
||||
@@ -44,23 +43,24 @@ public class BlockCarvableCarpet extends BlockCarpet implements ICarvable {
|
||||
carverHelper.registerBlockIcons("Chisel", this, register);
|
||||
}
|
||||
|
||||
@SuppressWarnings({ "unchecked", "rawtypes" })
|
||||
@Override
|
||||
public void getSubBlocks(Item item, CreativeTabs tabs, List list) {
|
||||
carverHelper.registerSubBlocks(this, tabs, list);
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public int getRenderType() {
|
||||
return ClientUtils.renderCTMId;
|
||||
}
|
||||
|
||||
@Override
|
||||
public IVariationInfo getVariation(IBlockAccess world, int x, int y, int z, int metadata) {
|
||||
public IVariationInfo getManager(IBlockAccess world, int x, int y, int z, int metadata) {
|
||||
return carverHelper.getVariation(metadata);
|
||||
}
|
||||
|
||||
@Override
|
||||
public IVariationInfo getVariation(ItemStack stack) {
|
||||
return carverHelper.getVariation(stack.getItemDamage());
|
||||
public IVariationInfo getManager(int meta) {
|
||||
return carverHelper.getVariation(meta);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,26 @@
|
||||
package team.chisel.block;
|
||||
|
||||
import net.minecraft.block.material.Material;
|
||||
import net.minecraft.world.World;
|
||||
import net.minecraftforge.common.util.ForgeDirection;
|
||||
|
||||
public class BlockCarvableColor extends BlockCarvable {
|
||||
|
||||
public BlockCarvableColor() {
|
||||
this(Material.rock);
|
||||
}
|
||||
|
||||
public BlockCarvableColor(Material m) {
|
||||
super(m);
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean recolourBlock(World world, int x, int y, int z, ForgeDirection side, int color) {
|
||||
int newColor = 15 - color;
|
||||
if (world.getBlockMetadata(x, y, z) != newColor) {
|
||||
world.setBlockMetadataWithNotify(x, y, z, newColor, 3);
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
}
|
||||
+11
-12
@@ -1,22 +1,20 @@
|
||||
package com.cricketcraft.chisel.block;
|
||||
package team.chisel.block;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import com.cricketcraft.chisel.api.ICarvable;
|
||||
import com.cricketcraft.chisel.api.carving.CarvableHelper;
|
||||
import com.cricketcraft.chisel.api.carving.IVariationInfo;
|
||||
import com.cricketcraft.chisel.api.rendering.ClientUtils;
|
||||
|
||||
import team.chisel.init.ChiselTabs;
|
||||
import net.minecraft.block.BlockGlass;
|
||||
import net.minecraft.block.material.Material;
|
||||
import net.minecraft.client.renderer.texture.IIconRegister;
|
||||
import net.minecraft.creativetab.CreativeTabs;
|
||||
import net.minecraft.item.Item;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.util.IIcon;
|
||||
import net.minecraft.world.IBlockAccess;
|
||||
|
||||
import com.cricketcraft.chisel.api.ICarvable;
|
||||
import com.cricketcraft.chisel.api.carving.CarvableHelper;
|
||||
import com.cricketcraft.chisel.api.carving.IVariationInfo;
|
||||
import com.cricketcraft.chisel.init.ChiselTabs;
|
||||
import com.cricketcraft.ctmlib.ClientUtils;
|
||||
|
||||
import cpw.mods.fml.relauncher.Side;
|
||||
import cpw.mods.fml.relauncher.SideOnly;
|
||||
|
||||
@@ -67,19 +65,20 @@ public class BlockCarvableGlass extends BlockGlass implements ICarvable {
|
||||
carverHelper.registerBlockIcons("Chisel", this, register);
|
||||
}
|
||||
|
||||
@SuppressWarnings({ "unchecked", "rawtypes" })
|
||||
@Override
|
||||
public void getSubBlocks(Item item, CreativeTabs tabs, List list) {
|
||||
carverHelper.registerSubBlocks(this, tabs, list);
|
||||
}
|
||||
|
||||
@Override
|
||||
public IVariationInfo getVariation(IBlockAccess world, int x, int y, int z, int metadata) {
|
||||
public IVariationInfo getManager(IBlockAccess world, int x, int y, int z, int metadata) {
|
||||
return carverHelper.getVariation(metadata);
|
||||
}
|
||||
|
||||
@Override
|
||||
public IVariationInfo getVariation(ItemStack stack) {
|
||||
return carverHelper.getVariation(stack.getItemDamage());
|
||||
public IVariationInfo getManager(int meta) {
|
||||
return carverHelper.getVariation(meta);
|
||||
}
|
||||
|
||||
@Override
|
||||
+6
-8
@@ -1,12 +1,10 @@
|
||||
package com.cricketcraft.chisel.block;
|
||||
package team.chisel.block;
|
||||
|
||||
import com.cricketcraft.chisel.client.render.SubmapManagerBase;
|
||||
import team.chisel.Chisel;
|
||||
import team.chisel.client.render.SubmapManagerBase;
|
||||
import net.minecraft.block.material.Material;
|
||||
import net.minecraft.client.renderer.texture.IIconRegister;
|
||||
import net.minecraft.util.IIcon;
|
||||
|
||||
import com.cricketcraft.chisel.Chisel;
|
||||
|
||||
import cpw.mods.fml.relauncher.Side;
|
||||
import cpw.mods.fml.relauncher.SideOnly;
|
||||
|
||||
@@ -29,7 +27,7 @@ public class BlockCarvableGlow extends BlockCarvableColor {
|
||||
this.glowTexturePath = glowTexture;
|
||||
}
|
||||
|
||||
public BlockCarvableGlow(Material material, String glowTexture, SubmapManagerBase submapManagerBase){
|
||||
public BlockCarvableGlow(Material material, String glowTexture, SubmapManagerBase submapManagerBase) {
|
||||
super(material);
|
||||
this.glowTexturePath = glowTexture;
|
||||
this.submapManagerBase = submapManagerBase;
|
||||
@@ -41,11 +39,11 @@ public class BlockCarvableGlow extends BlockCarvableColor {
|
||||
glowTexture = register.registerIcon(Chisel.MOD_ID + ":" + glowTexturePath);
|
||||
}
|
||||
|
||||
public boolean hasSubmapManager(){
|
||||
public boolean hasSubmapManager() {
|
||||
return submapManagerBase == null;
|
||||
}
|
||||
|
||||
public SubmapManagerBase getSubmapManager(){
|
||||
public SubmapManagerBase getSubmapManager() {
|
||||
return hasSubmapManager() ? submapManagerBase : null;
|
||||
}
|
||||
|
||||
+7
-7
@@ -1,4 +1,4 @@
|
||||
package com.cricketcraft.chisel.block;
|
||||
package team.chisel.block;
|
||||
|
||||
import java.util.Random;
|
||||
|
||||
@@ -32,11 +32,11 @@ public class BlockCarvableGlowstone extends BlockCarvable {
|
||||
public int damageDropped(int i) {
|
||||
return 0;
|
||||
}
|
||||
|
||||
@Override
|
||||
public ItemStack getPickBlock(MovingObjectPosition target, World world, int x, int y, int z, EntityPlayer player)
|
||||
{
|
||||
Block glowstone = world.getBlock(x, y, z);
|
||||
int meta = world.getBlockMetadata(x, y, z);
|
||||
return new ItemStack(Item.getItemFromBlock(glowstone), 1, meta);
|
||||
}
|
||||
public ItemStack getPickBlock(MovingObjectPosition target, World world, int x, int y, int z, EntityPlayer player) {
|
||||
Block glowstone = world.getBlock(x, y, z);
|
||||
int meta = world.getBlockMetadata(x, y, z);
|
||||
return new ItemStack(Item.getItemFromBlock(glowstone), 1, meta);
|
||||
}
|
||||
}
|
||||
+11
-11
@@ -1,24 +1,23 @@
|
||||
package com.cricketcraft.chisel.block;
|
||||
package team.chisel.block;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import com.cricketcraft.chisel.api.ICarvable;
|
||||
import com.cricketcraft.chisel.api.carving.CarvableHelper;
|
||||
import com.cricketcraft.chisel.api.carving.IVariationInfo;
|
||||
import com.cricketcraft.chisel.api.rendering.ClientUtils;
|
||||
|
||||
import net.minecraft.block.Block;
|
||||
import net.minecraft.block.BlockIce;
|
||||
import net.minecraft.client.renderer.texture.IIconRegister;
|
||||
import net.minecraft.creativetab.CreativeTabs;
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.item.Item;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.stats.StatList;
|
||||
import net.minecraft.util.IIcon;
|
||||
import net.minecraft.world.IBlockAccess;
|
||||
import net.minecraft.world.World;
|
||||
|
||||
import com.cricketcraft.chisel.api.ICarvable;
|
||||
import com.cricketcraft.chisel.api.carving.CarvableHelper;
|
||||
import com.cricketcraft.chisel.api.carving.IVariationInfo;
|
||||
import com.cricketcraft.ctmlib.ClientUtils;
|
||||
|
||||
public class BlockCarvableIce extends BlockIce implements ICarvable {
|
||||
|
||||
public CarvableHelper carverHelper;
|
||||
@@ -27,7 +26,7 @@ public class BlockCarvableIce extends BlockIce implements ICarvable {
|
||||
super();
|
||||
carverHelper = new CarvableHelper(this);
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public int getRenderType() {
|
||||
return ClientUtils.renderCTMId;
|
||||
@@ -43,6 +42,7 @@ public class BlockCarvableIce extends BlockIce implements ICarvable {
|
||||
carverHelper.registerBlockIcons("Chisel", this, register);
|
||||
}
|
||||
|
||||
@SuppressWarnings({ "unchecked", "rawtypes" })
|
||||
@Override
|
||||
public void getSubBlocks(Item item, CreativeTabs tabs, List list) {
|
||||
carverHelper.registerSubBlocks(this, tabs, list);
|
||||
@@ -64,12 +64,12 @@ public class BlockCarvableIce extends BlockIce implements ICarvable {
|
||||
}
|
||||
|
||||
@Override
|
||||
public IVariationInfo getVariation(IBlockAccess world, int x, int y, int z, int metadata) {
|
||||
public IVariationInfo getManager(IBlockAccess world, int x, int y, int z, int metadata) {
|
||||
return carverHelper.getVariation(metadata);
|
||||
}
|
||||
|
||||
@Override
|
||||
public IVariationInfo getVariation(ItemStack stack) {
|
||||
return carverHelper.getVariation(stack.getItemDamage());
|
||||
public IVariationInfo getManager(int meta) {
|
||||
return carverHelper.getVariation(meta);
|
||||
}
|
||||
}
|
||||
+4
-4
@@ -1,14 +1,14 @@
|
||||
package com.cricketcraft.chisel.block;
|
||||
package team.chisel.block;
|
||||
|
||||
import java.util.Random;
|
||||
|
||||
import com.cricketcraft.chisel.api.carving.CarvableHelper;
|
||||
|
||||
import team.chisel.init.ChiselBlocks;
|
||||
import net.minecraft.block.Block;
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.world.World;
|
||||
|
||||
import com.cricketcraft.chisel.api.carving.CarvableHelper;
|
||||
import com.cricketcraft.chisel.init.ChiselBlocks;
|
||||
|
||||
public class BlockCarvableIceStairs extends BlockCarvableStairs {
|
||||
|
||||
public BlockCarvableIceStairs(Block block, int meta, CarvableHelper helper) {
|
||||
+3
-6
@@ -1,4 +1,4 @@
|
||||
package com.cricketcraft.chisel.block;
|
||||
package team.chisel.block;
|
||||
|
||||
import java.util.Random;
|
||||
|
||||
@@ -63,12 +63,9 @@ public class BlockCarvableLamp extends BlockCarvable {
|
||||
}
|
||||
|
||||
/*
|
||||
* @Override public void updateTick(World world, int x, int y, int z, Random
|
||||
* rand){ if (world.isRemote) return;
|
||||
* @Override public void updateTick(World world, int x, int y, int z, Random rand){ if (world.isRemote) return;
|
||||
*
|
||||
* if(powered && !world.isBlockIndirectlyGettingPowered(x, y, z)){ int
|
||||
* meta=world.getBlockMetadata(x, y, z); world.setBlock(x, y, z,
|
||||
* Block.redstoneLampIdle.blockID, meta, 2); } }
|
||||
* if(powered && !world.isBlockIndirectlyGettingPowered(x, y, z)){ int meta=world.getBlockMetadata(x, y, z); world.setBlock(x, y, z, Block.redstoneLampIdle.blockID, meta, 2); } }
|
||||
*/
|
||||
|
||||
@Override
|
||||
+6
-4
@@ -1,15 +1,14 @@
|
||||
package com.cricketcraft.chisel.block;
|
||||
package team.chisel.block;
|
||||
|
||||
import team.chisel.Chisel;
|
||||
import net.minecraft.block.material.Material;
|
||||
import net.minecraft.client.renderer.texture.IIconRegister;
|
||||
import net.minecraft.util.IIcon;
|
||||
|
||||
import com.cricketcraft.chisel.Chisel;
|
||||
|
||||
import cpw.mods.fml.relauncher.Side;
|
||||
import cpw.mods.fml.relauncher.SideOnly;
|
||||
|
||||
public class BlockCarvableLayered extends BlockCarvable {
|
||||
|
||||
@SideOnly(Side.CLIENT)
|
||||
private IIcon baseTexture;
|
||||
private String baseTexLocation;
|
||||
@@ -18,14 +17,17 @@ public class BlockCarvableLayered extends BlockCarvable {
|
||||
super(mat);
|
||||
this.baseTexLocation = baseTexLocation;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void registerBlockIcons(IIconRegister register) {
|
||||
super.registerBlockIcons(register);
|
||||
baseTexture = register.registerIcon(Chisel.MOD_ID + ":" + baseTexLocation);
|
||||
}
|
||||
|
||||
public IIcon getBaseTex() {
|
||||
return baseTexture;
|
||||
}
|
||||
|
||||
@Override
|
||||
public int getRenderType() {
|
||||
return Chisel.renderLayeredId;
|
||||
+11
-11
@@ -1,8 +1,13 @@
|
||||
package com.cricketcraft.chisel.block;
|
||||
package team.chisel.block;
|
||||
|
||||
import java.util.List;
|
||||
import java.util.Random;
|
||||
|
||||
import com.cricketcraft.chisel.api.ICarvable;
|
||||
import com.cricketcraft.chisel.api.carving.CarvableHelper;
|
||||
import com.cricketcraft.chisel.api.carving.IVariationInfo;
|
||||
import com.cricketcraft.chisel.api.rendering.ClientUtils;
|
||||
|
||||
import net.minecraft.block.Block;
|
||||
import net.minecraft.block.material.Material;
|
||||
import net.minecraft.client.renderer.texture.IIconRegister;
|
||||
@@ -10,17 +15,11 @@ import net.minecraft.creativetab.CreativeTabs;
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.init.Blocks;
|
||||
import net.minecraft.item.Item;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.stats.StatList;
|
||||
import net.minecraft.util.IIcon;
|
||||
import net.minecraft.world.IBlockAccess;
|
||||
import net.minecraft.world.World;
|
||||
|
||||
import com.cricketcraft.chisel.api.ICarvable;
|
||||
import com.cricketcraft.chisel.api.carving.CarvableHelper;
|
||||
import com.cricketcraft.chisel.api.carving.IVariationInfo;
|
||||
import com.cricketcraft.ctmlib.ClientUtils;
|
||||
|
||||
public class BlockCarvablePackedIce extends Block implements ICarvable {
|
||||
|
||||
public CarvableHelper carverHelper;
|
||||
@@ -35,7 +34,7 @@ public class BlockCarvablePackedIce extends Block implements ICarvable {
|
||||
public int getRenderType() {
|
||||
return ClientUtils.renderCTMId;
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public IIcon getIcon(int side, int metadata) {
|
||||
return carverHelper.getIcon(side, metadata);
|
||||
@@ -51,6 +50,7 @@ public class BlockCarvablePackedIce extends Block implements ICarvable {
|
||||
carverHelper.registerBlockIcons("Chisel", this, register);
|
||||
}
|
||||
|
||||
@SuppressWarnings({ "unchecked", "rawtypes" })
|
||||
@Override
|
||||
public void getSubBlocks(Item item, CreativeTabs tabs, List list) {
|
||||
carverHelper.registerSubBlocks(this, tabs, list);
|
||||
@@ -72,12 +72,12 @@ public class BlockCarvablePackedIce extends Block implements ICarvable {
|
||||
}
|
||||
|
||||
@Override
|
||||
public IVariationInfo getVariation(IBlockAccess world, int x, int y, int z, int metadata) {
|
||||
public IVariationInfo getManager(IBlockAccess world, int x, int y, int z, int metadata) {
|
||||
return carverHelper.getVariation(metadata);
|
||||
}
|
||||
|
||||
@Override
|
||||
public IVariationInfo getVariation(ItemStack stack) {
|
||||
return carverHelper.getVariation(stack.getItemDamage());
|
||||
public IVariationInfo getManager(int meta) {
|
||||
return carverHelper.getVariation(meta);
|
||||
}
|
||||
}
|
||||
+4
-4
@@ -1,14 +1,14 @@
|
||||
package com.cricketcraft.chisel.block;
|
||||
package team.chisel.block;
|
||||
|
||||
import java.util.Random;
|
||||
|
||||
import com.cricketcraft.chisel.api.carving.CarvableHelper;
|
||||
|
||||
import team.chisel.init.ChiselBlocks;
|
||||
import net.minecraft.block.Block;
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.world.World;
|
||||
|
||||
import com.cricketcraft.chisel.api.carving.CarvableHelper;
|
||||
import com.cricketcraft.chisel.init.ChiselBlocks;
|
||||
|
||||
public class BlockCarvablePackedIceStairs extends BlockCarvableStairs {
|
||||
|
||||
public BlockCarvablePackedIceStairs(Block block, int meta, CarvableHelper helper) {
|
||||
+11
-12
@@ -1,22 +1,20 @@
|
||||
package com.cricketcraft.chisel.block;
|
||||
package team.chisel.block;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import com.cricketcraft.chisel.api.ICarvable;
|
||||
import com.cricketcraft.chisel.api.carving.CarvableHelper;
|
||||
import com.cricketcraft.chisel.api.carving.IVariationInfo;
|
||||
|
||||
import team.chisel.client.render.RendererCTMPane;
|
||||
import team.chisel.init.ChiselTabs;
|
||||
import net.minecraft.block.BlockPane;
|
||||
import net.minecraft.block.material.Material;
|
||||
import net.minecraft.client.renderer.texture.IIconRegister;
|
||||
import net.minecraft.creativetab.CreativeTabs;
|
||||
import net.minecraft.item.Item;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.util.IIcon;
|
||||
import net.minecraft.world.IBlockAccess;
|
||||
|
||||
import com.cricketcraft.chisel.api.ICarvable;
|
||||
import com.cricketcraft.chisel.api.carving.CarvableHelper;
|
||||
import com.cricketcraft.chisel.api.carving.IVariationInfo;
|
||||
import com.cricketcraft.chisel.client.render.RendererCTMPane;
|
||||
import com.cricketcraft.chisel.init.ChiselTabs;
|
||||
|
||||
import cpw.mods.fml.relauncher.Side;
|
||||
import cpw.mods.fml.relauncher.SideOnly;
|
||||
|
||||
@@ -64,18 +62,19 @@ public class BlockCarvablePane extends BlockPane implements ICarvable {
|
||||
carverHelper.registerBlockIcons("Chisel", this, register);
|
||||
}
|
||||
|
||||
@SuppressWarnings({ "unchecked", "rawtypes" })
|
||||
@Override
|
||||
public void getSubBlocks(Item item, CreativeTabs tabs, List list) {
|
||||
carverHelper.registerSubBlocks(this, tabs, list);
|
||||
}
|
||||
|
||||
@Override
|
||||
public IVariationInfo getVariation(IBlockAccess world, int x, int y, int z, int metadata) {
|
||||
public IVariationInfo getManager(IBlockAccess world, int x, int y, int z, int metadata) {
|
||||
return carverHelper.getVariation(metadata);
|
||||
}
|
||||
|
||||
@Override
|
||||
public IVariationInfo getVariation(ItemStack stack) {
|
||||
return carverHelper.getVariation(stack.getItemDamage());
|
||||
public IVariationInfo getManager(int meta) {
|
||||
return carverHelper.getVariation(meta);
|
||||
}
|
||||
}
|
||||
+4
-8
@@ -1,4 +1,4 @@
|
||||
package com.cricketcraft.chisel.block;
|
||||
package team.chisel.block;
|
||||
|
||||
import net.minecraft.block.material.Material;
|
||||
import net.minecraft.world.IBlockAccess;
|
||||
@@ -10,8 +10,7 @@ public class BlockCarvablePowered extends BlockCarvable {
|
||||
}
|
||||
|
||||
/**
|
||||
* Can this block provide power. Only wire currently seems to have this
|
||||
* change based on its state.
|
||||
* Can this block provide power. Only wire currently seems to have this change based on its state.
|
||||
*/
|
||||
@Override
|
||||
public boolean canProvidePower() {
|
||||
@@ -19,11 +18,8 @@ public class BlockCarvablePowered extends BlockCarvable {
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns true if the block is emitting indirect/weak redstone power on the
|
||||
* specified side. If isBlockNormalCube returns true, standard redstone
|
||||
* propagation rules will apply instead and this will not be called. Args:
|
||||
* World, X, Y, Z, side. Note that the side is reversed - eg it is 1 (up)
|
||||
* when checking the bottom of the block.
|
||||
* Returns true if the block is emitting indirect/weak redstone power on the specified side. If isBlockNormalCube returns true, standard redstone propagation rules will apply instead and this will
|
||||
* not be called. Args: World, X, Y, Z, side. Note that the side is reversed - eg it is 1 (up) when checking the bottom of the block.
|
||||
*/
|
||||
@Override
|
||||
public int isProvidingWeakPower(IBlockAccess par1IBlockAccess, int par2, int par3, int par4, int par5) {
|
||||
@@ -0,0 +1,125 @@
|
||||
package team.chisel.block;
|
||||
|
||||
import com.cricketcraft.chisel.api.ICarvable;
|
||||
import com.cricketcraft.chisel.api.carving.CarvableHelper;
|
||||
import com.cricketcraft.chisel.api.carving.IVariationInfo;
|
||||
|
||||
import team.chisel.Chisel;
|
||||
import team.chisel.entity.EntityChiselSnowman;
|
||||
import net.minecraft.block.Block;
|
||||
import net.minecraft.block.BlockPumpkin;
|
||||
import net.minecraft.client.renderer.texture.IIconRegister;
|
||||
import net.minecraft.entity.monster.EntityIronGolem;
|
||||
import net.minecraft.init.Blocks;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.util.IIcon;
|
||||
import net.minecraft.world.IBlockAccess;
|
||||
import net.minecraft.world.World;
|
||||
import cpw.mods.fml.relauncher.Side;
|
||||
import cpw.mods.fml.relauncher.SideOnly;
|
||||
|
||||
public class BlockCarvablePumpkin extends BlockPumpkin implements ICarvable {
|
||||
|
||||
public CarvableHelper carverHelper;
|
||||
|
||||
@SideOnly(Side.CLIENT)
|
||||
private IIcon top, face;
|
||||
|
||||
private String faceLocation;
|
||||
|
||||
public BlockCarvablePumpkin(boolean isOn) {
|
||||
super(isOn);
|
||||
this.setStepSound(Block.soundTypeWood);
|
||||
if (isOn)
|
||||
setLightLevel(10.0F);
|
||||
carverHelper = new CarvableHelper(this);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onBlockAdded(World world, int x, int y, int z) {
|
||||
if (world.getBlock(x, y - 1, z) == Blocks.snow && world.getBlock(x, y - 2, z) == Blocks.snow) {
|
||||
if (!world.isRemote) {
|
||||
// Let's grab the pumpkin before we start
|
||||
ItemStack pumpkin = new ItemStack(world.getBlock(x, y, z), world.getBlockMetadata(x, y, z));
|
||||
|
||||
world.setBlock(x, y, z, Blocks.air, 0, 2);
|
||||
world.setBlock(x, y - 1, z, Blocks.air, 0, 2);
|
||||
world.setBlock(x, y - 2, z, Blocks.air, 0, 2);
|
||||
EntityChiselSnowman snowman = new EntityChiselSnowman(world);
|
||||
snowman.setCurrentItemOrArmor(2, pumpkin);
|
||||
snowman.setLocationAndAngles(x + 0.5D, y - 1.95D, z + 0.5D, 0.0F, 0.0F);
|
||||
world.spawnEntityInWorld(snowman);
|
||||
world.notifyBlockChange(x, y, z, Blocks.air);
|
||||
world.notifyBlockChange(x, y - 1, z, Blocks.air);
|
||||
world.notifyBlockChange(x, y - 2, z, Blocks.air);
|
||||
}
|
||||
|
||||
// Spawn some lovely particles
|
||||
for (int c = 0; c < 120; ++c) {
|
||||
world.spawnParticle("snowshovel", x + world.rand.nextDouble(), y - 2 + world.rand.nextDouble() * 2.5D, z + world.rand.nextDouble(), 0.0D, 0.0D, 0.0D);
|
||||
}
|
||||
} else if (world.getBlock(x, y - 1, z) == Blocks.iron_block || world.getBlock(x, y - 2, z) == Blocks.iron_block) {
|
||||
boolean flag = world.getBlock(x - 1, y - 1, z) == Blocks.iron_block && world.getBlock(x + 1, y - 1, z) == Blocks.iron_block;
|
||||
boolean flag1 = world.getBlock(x, y - 1, z - 1) == Blocks.iron_block && world.getBlock(x, y - 1, z + 1) == Blocks.iron_block;
|
||||
|
||||
if (flag || flag1) {
|
||||
world.setBlock(x, y, z, Blocks.air, 0, 2);
|
||||
world.setBlock(x, y - 1, z, Blocks.air, 0, 2);
|
||||
world.setBlock(x, y - 2, z, Blocks.air, 0, 2);
|
||||
|
||||
if (flag) {
|
||||
world.setBlock(x - 1, y - 1, z, Blocks.air, 0, 2);
|
||||
world.setBlock(x + 1, y - 1, z, Blocks.air, 0, 2);
|
||||
} else {
|
||||
world.setBlock(x, y - 1, z - 1, Blocks.air, 0, 2);
|
||||
world.setBlock(x, y - 1, z + 1, Blocks.air, 0, 2);
|
||||
}
|
||||
|
||||
EntityIronGolem ironGolem = new EntityIronGolem(world);
|
||||
ironGolem.setPlayerCreated(true);
|
||||
ironGolem.setLocationAndAngles(x + 0.5D, y - 1.95D, z + 0.5D, 0.0F, 0.0F);
|
||||
world.spawnEntityInWorld(ironGolem);
|
||||
|
||||
world.notifyBlockChange(x, y, z, Blocks.air);
|
||||
world.notifyBlockChange(x, y - 1, z, Blocks.air);
|
||||
world.notifyBlockChange(x, y - 2, z, Blocks.air);
|
||||
|
||||
if (flag) {
|
||||
world.notifyBlockChange(x - 1, y - 1, z, Blocks.air);
|
||||
world.notifyBlockChange(x + 1, y - 1, z, Blocks.air);
|
||||
} else {
|
||||
world.notifyBlockChange(x, y - 1, z - 1, Blocks.air);
|
||||
world.notifyBlockChange(x, y - 1, z + 1, Blocks.air);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
@SideOnly(Side.CLIENT)
|
||||
public IIcon getIcon(int side, int meta) {
|
||||
return side == 1 ? top : (side == 0 ? top : (meta == 2 && side == 2 ? face : (meta == 3 && side == 5 ? face
|
||||
: (meta == 0 && side == 3 ? face : (meta == 1 && side == 4 ? face : this.blockIcon)))));
|
||||
}
|
||||
|
||||
@Override
|
||||
public void registerBlockIcons(IIconRegister icon) {
|
||||
top = icon.registerIcon(Chisel.MOD_ID + ":pumpkin/pumpkin_top");
|
||||
face = icon.registerIcon(Chisel.MOD_ID + ":" + faceLocation);
|
||||
this.blockIcon = icon.registerIcon(Chisel.MOD_ID + ":pumpkin/pumpkin_side");
|
||||
}
|
||||
|
||||
@Override
|
||||
public IVariationInfo getManager(IBlockAccess world, int x, int y, int z, int metadata) {
|
||||
return carverHelper.getVariation(metadata);
|
||||
}
|
||||
|
||||
@Override
|
||||
public IVariationInfo getManager(int meta) {
|
||||
return carverHelper.getVariation(meta);
|
||||
}
|
||||
|
||||
public void setInformation(String textureLocation) {
|
||||
this.faceLocation = textureLocation;
|
||||
}
|
||||
}
|
||||
+12
-13
@@ -1,23 +1,21 @@
|
||||
package com.cricketcraft.chisel.block;
|
||||
package team.chisel.block;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import com.cricketcraft.chisel.api.ICarvable;
|
||||
import com.cricketcraft.chisel.api.carving.CarvableHelper;
|
||||
import com.cricketcraft.chisel.api.carving.IVariationInfo;
|
||||
import com.cricketcraft.chisel.api.rendering.ClientUtils;
|
||||
|
||||
import team.chisel.Chisel;
|
||||
import team.chisel.init.ChiselTabs;
|
||||
import net.minecraft.block.Block;
|
||||
import net.minecraft.block.BlockSand;
|
||||
import net.minecraft.client.renderer.texture.IIconRegister;
|
||||
import net.minecraft.creativetab.CreativeTabs;
|
||||
import net.minecraft.item.Item;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.util.IIcon;
|
||||
import net.minecraft.world.IBlockAccess;
|
||||
|
||||
import com.cricketcraft.chisel.Chisel;
|
||||
import com.cricketcraft.chisel.api.ICarvable;
|
||||
import com.cricketcraft.chisel.api.carving.CarvableHelper;
|
||||
import com.cricketcraft.chisel.api.carving.IVariationInfo;
|
||||
import com.cricketcraft.chisel.init.ChiselTabs;
|
||||
import com.cricketcraft.ctmlib.ClientUtils;
|
||||
|
||||
import cpw.mods.fml.relauncher.Side;
|
||||
import cpw.mods.fml.relauncher.SideOnly;
|
||||
|
||||
@@ -63,6 +61,7 @@ public class BlockCarvableSand extends BlockSand implements ICarvable {
|
||||
carverHelper.registerBlockIcons("Chisel", this, register);
|
||||
}
|
||||
|
||||
@SuppressWarnings({ "unchecked", "rawtypes" })
|
||||
@Override
|
||||
public void getSubBlocks(Item item, CreativeTabs tabs, List list) {
|
||||
carverHelper.registerSubBlocks(this, tabs, list);
|
||||
@@ -74,13 +73,13 @@ public class BlockCarvableSand extends BlockSand implements ICarvable {
|
||||
}
|
||||
|
||||
@Override
|
||||
public IVariationInfo getVariation(IBlockAccess world, int x, int y, int z, int metadata) {
|
||||
public IVariationInfo getManager(IBlockAccess world, int x, int y, int z, int metadata) {
|
||||
return carverHelper.getVariation(metadata);
|
||||
}
|
||||
|
||||
@Override
|
||||
public IVariationInfo getVariation(ItemStack stack) {
|
||||
return carverHelper.getVariation(stack.getItemDamage());
|
||||
public IVariationInfo getManager(int meta) {
|
||||
return carverHelper.getVariation(meta);
|
||||
}
|
||||
|
||||
public static class SoundType extends Block.SoundType {
|
||||
+21
-15
@@ -1,4 +1,4 @@
|
||||
package com.cricketcraft.chisel.block;
|
||||
package team.chisel.block;
|
||||
|
||||
import java.util.List;
|
||||
import java.util.Random;
|
||||
@@ -16,7 +16,6 @@ import net.minecraft.world.World;
|
||||
import net.minecraftforge.common.util.ForgeDirection;
|
||||
import cpw.mods.fml.relauncher.Side;
|
||||
import cpw.mods.fml.relauncher.SideOnly;
|
||||
|
||||
import static net.minecraftforge.common.util.ForgeDirection.UP;
|
||||
|
||||
public class BlockCarvableSlab extends BlockCarvable {
|
||||
@@ -63,6 +62,7 @@ public class BlockCarvableSlab extends BlockCarvable {
|
||||
setBlockBounds(0.0F, 0.0F, 0.0F, 1.0F, 0.5F, 1.0F);
|
||||
}
|
||||
|
||||
@SuppressWarnings("rawtypes")
|
||||
@Override
|
||||
public void addCollisionBoxesToList(World par1World, int par2, int par3, int par4, AxisAlignedBB par5AxisAlignedBB, List par6List, Entity par7Entity) {
|
||||
setBlockBoundsBasedOnState(par1World, par2, par3, par4);
|
||||
@@ -101,25 +101,31 @@ public class BlockCarvableSlab extends BlockCarvable {
|
||||
// return master.getIcon(side, metadata);
|
||||
}
|
||||
|
||||
@SuppressWarnings("rawtypes")
|
||||
@Override
|
||||
public void getSubBlocks(Item block, CreativeTabs tabs, List list) {
|
||||
if (isBottom)
|
||||
super.getSubBlocks(block, tabs, list);
|
||||
}
|
||||
|
||||
/**
|
||||
* Checks if the block is a solid face on the given side, used by placement logic.
|
||||
*
|
||||
* @param world The current world
|
||||
* @param x X Position
|
||||
* @param y Y position
|
||||
* @param z Z position
|
||||
* @param side The side to check
|
||||
* @return True if the block is solid on the specified side.
|
||||
*/
|
||||
* Checks if the block is a solid face on the given side, used by placement logic.
|
||||
*
|
||||
* @param world
|
||||
* The current world
|
||||
* @param x
|
||||
* X Position
|
||||
* @param y
|
||||
* Y position
|
||||
* @param z
|
||||
* Z position
|
||||
* @param side
|
||||
* The side to check
|
||||
* @return True if the block is solid on the specified side.
|
||||
*/
|
||||
@Override
|
||||
public boolean isSideSolid(IBlockAccess world, int x, int y, int z, ForgeDirection side)
|
||||
{
|
||||
return !isBottom && (side == UP);
|
||||
}
|
||||
public boolean isSideSolid(IBlockAccess world, int x, int y, int z, ForgeDirection side) {
|
||||
return !isBottom && (side == UP);
|
||||
}
|
||||
|
||||
}
|
||||
+10
-10
@@ -1,7 +1,12 @@
|
||||
package com.cricketcraft.chisel.block;
|
||||
package team.chisel.block;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import com.cricketcraft.chisel.api.ICarvable;
|
||||
import com.cricketcraft.chisel.api.carving.CarvableHelper;
|
||||
import com.cricketcraft.chisel.api.carving.IVariationInfo;
|
||||
|
||||
import team.chisel.client.render.RendererStairs;
|
||||
import net.minecraft.block.Block;
|
||||
import net.minecraft.block.BlockStairs;
|
||||
import net.minecraft.client.renderer.texture.IIconRegister;
|
||||
@@ -14,11 +19,6 @@ import net.minecraft.util.MathHelper;
|
||||
import net.minecraft.world.IBlockAccess;
|
||||
import net.minecraft.world.World;
|
||||
|
||||
import com.cricketcraft.chisel.api.ICarvable;
|
||||
import com.cricketcraft.chisel.api.carving.CarvableHelper;
|
||||
import com.cricketcraft.chisel.api.carving.IVariationInfo;
|
||||
import com.cricketcraft.chisel.client.render.RendererStairs;
|
||||
|
||||
public class BlockCarvableStairs extends BlockStairs implements ICarvable {
|
||||
|
||||
CarvableHelper carverHelper;
|
||||
@@ -72,7 +72,7 @@ public class BlockCarvableStairs extends BlockStairs implements ICarvable {
|
||||
if (par6ItemStack.getItemDamage() >= 8) {
|
||||
meta += 8;
|
||||
}
|
||||
|
||||
|
||||
par1World.setBlockMetadataWithNotify(par2, par3, par4, meta, 2);
|
||||
}
|
||||
|
||||
@@ -82,12 +82,12 @@ public class BlockCarvableStairs extends BlockStairs implements ICarvable {
|
||||
}
|
||||
|
||||
@Override
|
||||
public IVariationInfo getVariation(IBlockAccess world, int x, int y, int z, int metadata) {
|
||||
public IVariationInfo getManager(IBlockAccess world, int x, int y, int z, int metadata) {
|
||||
return carverHelper.getVariation(blockMeta + (metadata / 8));
|
||||
}
|
||||
|
||||
@Override
|
||||
public IVariationInfo getVariation(ItemStack stack) {
|
||||
return carverHelper.getVariation(blockMeta + (stack.getItemDamage() / 8));
|
||||
public IVariationInfo getManager(int meta) {
|
||||
return carverHelper.getVariation(blockMeta + (meta / 8));
|
||||
}
|
||||
}
|
||||
+15
-16
@@ -1,19 +1,17 @@
|
||||
package com.cricketcraft.chisel.block;
|
||||
package team.chisel.block;
|
||||
|
||||
import java.util.Random;
|
||||
|
||||
import net.minecraft.block.BlockTorch;
|
||||
import net.minecraft.client.renderer.texture.IIconRegister;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.world.IBlockAccess;
|
||||
import net.minecraft.world.World;
|
||||
|
||||
import com.cricketcraft.chisel.Chisel;
|
||||
import com.cricketcraft.chisel.api.ICarvable;
|
||||
import com.cricketcraft.chisel.api.carving.CarvableHelper;
|
||||
import com.cricketcraft.chisel.api.carving.IVariationInfo;
|
||||
import com.cricketcraft.chisel.init.ChiselTabs;
|
||||
|
||||
import team.chisel.Chisel;
|
||||
import team.chisel.init.ChiselTabs;
|
||||
import net.minecraft.block.BlockTorch;
|
||||
import net.minecraft.client.renderer.texture.IIconRegister;
|
||||
import net.minecraft.world.IBlockAccess;
|
||||
import net.minecraft.world.World;
|
||||
import cpw.mods.fml.relauncher.Side;
|
||||
import cpw.mods.fml.relauncher.SideOnly;
|
||||
|
||||
@@ -35,32 +33,33 @@ public class BlockCarvableTorch extends BlockTorch implements ICarvable {
|
||||
}
|
||||
|
||||
@Override
|
||||
public IVariationInfo getVariation(IBlockAccess world, int x, int y, int z, int metadata) {
|
||||
public IVariationInfo getManager(IBlockAccess world, int x, int y, int z, int metadata) {
|
||||
return carverHelper.getVariation(metadata);
|
||||
}
|
||||
|
||||
@Override
|
||||
public IVariationInfo getVariation(ItemStack stack) {
|
||||
return carverHelper.getVariation(stack.getItemDamage());
|
||||
public IVariationInfo getManager(int meta) {
|
||||
return carverHelper.getVariation(meta);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void registerBlockIcons(IIconRegister icon) {
|
||||
this.blockIcon = icon.registerIcon(Chisel.MOD_ID + ":torch/" + texLocation);
|
||||
}
|
||||
|
||||
|
||||
public BlockCarvableTorch disableParticles() {
|
||||
this.emitsParticles = false;
|
||||
return this;
|
||||
}
|
||||
|
||||
@Override
|
||||
@SideOnly(Side.CLIENT)
|
||||
public void randomDisplayTick(World p_149734_1_, int p_149734_2_, int p_149734_3_, int p_149734_4_, Random p_149734_5_) {
|
||||
if (emitsParticles) {
|
||||
int l = p_149734_1_.getBlockMetadata(p_149734_2_, p_149734_3_, p_149734_4_);
|
||||
double d0 = (double) ((float) p_149734_2_ + 0.5F);
|
||||
double d1 = (double) ((float) p_149734_3_ + 0.7F);
|
||||
double d2 = (double) ((float) p_149734_4_ + 0.5F);
|
||||
double d0 = p_149734_2_ + 0.5F;
|
||||
double d1 = p_149734_3_ + 0.7F;
|
||||
double d2 = p_149734_4_ + 0.5F;
|
||||
double d3 = 0.2199999988079071D;
|
||||
double d4 = 0.27000001072883606D;
|
||||
|
||||
+4
-3
@@ -1,7 +1,9 @@
|
||||
package com.cricketcraft.chisel.block;
|
||||
package team.chisel.block;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import com.cricketcraft.chisel.api.carving.CarvableHelper;
|
||||
|
||||
import net.minecraft.block.Block;
|
||||
import net.minecraft.block.BlockWall;
|
||||
import net.minecraft.client.renderer.texture.IIconRegister;
|
||||
@@ -9,8 +11,6 @@ import net.minecraft.creativetab.CreativeTabs;
|
||||
import net.minecraft.item.Item;
|
||||
import net.minecraft.util.IIcon;
|
||||
|
||||
import com.cricketcraft.chisel.api.carving.CarvableHelper;
|
||||
|
||||
public class BlockCarvableWall extends BlockWall {
|
||||
|
||||
CarvableHelper carverHelper;
|
||||
@@ -36,6 +36,7 @@ public class BlockCarvableWall extends BlockWall {
|
||||
carverHelper.registerBlockIcons("Chisel", this, register);
|
||||
}
|
||||
|
||||
@SuppressWarnings({ "unchecked", "rawtypes" })
|
||||
@Override
|
||||
public void getSubBlocks(Item block, CreativeTabs tabs, List list) {
|
||||
carverHelper.registerSubBlocks(this, tabs, list);
|
||||
+3
-4
@@ -1,7 +1,8 @@
|
||||
package com.cricketcraft.chisel.block;
|
||||
package team.chisel.block;
|
||||
|
||||
import java.util.Random;
|
||||
|
||||
import team.chisel.config.Configurations;
|
||||
import net.minecraft.block.Block;
|
||||
import net.minecraft.block.material.Material;
|
||||
import net.minecraft.entity.Entity;
|
||||
@@ -9,9 +10,6 @@ import net.minecraft.item.Item;
|
||||
import net.minecraft.util.AxisAlignedBB;
|
||||
import net.minecraft.world.IBlockAccess;
|
||||
import net.minecraft.world.World;
|
||||
|
||||
import com.cricketcraft.chisel.config.Configurations;
|
||||
|
||||
import cpw.mods.fml.relauncher.Side;
|
||||
import cpw.mods.fml.relauncher.SideOnly;
|
||||
|
||||
@@ -43,6 +41,7 @@ public class BlockCloud extends BlockCarvable {
|
||||
return Configurations.ghostCloud ? 1 : 0;
|
||||
}
|
||||
|
||||
@Override
|
||||
@SideOnly(Side.CLIENT)
|
||||
public boolean shouldSideBeRendered(IBlockAccess world, int x, int y, int z, int side) {
|
||||
Block block = world.getBlock(x, y, z);
|
||||
+5
-7
@@ -1,12 +1,10 @@
|
||||
package com.cricketcraft.chisel.block;
|
||||
package team.chisel.block;
|
||||
|
||||
import team.chisel.client.GeneralChiselClient;
|
||||
import team.chisel.config.Configurations;
|
||||
import net.minecraft.entity.Entity;
|
||||
import net.minecraft.util.AxisAlignedBB;
|
||||
import net.minecraft.world.World;
|
||||
|
||||
import com.cricketcraft.chisel.client.GeneralChiselClient;
|
||||
import com.cricketcraft.chisel.config.Configurations;
|
||||
|
||||
import cpw.mods.fml.common.FMLCommonHandler;
|
||||
import cpw.mods.fml.relauncher.Side;
|
||||
|
||||
@@ -18,10 +16,10 @@ public class BlockConcrete extends BlockCarvable {
|
||||
|
||||
@Override
|
||||
public AxisAlignedBB getCollisionBoundingBoxFromPool(World par1World, int par2, int par3, int par4) {
|
||||
if(Configurations.fullBlockConcrete)
|
||||
if (Configurations.fullBlockConcrete)
|
||||
return AxisAlignedBB.getBoundingBox(par2, par3, par4, (par2 + 1), ((par3 + 1)), (par4 + 1));
|
||||
else
|
||||
return AxisAlignedBB.getBoundingBox(par2, par3, par4, (par2 + 1), ((par3 + 1) - 0.125F), (par4 + 1));
|
||||
return AxisAlignedBB.getBoundingBox(par2, par3, par4, (par2 + 1), ((par3 + 1) - 0.125F), (par4 + 1));
|
||||
}
|
||||
|
||||
@Override
|
||||
+2
-2
@@ -1,6 +1,6 @@
|
||||
package com.cricketcraft.chisel.block;
|
||||
package team.chisel.block;
|
||||
|
||||
import com.cricketcraft.chisel.Chisel;
|
||||
import team.chisel.Chisel;
|
||||
|
||||
public class BlockEldritch extends BlockCarvable {
|
||||
|
||||
+4
-5
@@ -1,16 +1,15 @@
|
||||
package com.cricketcraft.chisel.block;
|
||||
package team.chisel.block;
|
||||
|
||||
import java.util.Random;
|
||||
|
||||
import team.chisel.Chisel;
|
||||
import team.chisel.client.GeneralChiselClient;
|
||||
import team.chisel.utils.General;
|
||||
import net.minecraft.block.material.Material;
|
||||
import net.minecraft.client.renderer.texture.IIconRegister;
|
||||
import net.minecraft.util.IIcon;
|
||||
import net.minecraft.world.World;
|
||||
|
||||
import com.cricketcraft.chisel.Chisel;
|
||||
import com.cricketcraft.chisel.client.GeneralChiselClient;
|
||||
import com.cricketcraft.chisel.utils.General;
|
||||
|
||||
public class BlockGrimstone extends BlockCarvable {
|
||||
|
||||
public IIcon iconStar;
|
||||
+3
-4
@@ -1,15 +1,14 @@
|
||||
package com.cricketcraft.chisel.block;
|
||||
package team.chisel.block;
|
||||
|
||||
import java.util.Random;
|
||||
|
||||
import team.chisel.client.GeneralChiselClient;
|
||||
import team.chisel.utils.General;
|
||||
import net.minecraft.block.material.Material;
|
||||
import net.minecraft.client.renderer.texture.IIconRegister;
|
||||
import net.minecraft.util.IIcon;
|
||||
import net.minecraft.world.World;
|
||||
|
||||
import com.cricketcraft.chisel.client.GeneralChiselClient;
|
||||
import com.cricketcraft.chisel.utils.General;
|
||||
|
||||
public class BlockHolystone extends BlockCarvable {
|
||||
|
||||
public IIcon iconStar;
|
||||
+2
-3
@@ -1,12 +1,11 @@
|
||||
package com.cricketcraft.chisel.block;
|
||||
package team.chisel.block;
|
||||
|
||||
import java.util.Random;
|
||||
|
||||
import team.chisel.client.GeneralChiselClient;
|
||||
import net.minecraft.block.material.Material;
|
||||
import net.minecraft.world.World;
|
||||
|
||||
import com.cricketcraft.chisel.client.GeneralChiselClient;
|
||||
|
||||
public class BlockLavastone extends BlockMultiLayer {
|
||||
|
||||
public BlockLavastone(Material mat, String baseIcon) {
|
||||
+1
-1
@@ -1,4 +1,4 @@
|
||||
package com.cricketcraft.chisel.block;
|
||||
package team.chisel.block;
|
||||
|
||||
import net.minecraft.block.material.Material;
|
||||
import net.minecraft.init.Blocks;
|
||||
+9
-9
@@ -1,20 +1,19 @@
|
||||
package com.cricketcraft.chisel.block;
|
||||
package team.chisel.block;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import com.cricketcraft.chisel.api.ICarvable;
|
||||
import com.cricketcraft.chisel.api.carving.CarvableHelper;
|
||||
import com.cricketcraft.chisel.api.carving.IVariationInfo;
|
||||
|
||||
import net.minecraft.block.Block;
|
||||
import net.minecraft.block.material.Material;
|
||||
import net.minecraft.client.renderer.texture.IIconRegister;
|
||||
import net.minecraft.creativetab.CreativeTabs;
|
||||
import net.minecraft.item.Item;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.util.IIcon;
|
||||
import net.minecraft.world.IBlockAccess;
|
||||
|
||||
import com.cricketcraft.chisel.api.ICarvable;
|
||||
import com.cricketcraft.chisel.api.carving.CarvableHelper;
|
||||
import com.cricketcraft.chisel.api.carving.IVariationInfo;
|
||||
|
||||
public class BlockMultiLayer extends BlockMultiLayerBase implements ICarvable {
|
||||
|
||||
public CarvableHelper carverHelper;
|
||||
@@ -48,18 +47,19 @@ public class BlockMultiLayer extends BlockMultiLayerBase implements ICarvable {
|
||||
carverHelper.registerBlockIcons("Chisel", this, register);
|
||||
}
|
||||
|
||||
@SuppressWarnings({ "unchecked", "rawtypes" })
|
||||
@Override
|
||||
public void getSubBlocks(Item block, CreativeTabs tabs, List list) {
|
||||
carverHelper.registerSubBlocks(this, tabs, list);
|
||||
}
|
||||
|
||||
@Override
|
||||
public IVariationInfo getVariation(IBlockAccess world, int x, int y, int z, int metadata) {
|
||||
public IVariationInfo getManager(IBlockAccess world, int x, int y, int z, int metadata) {
|
||||
return carverHelper.getVariation(metadata);
|
||||
}
|
||||
|
||||
@Override
|
||||
public IVariationInfo getVariation(ItemStack stack) {
|
||||
return carverHelper.getVariation(stack.getItemDamage());
|
||||
public IVariationInfo getManager(int meta) {
|
||||
return carverHelper.getVariation(meta);
|
||||
}
|
||||
}
|
||||
+2
-3
@@ -1,13 +1,12 @@
|
||||
package com.cricketcraft.chisel.block;
|
||||
package team.chisel.block;
|
||||
|
||||
import team.chisel.client.render.RendererMultiLayer;
|
||||
import net.minecraft.block.Block;
|
||||
import net.minecraft.block.material.Material;
|
||||
import net.minecraft.client.renderer.texture.IIconRegister;
|
||||
import net.minecraft.util.IIcon;
|
||||
import net.minecraftforge.client.ForgeHooksClient;
|
||||
|
||||
import com.cricketcraft.chisel.client.render.RendererMultiLayer;
|
||||
|
||||
public abstract class BlockMultiLayerBase extends Block {
|
||||
|
||||
public Block base;
|
||||
+20
-19
@@ -1,7 +1,13 @@
|
||||
package com.cricketcraft.chisel.block;
|
||||
package team.chisel.block;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import com.cricketcraft.chisel.api.ICarvable;
|
||||
import com.cricketcraft.chisel.api.carving.CarvableHelper;
|
||||
import com.cricketcraft.chisel.api.carving.IVariationInfo;
|
||||
|
||||
import team.chisel.Chisel;
|
||||
import team.chisel.block.tileentity.TileEntityPresent;
|
||||
import net.minecraft.block.Block;
|
||||
import net.minecraft.block.material.Material;
|
||||
import net.minecraft.client.renderer.texture.IIconRegister;
|
||||
@@ -18,13 +24,6 @@ import net.minecraft.util.MovingObjectPosition;
|
||||
import net.minecraft.world.IBlockAccess;
|
||||
import net.minecraft.world.World;
|
||||
import net.minecraftforge.common.util.ForgeDirection;
|
||||
|
||||
import com.cricketcraft.chisel.Chisel;
|
||||
import com.cricketcraft.chisel.api.ICarvable;
|
||||
import com.cricketcraft.chisel.api.carving.CarvableHelper;
|
||||
import com.cricketcraft.chisel.api.carving.IVariationInfo;
|
||||
import com.cricketcraft.chisel.block.tileentity.TileEntityPresent;
|
||||
|
||||
import cpw.mods.fml.relauncher.Side;
|
||||
import cpw.mods.fml.relauncher.SideOnly;
|
||||
|
||||
@@ -118,16 +117,18 @@ public class BlockPresent extends Block implements ICarvable {
|
||||
|
||||
@Override
|
||||
public AxisAlignedBB getSelectedBoundingBoxFromPool(World world, int x, int y, int z) {
|
||||
if(world.getTileEntity(x, y, z) instanceof TileEntityPresent)
|
||||
return getBoundingBox((TileEntityPresent) world.getTileEntity(x, y, z));
|
||||
else return null;
|
||||
if (world.getTileEntity(x, y, z) instanceof TileEntityPresent)
|
||||
return getBoundingBox((TileEntityPresent) world.getTileEntity(x, y, z));
|
||||
else
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public AxisAlignedBB getCollisionBoundingBoxFromPool(World world, int x, int y, int z) {
|
||||
if(world.getTileEntity(x, y, z) instanceof TileEntityPresent)
|
||||
return getBoundingBox((TileEntityPresent) world.getTileEntity(x, y, z));
|
||||
else return null;
|
||||
if (world.getTileEntity(x, y, z) instanceof TileEntityPresent)
|
||||
return getBoundingBox((TileEntityPresent) world.getTileEntity(x, y, z));
|
||||
else
|
||||
return null;
|
||||
}
|
||||
|
||||
public AxisAlignedBB getBoundingBox(TileEntityPresent me) {
|
||||
@@ -147,8 +148,8 @@ public class BlockPresent extends Block implements ICarvable {
|
||||
return AxisAlignedBB.getBoundingBox(x + minX, y + minY, z + minZ, x + maxX, y + maxY, z + maxZ);
|
||||
}
|
||||
|
||||
public void setBlockBoundsBasedOnState(IBlockAccess world, int x, int y, int z)
|
||||
{
|
||||
@Override
|
||||
public void setBlockBoundsBasedOnState(IBlockAccess world, int x, int y, int z) {
|
||||
TileEntityPresent te = (TileEntityPresent) world.getTileEntity(x, y, z);
|
||||
if (!te.isConnected()) {
|
||||
setBlockBounds(0.0625F, 0, 0.0625F, 0.9375F, 0.875F, 0.9365F);
|
||||
@@ -215,12 +216,12 @@ public class BlockPresent extends Block implements ICarvable {
|
||||
}
|
||||
|
||||
@Override
|
||||
public IVariationInfo getVariation(IBlockAccess world, int x, int y, int z, int metadata) {
|
||||
public IVariationInfo getManager(IBlockAccess world, int x, int y, int z, int metadata) {
|
||||
return carverHelper.getVariation(metadata);
|
||||
}
|
||||
|
||||
@Override
|
||||
public IVariationInfo getVariation(ItemStack stack) {
|
||||
return carverHelper.getVariation(stack.getItemDamage());
|
||||
public IVariationInfo getManager(int meta) {
|
||||
return carverHelper.getVariation(meta);
|
||||
}
|
||||
}
|
||||
+3
-5
@@ -1,5 +1,7 @@
|
||||
package com.cricketcraft.chisel.block;
|
||||
package team.chisel.block;
|
||||
|
||||
import team.chisel.Chisel;
|
||||
import team.chisel.config.Configurations;
|
||||
import net.minecraft.block.Block;
|
||||
import net.minecraft.block.material.Material;
|
||||
import net.minecraft.client.renderer.texture.IIconRegister;
|
||||
@@ -8,10 +10,6 @@ import net.minecraft.util.AxisAlignedBB;
|
||||
import net.minecraft.util.IIcon;
|
||||
import net.minecraft.world.IBlockAccess;
|
||||
import net.minecraft.world.World;
|
||||
|
||||
import com.cricketcraft.chisel.Chisel;
|
||||
import com.cricketcraft.chisel.config.Configurations;
|
||||
|
||||
import cpw.mods.fml.relauncher.Side;
|
||||
import cpw.mods.fml.relauncher.SideOnly;
|
||||
|
||||
+3
-6
@@ -1,7 +1,8 @@
|
||||
package com.cricketcraft.chisel.block;
|
||||
package team.chisel.block;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import team.chisel.client.render.RendererSnakeStone;
|
||||
import net.minecraft.block.Block;
|
||||
import net.minecraft.block.material.Material;
|
||||
import net.minecraft.client.renderer.texture.IIconRegister;
|
||||
@@ -13,8 +14,6 @@ import net.minecraft.util.IIcon;
|
||||
import net.minecraft.util.MathHelper;
|
||||
import net.minecraft.world.World;
|
||||
|
||||
import com.cricketcraft.chisel.client.render.RendererSnakeStone;
|
||||
|
||||
public class BlockSnakestone extends Block {
|
||||
|
||||
static final int SEC_HEAD = 0;
|
||||
@@ -211,7 +210,6 @@ public class BlockSnakestone extends Block {
|
||||
public boolean rotateBodyPart(World world, int x, int y, int z) {
|
||||
int[] con = getConnections(world, x, y, z);
|
||||
int blockMeta = world.getBlockMetadata(x, y, z);
|
||||
int kind = blockMeta & 0xc;
|
||||
|
||||
if (con[1] == -1)
|
||||
return false;
|
||||
@@ -288,8 +286,6 @@ public class BlockSnakestone extends Block {
|
||||
|
||||
@Override
|
||||
public IIcon getIcon(int side, int meta) {
|
||||
int type = meta & 0xc;
|
||||
int orient = meta & 0x3;
|
||||
|
||||
switch (meta | (side << 4)) {
|
||||
|
||||
@@ -506,6 +502,7 @@ public class BlockSnakestone extends Block {
|
||||
return iconCross;
|
||||
}
|
||||
|
||||
@SuppressWarnings({ "unchecked", "rawtypes" })
|
||||
@Override
|
||||
public void getSubBlocks(Item item, CreativeTabs tabs, List list) {
|
||||
list.add(new ItemStack(item, 1, 1));
|
||||
+2
-3
@@ -1,13 +1,12 @@
|
||||
package com.cricketcraft.chisel.block;
|
||||
package team.chisel.block;
|
||||
|
||||
import java.util.Random;
|
||||
|
||||
import team.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;
|
||||
|
||||
public class BlockSnakestoneObsidian extends BlockSnakestone {
|
||||
|
||||
public static IIcon[] particles = new IIcon[8];
|
||||
+1
-1
@@ -1,4 +1,4 @@
|
||||
package com.cricketcraft.chisel.block;
|
||||
package team.chisel.block;
|
||||
|
||||
import net.minecraft.block.material.Material;
|
||||
|
||||
+5
-6
@@ -1,13 +1,12 @@
|
||||
package com.cricketcraft.chisel.block;
|
||||
|
||||
import com.cricketcraft.chisel.init.ChiselTabs;
|
||||
import net.minecraft.block.Block;
|
||||
import net.minecraft.item.ItemStack;
|
||||
package team.chisel.block;
|
||||
|
||||
import com.cricketcraft.chisel.api.carving.CarvableHelper;
|
||||
import com.cricketcraft.chisel.api.carving.IVariationInfo;
|
||||
import com.cricketcraft.chisel.item.ItemCarvable;
|
||||
|
||||
import team.chisel.init.ChiselTabs;
|
||||
import team.chisel.item.ItemCarvable;
|
||||
import net.minecraft.block.Block;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import cpw.mods.fml.common.registry.GameRegistry;
|
||||
|
||||
public class CarvableStairsMaker {
|
||||
+3
-3
@@ -1,9 +1,9 @@
|
||||
package com.cricketcraft.chisel.block;
|
||||
|
||||
import net.minecraft.block.Block;
|
||||
package team.chisel.block;
|
||||
|
||||
import com.cricketcraft.chisel.api.carving.CarvableHelper;
|
||||
|
||||
import net.minecraft.block.Block;
|
||||
|
||||
public interface IStairsCreator {
|
||||
|
||||
public BlockCarvableStairs create(Block block, int meta, CarvableHelper helper);
|
||||
+1
-1
@@ -1,4 +1,4 @@
|
||||
package com.cricketcraft.chisel.block.tileentity;
|
||||
package team.chisel.block.tileentity;
|
||||
|
||||
import net.minecraft.item.ItemStack;
|
||||
|
||||
+16
-13
@@ -1,7 +1,16 @@
|
||||
package com.cricketcraft.chisel.block.tileentity;
|
||||
package team.chisel.block.tileentity;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import com.cricketcraft.chisel.api.IChiselItem;
|
||||
|
||||
import team.chisel.carving.Carving;
|
||||
import team.chisel.client.GeneralChiselClient;
|
||||
import team.chisel.init.ChiselItems;
|
||||
import team.chisel.network.PacketHandler;
|
||||
import team.chisel.network.message.MessageAutoChisel;
|
||||
import team.chisel.network.message.MessageSlotUpdate;
|
||||
import team.chisel.utils.General;
|
||||
import net.minecraft.entity.item.EntityItem;
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.inventory.ISidedInventory;
|
||||
@@ -13,23 +22,16 @@ import net.minecraft.network.Packet;
|
||||
import net.minecraft.network.play.server.S35PacketUpdateTileEntity;
|
||||
import net.minecraft.tileentity.TileEntity;
|
||||
import net.minecraft.util.StatCollector;
|
||||
|
||||
import com.cricketcraft.chisel.api.IChiselItem;
|
||||
import com.cricketcraft.chisel.carving.Carving;
|
||||
import com.cricketcraft.chisel.client.GeneralChiselClient;
|
||||
import com.cricketcraft.chisel.init.ChiselItems;
|
||||
import com.cricketcraft.chisel.network.PacketHandler;
|
||||
import com.cricketcraft.chisel.network.message.MessageAutoChisel;
|
||||
import com.cricketcraft.chisel.network.message.MessageSlotUpdate;
|
||||
import com.cricketcraft.chisel.utils.General;
|
||||
|
||||
import cpw.mods.fml.relauncher.Side;
|
||||
import cpw.mods.fml.relauncher.SideOnly;
|
||||
|
||||
public class TileEntityAutoChisel extends TileEntity implements ISidedInventory {
|
||||
|
||||
public enum Upgrade {
|
||||
SPEED, AUTOMATION, STACK, REVERSION;
|
||||
SPEED,
|
||||
AUTOMATION,
|
||||
STACK,
|
||||
REVERSION;
|
||||
|
||||
public String getUnlocalizedName() {
|
||||
return ChiselItems.upgrade.getUnlocalizedName() + "_" + this.name().toLowerCase();
|
||||
@@ -178,7 +180,8 @@ public class TileEntityAutoChisel extends TileEntity implements ISidedInventory
|
||||
private ItemStack getTarget() {
|
||||
if (inventory[BASE] != null && hasUpgrade(Upgrade.REVERSION)) {
|
||||
// if we have a reversion upgrade, use that for the target
|
||||
return Carving.chisel.getItemsForChiseling(inventory[BASE]).get(0);
|
||||
List<ItemStack> possible = Carving.chisel.getItemsForChiseling(inventory[BASE]);
|
||||
return possible.isEmpty() ? null : possible.get(0);
|
||||
} else {
|
||||
return inventory[TARGET];
|
||||
}
|
||||
+9
-8
@@ -1,14 +1,15 @@
|
||||
package com.cricketcraft.chisel.block.tileentity;
|
||||
package team.chisel.block.tileentity;
|
||||
|
||||
import cpw.mods.fml.relauncher.Side;
|
||||
import cpw.mods.fml.relauncher.SideOnly;
|
||||
import net.minecraft.tileentity.TileEntityBeacon;
|
||||
import net.minecraft.util.AxisAlignedBB;
|
||||
import cpw.mods.fml.relauncher.Side;
|
||||
import cpw.mods.fml.relauncher.SideOnly;
|
||||
|
||||
public class TileEntityCarvableBeacon extends TileEntityBeacon {
|
||||
@Override
|
||||
@SideOnly(Side.CLIENT)
|
||||
public AxisAlignedBB getRenderBoundingBox() {
|
||||
return INFINITE_EXTENT_AABB;
|
||||
}
|
||||
|
||||
@Override
|
||||
@SideOnly(Side.CLIENT)
|
||||
public AxisAlignedBB getRenderBoundingBox() {
|
||||
return INFINITE_EXTENT_AABB;
|
||||
}
|
||||
}
|
||||
+8
-10
@@ -1,5 +1,8 @@
|
||||
package com.cricketcraft.chisel.block.tileentity;
|
||||
package team.chisel.block.tileentity;
|
||||
|
||||
import team.chisel.init.ChiselBlocks;
|
||||
import team.chisel.network.PacketHandler;
|
||||
import team.chisel.network.message.MessagePresentConnect;
|
||||
import net.minecraft.block.Block;
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.inventory.IInventory;
|
||||
@@ -14,10 +17,6 @@ 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, IDoubleChest {
|
||||
|
||||
private TileEntityPresent connection = null;
|
||||
@@ -34,7 +33,7 @@ public class TileEntityPresent extends TileEntity implements IInventory, IDouble
|
||||
if (!isConnected() && autoSearch && worldObj != null /* ugh */) {
|
||||
if (cachedDir != null) {
|
||||
connectTo(cachedDir);
|
||||
} else if (!worldObj.isRemote){
|
||||
} else if (!worldObj.isRemote) {
|
||||
findConnections();
|
||||
}
|
||||
autoSearch = false;
|
||||
@@ -46,7 +45,8 @@ public class TileEntityPresent extends TileEntity implements IInventory, IDouble
|
||||
}
|
||||
|
||||
private boolean connectTo(TileEntityPresent present, ForgeDirection dir) {
|
||||
if (present.getBlockMetadata() == getBlockMetadata() && !present.isConnected() && (present.cachedDir == null || present.cachedDir == dir.getOpposite()) && Math.abs(present.xCoord - xCoord + present.yCoord - yCoord + present.zCoord - zCoord) == 1) {
|
||||
if (present.getBlockMetadata() == getBlockMetadata() && !present.isConnected() && (present.cachedDir == null || present.cachedDir == dir.getOpposite())
|
||||
&& Math.abs(present.xCoord - xCoord + present.yCoord - yCoord + present.zCoord - zCoord) == 1) {
|
||||
connection = present;
|
||||
connection.connection = this;
|
||||
connection.cachedDir = dir.getOpposite();
|
||||
@@ -71,9 +71,7 @@ public class TileEntityPresent extends TileEntity implements IInventory, IDouble
|
||||
|
||||
/**
|
||||
* @param preserveDir
|
||||
* If true, this is only a virtual disconnect, meaning the other
|
||||
* chest still exists, but is still loaded, so maintain a
|
||||
* cachedDir for reconnection upon chunk load.
|
||||
* If true, this is only a virtual disconnect, meaning the other chest still exists, but is still loaded, so maintain a cachedDir for reconnection upon chunk load.
|
||||
*/
|
||||
public void disconnect(boolean preserveDir) {
|
||||
if (isConnected()) {
|
||||
+12
-11
@@ -1,33 +1,34 @@
|
||||
package com.cricketcraft.chisel.carving;
|
||||
package team.chisel.carving;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.Collections;
|
||||
import java.util.HashMap;
|
||||
import java.util.List;
|
||||
|
||||
import net.minecraft.block.Block;
|
||||
import net.minecraft.item.Item;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraftforge.oredict.OreDictionary;
|
||||
|
||||
import com.cricketcraft.chisel.Chisel;
|
||||
import com.cricketcraft.chisel.api.carving.CarvingUtils;
|
||||
import com.cricketcraft.chisel.api.carving.ICarvingGroup;
|
||||
import com.cricketcraft.chisel.api.carving.ICarvingRegistry;
|
||||
import com.cricketcraft.chisel.api.carving.ICarvingVariation;
|
||||
|
||||
import team.chisel.Chisel;
|
||||
import net.minecraft.block.Block;
|
||||
import net.minecraft.item.Item;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraftforge.oredict.OreDictionary;
|
||||
|
||||
public class Carving implements ICarvingRegistry {
|
||||
|
||||
GroupList groups = new GroupList();
|
||||
|
||||
public static final ICarvingRegistry chisel = new Carving();
|
||||
public static final Carving needle = new Carving();
|
||||
|
||||
|
||||
static {
|
||||
CarvingUtils.chisel = chisel;
|
||||
}
|
||||
|
||||
public static void construct() {}
|
||||
|
||||
public static void construct() {
|
||||
}
|
||||
|
||||
private Carving() {
|
||||
}
|
||||
@@ -142,7 +143,7 @@ public class Carving implements ICarvingRegistry {
|
||||
ICarvingGroup g = groups.getGroupByName(groupName);
|
||||
return groups.remove(g) ? g : null;
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public ICarvingVariation removeVariation(Block block, int metadata) {
|
||||
return removeVariation(block, metadata, null);
|
||||
+1
-1
@@ -1,4 +1,4 @@
|
||||
package com.cricketcraft.chisel.carving;
|
||||
package team.chisel.carving;
|
||||
|
||||
import java.util.Collection;
|
||||
import java.util.HashMap;
|
||||
+13
-14
@@ -1,7 +1,19 @@
|
||||
package com.cricketcraft.chisel.client;
|
||||
package team.chisel.client;
|
||||
|
||||
import java.util.Random;
|
||||
|
||||
import team.chisel.block.BlockGrimstone;
|
||||
import team.chisel.block.BlockHolystone;
|
||||
import team.chisel.block.BlockLavastone;
|
||||
import team.chisel.block.BlockSnakestoneObsidian;
|
||||
import team.chisel.block.tileentity.TileEntityAutoChisel;
|
||||
import team.chisel.carving.Carving;
|
||||
import team.chisel.config.Configurations;
|
||||
import team.chisel.entity.fx.EntityBallOMossFX;
|
||||
import team.chisel.entity.fx.EntityGrimstoneFX;
|
||||
import team.chisel.entity.fx.EntityHolystoneFX;
|
||||
import team.chisel.entity.fx.EntitySnakestoneObsidianFX;
|
||||
import team.chisel.utils.GeneralClient;
|
||||
import net.minecraft.block.Block;
|
||||
import net.minecraft.client.Minecraft;
|
||||
import net.minecraft.client.entity.EntityPlayerSP;
|
||||
@@ -12,19 +24,6 @@ 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;
|
||||
import com.cricketcraft.chisel.block.BlockSnakestoneObsidian;
|
||||
import com.cricketcraft.chisel.block.tileentity.TileEntityAutoChisel;
|
||||
import com.cricketcraft.chisel.carving.Carving;
|
||||
import com.cricketcraft.chisel.config.Configurations;
|
||||
import com.cricketcraft.chisel.entity.fx.EntityBallOMossFX;
|
||||
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;
|
||||
|
||||
public class GeneralChiselClient {
|
||||
|
||||
public static Random rand = new Random();
|
||||
+4
-3
@@ -1,4 +1,4 @@
|
||||
package com.cricketcraft.chisel.client.gui;
|
||||
package team.chisel.client.gui;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
@@ -11,8 +11,9 @@ import net.minecraft.util.StatCollector;
|
||||
|
||||
import org.lwjgl.opengl.GL11;
|
||||
|
||||
import com.cricketcraft.chisel.block.tileentity.TileEntityAutoChisel;
|
||||
import com.cricketcraft.chisel.inventory.ContainerAutoChisel;
|
||||
import team.chisel.block.tileentity.TileEntityAutoChisel;
|
||||
import team.chisel.inventory.ContainerAutoChisel;
|
||||
|
||||
import com.google.common.base.Strings;
|
||||
import com.google.common.collect.Lists;
|
||||
|
||||
+10
-9
@@ -1,4 +1,4 @@
|
||||
package com.cricketcraft.chisel.client.gui;
|
||||
package team.chisel.client.gui;
|
||||
|
||||
import net.minecraft.client.gui.GuiButton;
|
||||
import net.minecraft.client.gui.inventory.GuiContainer;
|
||||
@@ -13,14 +13,15 @@ import org.lwjgl.opengl.GL11;
|
||||
import com.cricketcraft.chisel.api.IAdvancedChisel;
|
||||
import com.cricketcraft.chisel.api.IChiselItem;
|
||||
import com.cricketcraft.chisel.api.carving.IChiselMode;
|
||||
import com.cricketcraft.chisel.inventory.ContainerChisel;
|
||||
import com.cricketcraft.chisel.inventory.InventoryChiselSelection;
|
||||
import com.cricketcraft.chisel.inventory.SlotChiselInput;
|
||||
import com.cricketcraft.chisel.item.chisel.ChiselMode;
|
||||
import com.cricketcraft.chisel.network.PacketHandler;
|
||||
import com.cricketcraft.chisel.network.message.MessageChiselMode;
|
||||
import com.cricketcraft.chisel.utils.General;
|
||||
import com.cricketcraft.chisel.utils.GeneralClient;
|
||||
|
||||
import team.chisel.inventory.ContainerChisel;
|
||||
import team.chisel.inventory.InventoryChiselSelection;
|
||||
import team.chisel.inventory.SlotChiselInput;
|
||||
import team.chisel.item.chisel.ChiselMode;
|
||||
import team.chisel.network.PacketHandler;
|
||||
import team.chisel.network.message.MessageChiselMode;
|
||||
import team.chisel.utils.General;
|
||||
import team.chisel.utils.GeneralClient;
|
||||
|
||||
public class GuiChisel extends GuiContainer {
|
||||
|
||||
+3
-5
@@ -1,13 +1,11 @@
|
||||
package com.cricketcraft.chisel.client.gui;
|
||||
package team.chisel.client.gui;
|
||||
|
||||
import team.chisel.Chisel;
|
||||
import team.chisel.config.Configurations;
|
||||
import net.minecraft.client.gui.GuiScreen;
|
||||
import net.minecraftforge.common.config.ConfigCategory;
|
||||
import net.minecraftforge.common.config.ConfigElement;
|
||||
import net.minecraftforge.common.config.Configuration;
|
||||
|
||||
import com.cricketcraft.chisel.Chisel;
|
||||
import com.cricketcraft.chisel.config.Configurations;
|
||||
|
||||
import cpw.mods.fml.client.config.GuiConfig;
|
||||
|
||||
public class GuiChiselConfig extends GuiConfig {
|
||||
+1
-1
@@ -1,4 +1,4 @@
|
||||
package com.cricketcraft.chisel.client.gui;
|
||||
package team.chisel.client.gui;
|
||||
|
||||
import java.util.Set;
|
||||
|
||||
+3
-3
@@ -1,4 +1,4 @@
|
||||
package com.cricketcraft.chisel.client.gui;
|
||||
package team.chisel.client.gui;
|
||||
|
||||
import net.minecraft.client.gui.inventory.GuiContainer;
|
||||
import net.minecraft.entity.player.InventoryPlayer;
|
||||
@@ -6,8 +6,8 @@ import net.minecraft.util.ResourceLocation;
|
||||
|
||||
import org.lwjgl.opengl.GL11;
|
||||
|
||||
import com.cricketcraft.chisel.block.tileentity.TileEntityPresent;
|
||||
import com.cricketcraft.chisel.inventory.ContainerPresent;
|
||||
import team.chisel.block.tileentity.TileEntityPresent;
|
||||
import team.chisel.inventory.ContainerPresent;
|
||||
|
||||
public class GuiPresent extends GuiContainer {
|
||||
|
||||
+1
-1
@@ -1,4 +1,4 @@
|
||||
package com.cricketcraft.chisel.client.render;
|
||||
package team.chisel.client.render;
|
||||
|
||||
import net.minecraft.block.Block;
|
||||
import net.minecraft.client.renderer.RenderBlocks;
|
||||
@@ -0,0 +1,67 @@
|
||||
package team.chisel.client.render;
|
||||
|
||||
import net.minecraft.block.Block;
|
||||
import net.minecraft.client.model.ModelSnowMan;
|
||||
import net.minecraft.client.renderer.RenderBlocks;
|
||||
import net.minecraft.client.renderer.entity.RenderLiving;
|
||||
import net.minecraft.entity.Entity;
|
||||
import net.minecraft.entity.EntityLivingBase;
|
||||
import net.minecraft.item.ItemBlock;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.util.ResourceLocation;
|
||||
import net.minecraftforge.client.IItemRenderer;
|
||||
import net.minecraftforge.client.MinecraftForgeClient;
|
||||
|
||||
import org.lwjgl.opengl.GL11;
|
||||
|
||||
import team.chisel.entity.EntityChiselSnowman;
|
||||
import static net.minecraftforge.client.IItemRenderer.ItemRenderType.EQUIPPED;
|
||||
import static net.minecraftforge.client.IItemRenderer.ItemRendererHelper.BLOCK_3D;
|
||||
|
||||
public class RenderChiselSnowman extends RenderLiving {
|
||||
|
||||
private static final ResourceLocation snowManTextures = new ResourceLocation("textures/entity/snowman.png");
|
||||
private ModelSnowMan snowMan;
|
||||
|
||||
public RenderChiselSnowman() {
|
||||
super(new ModelSnowMan(), 0.5F);
|
||||
snowMan = (ModelSnowMan) super.mainModel;
|
||||
setRenderPassModel(this.snowMan);
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void renderEquippedItems(EntityLivingBase entityLivingBase, float size) {
|
||||
this.renderEquippedItems((EntityChiselSnowman) entityLivingBase, size);
|
||||
}
|
||||
|
||||
@Override
|
||||
protected ResourceLocation getEntityTexture(Entity entity) {
|
||||
return this.getEntityTexture((EntityChiselSnowman) entity);
|
||||
}
|
||||
|
||||
protected ResourceLocation getEntityTexture(EntityChiselSnowman snowman) {
|
||||
return snowManTextures;
|
||||
}
|
||||
|
||||
protected void renderEquippedItems(EntityChiselSnowman snowman, float size) {
|
||||
super.renderEquippedItems(snowman, size);
|
||||
ItemStack itemStack = snowman.getEquipmentInSlot(2);
|
||||
|
||||
if (itemStack.getItem() instanceof ItemBlock) {
|
||||
GL11.glPushMatrix();
|
||||
this.snowMan.head.postRender(0.0625F);
|
||||
|
||||
IItemRenderer customRenderer = MinecraftForgeClient.getItemRenderer(itemStack, EQUIPPED);
|
||||
boolean is3D = (customRenderer != null && customRenderer.shouldUseRenderHelper(EQUIPPED, itemStack, BLOCK_3D));
|
||||
|
||||
if (is3D || RenderBlocks.renderItemIn3d(Block.getBlockFromItem(itemStack.getItem()).getRenderType())) {
|
||||
float f1 = 0.625F;
|
||||
GL11.glTranslatef(0.0F, -0.34375F, 0.0F);
|
||||
GL11.glRotatef(90.0F, 0.0F, 1.0F, 0.0F);
|
||||
GL11.glScalef(f1, -f1, f1);
|
||||
}
|
||||
this.renderManager.itemRenderer.renderItem(snowman, itemStack, 0);
|
||||
GL11.glPopMatrix();
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,14 @@
|
||||
package team.chisel.client.render;
|
||||
|
||||
import com.cricketcraft.chisel.api.rendering.ClientUtils;
|
||||
import com.cricketcraft.ctmlib.CTMRenderer;
|
||||
|
||||
import cpw.mods.fml.client.registry.RenderingRegistry;
|
||||
|
||||
public class RendererCTM extends CTMRenderer {
|
||||
|
||||
public RendererCTM() {
|
||||
super(RenderingRegistry.getNextAvailableRenderId());
|
||||
ClientUtils.renderCTMId = getRenderId();
|
||||
}
|
||||
}
|
||||
+1
-1
@@ -1,4 +1,4 @@
|
||||
package com.cricketcraft.chisel.client.render;
|
||||
package team.chisel.client.render;
|
||||
|
||||
import net.minecraft.block.Block;
|
||||
import net.minecraft.block.BlockPane;
|
||||
+10
-20
@@ -1,4 +1,4 @@
|
||||
package com.cricketcraft.chisel.client.render;
|
||||
package team.chisel.client.render;
|
||||
|
||||
import net.minecraft.block.Block;
|
||||
import net.minecraft.client.renderer.RenderBlocks;
|
||||
@@ -6,7 +6,8 @@ import net.minecraft.world.IBlockAccess;
|
||||
|
||||
import org.lwjgl.opengl.GL11;
|
||||
|
||||
import com.cricketcraft.chisel.Chisel;
|
||||
import team.chisel.Chisel;
|
||||
|
||||
import com.cricketcraft.ctmlib.Drawing;
|
||||
|
||||
import cpw.mods.fml.client.registry.ISimpleBlockRenderingHandler;
|
||||
@@ -33,24 +34,17 @@ public class RendererEldritch implements ISimpleBlockRenderingHandler {
|
||||
// tessellator.setBrightness(block.getMixedBrightnessForBlock(world, x,
|
||||
// y, z));
|
||||
/*
|
||||
* double d0 = 0.4000000059604645D; double d1 = 0.5D - d0; double d2 =
|
||||
* 0.20000000298023224D;
|
||||
* double d0 = 0.4000000059604645D; double d1 = 0.5D - d0; double d2 = 0.20000000298023224D;
|
||||
*/
|
||||
// renderer.renderTorchAtAngle(Block.torchWood, x - d1, y + d2, z, -d0,
|
||||
// 0.0D, 0);
|
||||
/*
|
||||
* Icon icon = block.getIcon(2, meta); double u0 = icon.getMinU();
|
||||
* double v0 = icon.getMaxV(); double u1 = icon.getMaxU(); double v1 =
|
||||
* icon.getMinV(); double uu = icon.getInterpolatedU(8.0D); double vv =
|
||||
* icon.getInterpolatedV(8.0D);
|
||||
* Icon icon = block.getIcon(2, meta); double u0 = icon.getMinU(); double v0 = icon.getMaxV(); double u1 = icon.getMaxU(); double v1 = icon.getMinV(); double uu = icon.getInterpolatedU(8.0D);
|
||||
* double vv = icon.getInterpolatedV(8.0D);
|
||||
*
|
||||
*
|
||||
* int lyp=block.getMixedBrightnessForBlock(world, x, y+1, z); int
|
||||
* lym=block.getMixedBrightnessForBlock(world, x, y-1, z); int
|
||||
* lxp=block.getMixedBrightnessForBlock(world, x+1, y, z); int
|
||||
* lxm=block.getMixedBrightnessForBlock(world, x-1, y, z); int
|
||||
* lzp=block.getMixedBrightnessForBlock(world, x, y, z+1); int
|
||||
* lzm=block.getMixedBrightnessForBlock(world, x, y, z-1);
|
||||
* int lyp=block.getMixedBrightnessForBlock(world, x, y+1, z); int lym=block.getMixedBrightnessForBlock(world, x, y-1, z); int lxp=block.getMixedBrightnessForBlock(world, x+1, y, z); int
|
||||
* lxm=block.getMixedBrightnessForBlock(world, x-1, y, z); int lzp=block.getMixedBrightnessForBlock(world, x, y, z+1); int lzm=block.getMixedBrightnessForBlock(world, x, y, z-1);
|
||||
*
|
||||
*
|
||||
*
|
||||
@@ -63,13 +57,9 @@ public class RendererEldritch implements ISimpleBlockRenderingHandler {
|
||||
*
|
||||
*
|
||||
*
|
||||
* icon = block.getIcon(0, meta); u0 = icon.getMinU(); v0 =
|
||||
* icon.getMinV(); u1 = icon.getMaxU(); v1 = icon.getMaxV();
|
||||
* vertex(1,u0,v0); vertex(5,u1,v0); vertex(6,u1,v1); vertex(2,u0,v1);
|
||||
* icon = block.getIcon(0, meta); u0 = icon.getMinU(); v0 = icon.getMinV(); u1 = icon.getMaxU(); v1 = icon.getMaxV(); vertex(1,u0,v0); vertex(5,u1,v0); vertex(6,u1,v1); vertex(2,u0,v1);
|
||||
*
|
||||
* icon = block.getIcon(1, meta); u0 = icon.getMinU(); v0 =
|
||||
* icon.getMinV(); u1 = icon.getMaxU(); v1 = icon.getMaxV();
|
||||
* vertex(0,u0,v0); vertex(3,u0,v1); vertex(7,u1,v1); vertex(4,u1,v0);
|
||||
* icon = block.getIcon(1, meta); u0 = icon.getMinU(); v0 = icon.getMinV(); u1 = icon.getMaxU(); v1 = icon.getMaxV(); vertex(0,u0,v0); vertex(3,u0,v1); vertex(7,u1,v1); vertex(4,u1,v0);
|
||||
*/
|
||||
|
||||
renderer.blockAccess = world;
|
||||
+8
-7
@@ -1,4 +1,4 @@
|
||||
package com.cricketcraft.chisel.client.render;
|
||||
package team.chisel.client.render;
|
||||
|
||||
import net.minecraft.block.Block;
|
||||
import net.minecraft.client.renderer.RenderBlocks;
|
||||
@@ -7,10 +7,11 @@ import net.minecraft.world.IBlockAccess;
|
||||
|
||||
import org.lwjgl.opengl.GL11;
|
||||
|
||||
import com.cricketcraft.chisel.Chisel;
|
||||
import com.cricketcraft.chisel.block.BlockCarvableGlow;
|
||||
import com.cricketcraft.chisel.config.Configurations;
|
||||
import com.cricketcraft.chisel.utils.GeneralClient;
|
||||
import team.chisel.Chisel;
|
||||
import team.chisel.block.BlockCarvableGlow;
|
||||
import team.chisel.config.Configurations;
|
||||
import team.chisel.utils.GeneralClient;
|
||||
|
||||
import com.cricketcraft.ctmlib.Drawing;
|
||||
|
||||
import cpw.mods.fml.client.registry.ISimpleBlockRenderingHandler;
|
||||
@@ -27,7 +28,7 @@ public class RendererLayeredGlow implements ISimpleBlockRenderingHandler {
|
||||
GL11.glTranslatef(-0.5F, -0.5F, -0.5F);
|
||||
GeneralClient.setGLColorFromInt(Configurations.configColors[metadata]);
|
||||
GL11.glDisable(GL11.GL_LIGHTING);
|
||||
Drawing.drawBlock(block, ((BlockCarvableGlow)block).getGlowTexture(), renderer);
|
||||
Drawing.drawBlock(block, ((BlockCarvableGlow) block).getGlowTexture(), renderer);
|
||||
GL11.glEnable(GL11.GL_LIGHTING);
|
||||
GL11.glColor3f(1, 1, 1);
|
||||
Drawing.drawBlock(block, metadata, renderer);
|
||||
@@ -42,7 +43,7 @@ public class RendererLayeredGlow implements ISimpleBlockRenderingHandler {
|
||||
renderer.renderStandardBlock(block, x, y, z);
|
||||
return true;
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public boolean shouldRender3DInInventory(int modelId) {
|
||||
return true;
|
||||
+8
-7
@@ -1,15 +1,16 @@
|
||||
package com.cricketcraft.chisel.client.render;
|
||||
package team.chisel.client.render;
|
||||
|
||||
import com.cricketcraft.chisel.block.BlockMultiLayerBase;
|
||||
import com.cricketcraft.ctmlib.Drawing;
|
||||
|
||||
import cpw.mods.fml.client.registry.ISimpleBlockRenderingHandler;
|
||||
import cpw.mods.fml.client.registry.RenderingRegistry;
|
||||
import team.chisel.block.BlockMultiLayerBase;
|
||||
import net.minecraft.block.Block;
|
||||
import net.minecraft.client.renderer.RenderBlocks;
|
||||
import net.minecraft.init.Blocks;
|
||||
import net.minecraft.world.IBlockAccess;
|
||||
import net.minecraftforge.client.MinecraftForgeClient;
|
||||
|
||||
import com.cricketcraft.ctmlib.Drawing;
|
||||
|
||||
import cpw.mods.fml.client.registry.ISimpleBlockRenderingHandler;
|
||||
import cpw.mods.fml.client.registry.RenderingRegistry;
|
||||
import static org.lwjgl.opengl.GL11.*;
|
||||
|
||||
public class RendererMultiLayer implements ISimpleBlockRenderingHandler {
|
||||
@@ -35,7 +36,7 @@ public class RendererMultiLayer implements ISimpleBlockRenderingHandler {
|
||||
} else if (block.base != null) {
|
||||
renderer.renderBlockAsItem(block.base, meta, 1.0f);
|
||||
}
|
||||
|
||||
|
||||
glPushMatrix();
|
||||
glEnable(GL_BLEND);
|
||||
glBlendFunc(GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA);
|
||||
+3
-3
@@ -1,5 +1,7 @@
|
||||
package com.cricketcraft.chisel.client.render;
|
||||
package team.chisel.client.render;
|
||||
|
||||
import team.chisel.Chisel;
|
||||
import team.chisel.block.BlockRoadLine;
|
||||
import net.minecraft.block.Block;
|
||||
import net.minecraft.client.renderer.EntityRenderer;
|
||||
import net.minecraft.client.renderer.RenderBlocks;
|
||||
@@ -7,8 +9,6 @@ import net.minecraft.client.renderer.Tessellator;
|
||||
import net.minecraft.util.IIcon;
|
||||
import net.minecraft.world.IBlockAccess;
|
||||
|
||||
import com.cricketcraft.chisel.Chisel;
|
||||
import com.cricketcraft.chisel.block.BlockRoadLine;
|
||||
import com.cricketcraft.ctmlib.Drawing;
|
||||
|
||||
import cpw.mods.fml.client.registry.ISimpleBlockRenderingHandler;
|
||||
+5
-4
@@ -1,4 +1,4 @@
|
||||
package com.cricketcraft.chisel.client.render;
|
||||
package team.chisel.client.render;
|
||||
|
||||
import net.minecraft.block.Block;
|
||||
import net.minecraft.client.renderer.RenderBlocks;
|
||||
@@ -6,8 +6,9 @@ import net.minecraft.world.IBlockAccess;
|
||||
|
||||
import org.lwjgl.opengl.GL11;
|
||||
|
||||
import com.cricketcraft.chisel.Chisel;
|
||||
import com.cricketcraft.chisel.block.BlockCarvableLayered;
|
||||
import team.chisel.Chisel;
|
||||
import team.chisel.block.BlockCarvableLayered;
|
||||
|
||||
import com.cricketcraft.ctmlib.Drawing;
|
||||
|
||||
import cpw.mods.fml.client.registry.ISimpleBlockRenderingHandler;
|
||||
@@ -23,7 +24,7 @@ public class RendererSimpleLayered implements ISimpleBlockRenderingHandler {
|
||||
public void renderInventoryBlock(Block block, int metadata, int modelId, RenderBlocks renderer) {
|
||||
GL11.glTranslatef(-0.5F, -0.5F, -0.5F);
|
||||
GL11.glDisable(GL11.GL_LIGHTING);
|
||||
Drawing.drawBlock(block, ((BlockCarvableLayered)block).getBaseTex(), renderer);
|
||||
Drawing.drawBlock(block, ((BlockCarvableLayered) block).getBaseTex(), renderer);
|
||||
GL11.glEnable(GL11.GL_LIGHTING);
|
||||
Drawing.drawBlock(block, metadata, renderer);
|
||||
GL11.glTranslatef(0.5F, 0.5F, 0.5F);
|
||||
+3
-2
@@ -1,4 +1,4 @@
|
||||
package com.cricketcraft.chisel.client.render;
|
||||
package team.chisel.client.render;
|
||||
|
||||
import net.minecraft.block.Block;
|
||||
import net.minecraft.client.renderer.RenderBlocks;
|
||||
@@ -6,7 +6,8 @@ import net.minecraft.world.IBlockAccess;
|
||||
|
||||
import org.lwjgl.opengl.GL11;
|
||||
|
||||
import com.cricketcraft.chisel.block.BlockSnakestone;
|
||||
import team.chisel.block.BlockSnakestone;
|
||||
|
||||
import com.cricketcraft.ctmlib.Drawing;
|
||||
|
||||
import cpw.mods.fml.client.registry.ISimpleBlockRenderingHandler;
|
||||
+3
-2
@@ -1,4 +1,4 @@
|
||||
package com.cricketcraft.chisel.client.render;
|
||||
package team.chisel.client.render;
|
||||
|
||||
import net.minecraft.block.Block;
|
||||
import net.minecraft.client.renderer.RenderBlocks;
|
||||
@@ -6,7 +6,8 @@ import net.minecraft.world.IBlockAccess;
|
||||
|
||||
import org.lwjgl.opengl.GL11;
|
||||
|
||||
import com.cricketcraft.chisel.block.BlockCarvableStairs;
|
||||
import team.chisel.block.BlockCarvableStairs;
|
||||
|
||||
import com.cricketcraft.ctmlib.Drawing;
|
||||
|
||||
import cpw.mods.fml.client.registry.ISimpleBlockRenderingHandler;
|
||||
+44
-2
@@ -1,11 +1,17 @@
|
||||
package com.cricketcraft.chisel.client.render;
|
||||
package team.chisel.client.render;
|
||||
|
||||
import org.lwjgl.opengl.GL11;
|
||||
|
||||
import team.chisel.init.ChiselBlocks;
|
||||
import net.minecraft.block.Block;
|
||||
import net.minecraft.client.renderer.RenderBlocks;
|
||||
import net.minecraft.client.renderer.texture.IIconRegister;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.util.IIcon;
|
||||
import net.minecraft.world.IBlockAccess;
|
||||
import net.minecraftforge.client.IItemRenderer;
|
||||
|
||||
import com.cricketcraft.ctmlib.Drawing;
|
||||
import com.cricketcraft.ctmlib.RenderBlocksCTM;
|
||||
import com.cricketcraft.ctmlib.TextureSubmap;
|
||||
|
||||
@@ -13,26 +19,62 @@ import cpw.mods.fml.relauncher.Side;
|
||||
import cpw.mods.fml.relauncher.SideOnly;
|
||||
|
||||
public class SubmapManagerAntiblock extends SubmapManagerBase {
|
||||
|
||||
@SideOnly(Side.CLIENT)
|
||||
public static class AntiblockItemRenderer implements IItemRenderer {
|
||||
|
||||
@Override
|
||||
public boolean handleRenderType(ItemStack item, ItemRenderType type) {
|
||||
return true;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean shouldUseRenderHelper(ItemRenderType type, ItemStack item, ItemRendererHelper helper) {
|
||||
return true;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void renderItem(ItemRenderType type, ItemStack item, Object... data) {
|
||||
GL11.glDisable(GL11.GL_LIGHTING);
|
||||
Drawing.drawBlock(ChiselBlocks.antiBlock, ChiselBlocks.antiBlock.getIcon(0, item.getItemDamage()), (RenderBlocks) data[0]);
|
||||
GL11.glEnable(GL11.GL_LIGHTING);
|
||||
}
|
||||
}
|
||||
|
||||
@SideOnly(Side.CLIENT)
|
||||
private static class RenderBlocksCTMFullbright extends RenderBlocksCTM {
|
||||
|
||||
@Override
|
||||
protected void fillLightmap(int bottomLeft, int bottomRight, int topRight, int topLeft) {
|
||||
ao();
|
||||
int maxLight = 0xF000F0;
|
||||
super.fillLightmap(maxLight, maxLight, maxLight, maxLight);
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void fillColormap(float bottomLeft, float bottomRight, float topRight, float topLeft, float[][] map) {
|
||||
ao();
|
||||
int color = 0xFFFFFF;
|
||||
super.fillColormap(color, color, color, color, map);
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean renderStandardBlock(Block block, int x, int y, int z) {
|
||||
boolean ret = super.renderStandardBlock(block, x, y, z);
|
||||
this.enableAO = false;
|
||||
return ret;
|
||||
}
|
||||
|
||||
private void ao() {
|
||||
if (this.inWorld) {
|
||||
this.enableAO = true;
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
@SideOnly(Side.CLIENT)
|
||||
private static RenderBlocksCTMFullbright rb;
|
||||
|
||||
|
||||
private String color;
|
||||
private TextureSubmap submap, submapSmall;
|
||||
|
||||
Loaded 100 of 265 files, more files were not shown because too many files have changed in this diff.
Show more
Reference in new issue
Block a user