mirror of
https://github.com/GTNewHorizons/Chisel.git
synced 2026-11-17 19:25:06 +00:00
The great format and clean up. IMPORTANT: Read below.
All devs and contributors should use the provided formatter settings. If your IDE does not support the format, the rules are simple, it is the default java formatting rules, with 200char line lengths and 1 extra line after class definitions.
This commit is contained in:
1 parent
06c5f5930f
commit
82792ed22e
136 files changed
+10365
-11272
No files matched your search
@@ -1,49 +1,53 @@
|
||||
package com.cricketcraft.chisel.block;
|
||||
|
||||
import net.minecraft.block.BlockPumpkin;
|
||||
import net.minecraft.client.renderer.texture.IIconRegister;
|
||||
import net.minecraft.util.IIcon;
|
||||
|
||||
import com.cricketcraft.chisel.Chisel;
|
||||
import com.cricketcraft.chisel.api.ICarvable;
|
||||
import com.cricketcraft.chisel.carving.CarvableHelper;
|
||||
import com.cricketcraft.chisel.carving.CarvableVariation;
|
||||
|
||||
import cpw.mods.fml.relauncher.Side;
|
||||
import cpw.mods.fml.relauncher.SideOnly;
|
||||
import net.minecraft.block.BlockPumpkin;
|
||||
import net.minecraft.client.renderer.texture.IIconRegister;
|
||||
import net.minecraft.util.IIcon;
|
||||
|
||||
public class BlockCarvablePumpkin extends BlockPumpkin implements ICarvable{
|
||||
public CarvableHelper carverHelper;
|
||||
public class BlockCarvablePumpkin extends BlockPumpkin implements ICarvable {
|
||||
|
||||
@SideOnly(Side.CLIENT)
|
||||
private IIcon top, face;
|
||||
public CarvableHelper carverHelper;
|
||||
|
||||
private String faceLocation;
|
||||
@SideOnly(Side.CLIENT)
|
||||
private IIcon top, face;
|
||||
|
||||
public BlockCarvablePumpkin(boolean isOn) {
|
||||
super(isOn);
|
||||
if(isOn)
|
||||
setLightLevel(10.0F);
|
||||
carverHelper = new CarvableHelper();
|
||||
}
|
||||
private String faceLocation;
|
||||
|
||||
@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)))));
|
||||
}
|
||||
public BlockCarvablePumpkin(boolean isOn) {
|
||||
super(isOn);
|
||||
if (isOn)
|
||||
setLightLevel(10.0F);
|
||||
carverHelper = new CarvableHelper();
|
||||
}
|
||||
|
||||
@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
|
||||
@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 CarvableVariation getVariation(int metadata) {
|
||||
return carverHelper.getVariation(metadata);
|
||||
}
|
||||
@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");
|
||||
}
|
||||
|
||||
public void setInformation(String textureLocation){
|
||||
this.faceLocation = textureLocation;
|
||||
}
|
||||
@Override
|
||||
public CarvableVariation getVariation(int metadata) {
|
||||
return carverHelper.getVariation(metadata);
|
||||
}
|
||||
|
||||
public void setInformation(String textureLocation) {
|
||||
this.faceLocation = textureLocation;
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user