So much fix server

This commit is contained in:
Ellpeck 2015-10-28 14:46:04 +01:00
parent 1549882d3a
commit 3218b8b326
79 changed files with 215 additions and 82 deletions

View file

@ -32,7 +32,9 @@ import net.minecraft.world.World;
public class BlockBreaker extends BlockContainerBase implements IActAddItemOrBlock{
@SideOnly(Side.CLIENT)
private IIcon frontIcon;
@SideOnly(Side.CLIENT)
private IIcon topIcon;
private boolean isPlacer;
@ -52,6 +54,7 @@ public class BlockBreaker extends BlockContainerBase implements IActAddItemOrBlo
}
@Override
@SideOnly(Side.CLIENT)
public IIcon getIcon(IBlockAccess world, int x, int y, int z, int side){
int meta = world.getBlockMetadata(x, y, z);
if(side != meta && (side == 0 || side == 1)){
@ -64,6 +67,7 @@ public class BlockBreaker extends BlockContainerBase implements IActAddItemOrBlo
}
@Override
@SideOnly(Side.CLIENT)
public IIcon getIcon(int side, int meta){
if(side == 0 || side == 1){
return this.topIcon;

View file

@ -29,6 +29,7 @@ import net.minecraft.world.World;
public class BlockCanolaPress extends BlockContainerBase implements IActAddItemOrBlock{
@SideOnly(Side.CLIENT)
private IIcon topIcon;
public BlockCanolaPress(){
@ -45,6 +46,7 @@ public class BlockCanolaPress extends BlockContainerBase implements IActAddItemO
}
@Override
@SideOnly(Side.CLIENT)
public IIcon getIcon(int side, int meta){
return side == 1 || side == 0 ? this.topIcon : this.blockIcon;
}

View file

@ -32,7 +32,9 @@ import java.util.Random;
public class BlockCoalGenerator extends BlockContainerBase implements IActAddItemOrBlock{
@SideOnly(Side.CLIENT)
private IIcon topIcon;
@SideOnly(Side.CLIENT)
private IIcon bottomIcon;
public BlockCoalGenerator(){
@ -50,6 +52,7 @@ public class BlockCoalGenerator extends BlockContainerBase implements IActAddIte
}
@Override
@SideOnly(Side.CLIENT)
public IIcon getIcon(int side, int meta){
return side <= 1 ? (side == 0 ? this.bottomIcon : this.topIcon) : this.blockIcon;
}

View file

@ -54,6 +54,7 @@ public class BlockCoffeeMachine extends BlockContainerBase implements IActAddIte
}
@Override
@SideOnly(Side.CLIENT)
public IIcon getIcon(int side, int metadata){
return this.blockIcon;
}

View file

@ -37,7 +37,8 @@ public class BlockColoredLamp extends Block implements IActAddItemOrBlock{
public static TheColoredLampColors[] allLampTypes = TheColoredLampColors.values();
public boolean isOn;
private IIcon[] textures = new IIcon[allLampTypes.length];
@SideOnly(Side.CLIENT)
private IIcon[] textures;
public BlockColoredLamp(boolean isOn){
super(Material.redstoneLight);
@ -58,6 +59,7 @@ public class BlockColoredLamp extends Block implements IActAddItemOrBlock{
}
@Override
@SideOnly(Side.CLIENT)
public IIcon getIcon(int side, int meta){
return meta >= allLampTypes.length ? null : textures[meta];
}
@ -127,6 +129,7 @@ public class BlockColoredLamp extends Block implements IActAddItemOrBlock{
@Override
@SideOnly(Side.CLIENT)
public void registerBlockIcons(IIconRegister iconReg){
this.textures = new IIcon[allLampTypes.length];
for(int i = 0; i < allLampTypes.length; i++){
this.textures[i] = iconReg.registerIcon(ModUtil.MOD_ID_LOWER+":"+((IActAddItemOrBlock)InitBlocks.blockColoredLamp).getName()+allLampTypes[i].name+(isOn ? "On" : ""));
}
@ -145,11 +148,6 @@ public class BlockColoredLamp extends Block implements IActAddItemOrBlock{
this.setMaxDamage(0);
}
@Override
public int getMetadata(int damage){
return damage;
}
@Override
public String getItemStackDisplayName(ItemStack stack){
if(stack.getItemDamage() >= allLampTypes.length){
@ -158,15 +156,20 @@ public class BlockColoredLamp extends Block implements IActAddItemOrBlock{
return StringUtil.localize(this.getUnlocalizedName(stack)+".name")+(((BlockColoredLamp)this.field_150939_a).isOn ? " ("+StringUtil.localize("tooltip."+ModUtil.MOD_ID_LOWER+".onSuffix.desc")+")" : "");
}
@Override
public String getUnlocalizedName(ItemStack stack){
return InitBlocks.blockColoredLamp.getUnlocalizedName()+allLampTypes[stack.getItemDamage()].name;
}
@Override
public int getMetadata(int damage){
return damage;
}
@Override
public EnumRarity getRarity(ItemStack stack){
EnumRarity rarity = ((IActAddItemOrBlock)this.field_150939_a).getRarity(stack);
return rarity == null ? EnumRarity.common : rarity;
}
@Override
public String getUnlocalizedName(ItemStack stack){
return InitBlocks.blockColoredLamp.getUnlocalizedName()+allLampTypes[stack.getItemDamage()].name;
}
}
}

View file

@ -57,6 +57,7 @@ public class BlockCompost extends BlockContainerBase implements IActAddItemOrBlo
}
@Override
@SideOnly(Side.CLIENT)
public IIcon getIcon(int side, int metadata){
return this.blockIcon;
}

View file

@ -32,7 +32,9 @@ import net.minecraft.world.World;
public class BlockDirectionalBreaker extends BlockContainerBase implements IActAddItemOrBlock{
@SideOnly(Side.CLIENT)
private IIcon frontIcon;
@SideOnly(Side.CLIENT)
private IIcon topIcon;
public BlockDirectionalBreaker(){
@ -49,6 +51,7 @@ public class BlockDirectionalBreaker extends BlockContainerBase implements IActA
}
@Override
@SideOnly(Side.CLIENT)
public IIcon getIcon(IBlockAccess world, int x, int y, int z, int side){
int meta = world.getBlockMetadata(x, y, z);
if(side != meta && (side == 0 || side == 1)){
@ -61,6 +64,7 @@ public class BlockDirectionalBreaker extends BlockContainerBase implements IActA
}
@Override
@SideOnly(Side.CLIENT)
public IIcon getIcon(int side, int meta){
if(side == 0 || side == 1){
return this.topIcon;

View file

@ -32,7 +32,9 @@ import net.minecraft.world.World;
public class BlockDropper extends BlockContainerBase implements IActAddItemOrBlock{
@SideOnly(Side.CLIENT)
private IIcon frontIcon;
@SideOnly(Side.CLIENT)
private IIcon topIcon;
public BlockDropper(){
@ -49,6 +51,7 @@ public class BlockDropper extends BlockContainerBase implements IActAddItemOrBlo
}
@Override
@SideOnly(Side.CLIENT)
public IIcon getIcon(IBlockAccess world, int x, int y, int z, int side){
int meta = world.getBlockMetadata(x, y, z);
if(side != meta && (side == 0 || side == 1)){
@ -61,6 +64,7 @@ public class BlockDropper extends BlockContainerBase implements IActAddItemOrBlo
}
@Override
@SideOnly(Side.CLIENT)
public IIcon getIcon(int side, int meta){
if(side == 0 || side == 1){
return this.topIcon;

View file

@ -30,7 +30,9 @@ import net.minecraft.world.World;
public class BlockEnergizer extends BlockContainerBase implements IActAddItemOrBlock{
@SideOnly(Side.CLIENT)
private IIcon topIcon;
@SideOnly(Side.CLIENT)
private IIcon sideIcon;
private boolean isEnergizer;
@ -49,6 +51,7 @@ public class BlockEnergizer extends BlockContainerBase implements IActAddItemOrB
}
@Override
@SideOnly(Side.CLIENT)
public IIcon getIcon(int side, int meta){
return side == 1 ? this.topIcon : (side == 0 ? this.blockIcon : this.sideIcon);
}

View file

@ -29,6 +29,7 @@ import net.minecraft.world.World;
public class BlockFeeder extends BlockContainerBase implements IActAddItemOrBlock{
@SideOnly(Side.CLIENT)
private IIcon topIcon;
public BlockFeeder(){
@ -45,6 +46,7 @@ public class BlockFeeder extends BlockContainerBase implements IActAddItemOrBloc
}
@Override
@SideOnly(Side.CLIENT)
public IIcon getIcon(int side, int metadata){
return (side == 0 || side == 1) ? this.topIcon : this.blockIcon;
}

View file

@ -29,6 +29,7 @@ import net.minecraft.world.World;
public class BlockFermentingBarrel extends BlockContainerBase implements IActAddItemOrBlock{
@SideOnly(Side.CLIENT)
private IIcon iconTop;
public BlockFermentingBarrel(){
@ -51,6 +52,7 @@ public class BlockFermentingBarrel extends BlockContainerBase implements IActAdd
}
@Override
@SideOnly(Side.CLIENT)
public IIcon getIcon(int side, int metadata){
return side <= 1 ? this.iconTop : this.blockIcon;
}

View file

@ -51,6 +51,7 @@ public class BlockFishingNet extends BlockContainerBase implements IActAddItemOr
}
@Override
@SideOnly(Side.CLIENT)
public IIcon getIcon(int side, int metadata){
return this.blockIcon;
}

View file

@ -32,7 +32,9 @@ import net.minecraft.world.World;
public class BlockFluidCollector extends BlockContainerBase implements IActAddItemOrBlock{
@SideOnly(Side.CLIENT)
private IIcon frontIcon;
@SideOnly(Side.CLIENT)
private IIcon topIcon;
private boolean isPlacer;
@ -52,6 +54,7 @@ public class BlockFluidCollector extends BlockContainerBase implements IActAddIt
}
@Override
@SideOnly(Side.CLIENT)
public IIcon getIcon(IBlockAccess world, int x, int y, int z, int side){
int meta = world.getBlockMetadata(x, y, z);
if(side != meta && (side == 0 || side == 1)){
@ -64,6 +67,7 @@ public class BlockFluidCollector extends BlockContainerBase implements IActAddIt
}
@Override
@SideOnly(Side.CLIENT)
public IIcon getIcon(int side, int meta){
if(side == 0 || side == 1){
return this.topIcon;

View file

@ -26,7 +26,9 @@ import net.minecraftforge.fluids.Fluid;
public class BlockFluidFlowing extends BlockFluidClassic implements IActAddItemOrBlock{
@SideOnly(Side.CLIENT)
public IIcon stillIcon;
@SideOnly(Side.CLIENT)
public IIcon flowingIcon;
private String name;
@ -48,6 +50,7 @@ public class BlockFluidFlowing extends BlockFluidClassic implements IActAddItemO
}
@Override
@SideOnly(Side.CLIENT)
public IIcon getIcon(int side, int meta){
return side <= 1 ? this.stillIcon : this.flowingIcon;
}

View file

@ -35,8 +35,11 @@ import java.util.Random;
public class BlockFurnaceDouble extends BlockContainerBase implements IActAddItemOrBlock{
@SideOnly(Side.CLIENT)
private IIcon topIcon;
@SideOnly(Side.CLIENT)
private IIcon onIcon;
@SideOnly(Side.CLIENT)
private IIcon frontIcon;
public BlockFurnaceDouble(){
@ -54,6 +57,7 @@ public class BlockFurnaceDouble extends BlockContainerBase implements IActAddIte
}
@Override
@SideOnly(Side.CLIENT)
public IIcon getIcon(IBlockAccess world, int x, int y, int z, int side){
int meta = world.getBlockMetadata(x, y, z);
if(side == 1){
@ -69,6 +73,7 @@ public class BlockFurnaceDouble extends BlockContainerBase implements IActAddIte
}
@Override
@SideOnly(Side.CLIENT)
public IIcon getIcon(int side, int meta){
if(side == 1){
return this.topIcon;

View file

@ -53,6 +53,7 @@ public class BlockFurnaceSolar extends BlockContainerBase implements IActAddItem
}
@Override
@SideOnly(Side.CLIENT)
public IIcon getIcon(int side, int metadata){
return this.blockIcon;
}

View file

@ -35,6 +35,7 @@ public class BlockGeneric extends Block implements IActAddItemOrBlock{
}
@Override
@SideOnly(Side.CLIENT)
public IIcon getIcon(int side, int meta){
return this.blockIcon;
}

View file

@ -29,7 +29,9 @@ import net.minecraft.world.World;
public class BlockGiantChest extends BlockContainerBase implements IActAddItemOrBlock{
@SideOnly(Side.CLIENT)
private IIcon topIcon;
@SideOnly(Side.CLIENT)
private IIcon bottomIcon;
public BlockGiantChest(){
@ -46,6 +48,7 @@ public class BlockGiantChest extends BlockContainerBase implements IActAddItemOr
}
@Override
@SideOnly(Side.CLIENT)
public IIcon getIcon(int side, int metadata){
return side == 1 ? this.topIcon : (side == 0 ? this.bottomIcon : this.blockIcon);
}

View file

@ -48,6 +48,7 @@ public class BlockGreenhouseGlass extends BlockContainerBase implements IActAddI
}
@Override
@SideOnly(Side.CLIENT)
public IIcon getIcon(int side, int metadata){
return this.blockIcon;
}

View file

@ -34,8 +34,11 @@ import java.util.Random;
public class BlockGrinder extends BlockContainerBase implements IActAddItemOrBlock{
private final boolean isDouble;
@SideOnly(Side.CLIENT)
private IIcon topIcon;
@SideOnly(Side.CLIENT)
private IIcon onIcon;
@SideOnly(Side.CLIENT)
private IIcon bottomIcon;
public BlockGrinder(boolean isDouble){
@ -54,6 +57,7 @@ public class BlockGrinder extends BlockContainerBase implements IActAddItemOrBlo
}
@Override
@SideOnly(Side.CLIENT)
public IIcon getIcon(int side, int meta){
if(side == 1 && meta != 1){
return this.topIcon;

View file

@ -27,7 +27,9 @@ import net.minecraft.world.World;
public class BlockHeatCollector extends BlockContainerBase implements IActAddItemOrBlock{
@SideOnly(Side.CLIENT)
private IIcon topIcon;
@SideOnly(Side.CLIENT)
private IIcon bottomIcon;
public BlockHeatCollector(){
@ -44,6 +46,7 @@ public class BlockHeatCollector extends BlockContainerBase implements IActAddIte
}
@Override
@SideOnly(Side.CLIENT)
public IIcon getIcon(int side, int metadata){
return side == 1 ? this.topIcon : (side == 0 ? this.bottomIcon : this.blockIcon);
}

View file

@ -54,6 +54,7 @@ public class BlockInputter extends BlockContainerBase implements IActAddItemOrBl
}
@Override
@SideOnly(Side.CLIENT)
public IIcon getIcon(int side, int meta){
return this.blockIcon;
}

View file

@ -30,7 +30,9 @@ import net.minecraft.world.World;
public class BlockItemRepairer extends BlockContainerBase implements IActAddItemOrBlock{
@SideOnly(Side.CLIENT)
private IIcon topIcon;
@SideOnly(Side.CLIENT)
private IIcon bottomIcon;
public BlockItemRepairer(){
@ -48,6 +50,7 @@ public class BlockItemRepairer extends BlockContainerBase implements IActAddItem
}
@Override
@SideOnly(Side.CLIENT)
public IIcon getIcon(int side, int meta){
if(side == 1){
return this.topIcon;

View file

@ -30,6 +30,7 @@ import net.minecraftforge.common.util.ForgeDirection;
public class BlockLampPowerer extends Block implements IActAddItemOrBlock{
@SideOnly(Side.CLIENT)
private IIcon frontIcon;
public BlockLampPowerer(){
@ -41,6 +42,7 @@ public class BlockLampPowerer extends Block implements IActAddItemOrBlock{
}
@Override
@SideOnly(Side.CLIENT)
public IIcon getIcon(IBlockAccess world, int x, int y, int z, int side){
int meta = world.getBlockMetadata(x, y, z);
if(side == meta){
@ -50,6 +52,7 @@ public class BlockLampPowerer extends Block implements IActAddItemOrBlock{
}
@Override
@SideOnly(Side.CLIENT)
public IIcon getIcon(int side, int meta){
if(side == 3){
return this.frontIcon;

View file

@ -45,6 +45,7 @@ public class BlockLaserRelay extends BlockContainerBase implements IActAddItemOr
}
@Override
@SideOnly(Side.CLIENT)
public IIcon getIcon(int side, int metadata){
return this.blockIcon;
}

View file

@ -28,6 +28,7 @@ import net.minecraft.world.World;
public class BlockLavaFactoryController extends BlockContainerBase implements IActAddItemOrBlock{
@SideOnly(Side.CLIENT)
private IIcon topIcon;
public BlockLavaFactoryController(){
@ -44,6 +45,7 @@ public class BlockLavaFactoryController extends BlockContainerBase implements IA
}
@Override
@SideOnly(Side.CLIENT)
public IIcon getIcon(int side, int meta){
return side == 1 ? this.topIcon : this.blockIcon;
}

View file

@ -28,7 +28,9 @@ import net.minecraft.world.World;
public class BlockLeafGenerator extends BlockContainerBase implements IActAddItemOrBlock{
@SideOnly(Side.CLIENT)
private IIcon topIcon;
@SideOnly(Side.CLIENT)
private IIcon bottomIcon;
public BlockLeafGenerator(){
@ -45,6 +47,7 @@ public class BlockLeafGenerator extends BlockContainerBase implements IActAddIte
}
@Override
@SideOnly(Side.CLIENT)
public IIcon getIcon(int side, int meta){
return side <= 1 ? (side == 0 ? this.bottomIcon : this.topIcon) : this.blockIcon;
}

View file

@ -31,9 +31,12 @@ import java.util.List;
public class BlockMisc extends Block implements IActAddItemOrBlock{
public static final TheMiscBlocks[] allMiscBlocks = TheMiscBlocks.values();
public IIcon[] textures = new IIcon[allMiscBlocks.length];
@SideOnly(Side.CLIENT)
public IIcon[] textures;
@SideOnly(Side.CLIENT)
private IIcon stoneCasingSeasonalTop;
@SideOnly(Side.CLIENT)
private IIcon stoneCasingSeasonal;
public BlockMisc(){
@ -44,6 +47,7 @@ public class BlockMisc extends Block implements IActAddItemOrBlock{
}
@Override
@SideOnly(Side.CLIENT)
public IIcon getIcon(int side, int metadata){
if(ClientProxy.jingleAllTheWay && metadata == TheMiscBlocks.STONE_CASING.ordinal() && side != 0){
return side == 1 ? this.stoneCasingSeasonalTop : this.stoneCasingSeasonal;
@ -67,6 +71,7 @@ public class BlockMisc extends Block implements IActAddItemOrBlock{
@Override
@SideOnly(Side.CLIENT)
public void registerBlockIcons(IIconRegister iconReg){
this.textures = new IIcon[allMiscBlocks.length];
for(int i = 0; i < textures.length; i++){
textures[i] = iconReg.registerIcon(ModUtil.MOD_ID_LOWER+":"+this.getName()+allMiscBlocks[i].name);
}

View file

@ -32,7 +32,9 @@ import java.util.Random;
public class BlockOilGenerator extends BlockContainerBase implements IActAddItemOrBlock{
@SideOnly(Side.CLIENT)
private IIcon topIcon;
@SideOnly(Side.CLIENT)
private IIcon bottomIcon;
public BlockOilGenerator(){
@ -50,6 +52,7 @@ public class BlockOilGenerator extends BlockContainerBase implements IActAddItem
}
@Override
@SideOnly(Side.CLIENT)
public IIcon getIcon(int side, int meta){
return side <= 1 ? (side == 0 ? this.bottomIcon : this.topIcon) : this.blockIcon;
}

View file

@ -29,7 +29,9 @@ import net.minecraft.world.World;
public class BlockOreMagnet extends BlockContainerBase implements IActAddItemOrBlock{
@SideOnly(Side.CLIENT)
private IIcon topIcon;
@SideOnly(Side.CLIENT)
private IIcon bottomIcon;
public BlockOreMagnet(){
@ -46,6 +48,7 @@ public class BlockOreMagnet extends BlockContainerBase implements IActAddItemOrB
}
@Override
@SideOnly(Side.CLIENT)
public IIcon getIcon(int side, int meta){
return (side == 1 ? this.topIcon : (side == 0 ? this.bottomIcon : this.blockIcon));
}

View file

@ -37,6 +37,7 @@ public class BlockPhantom extends BlockContainerBase implements IActAddItemOrBlo
public Type type;
public int range;
@SideOnly(Side.CLIENT)
private IIcon iconSeasonal;
public BlockPhantom(Type type){
@ -80,6 +81,7 @@ public class BlockPhantom extends BlockContainerBase implements IActAddItemOrBlo
}
@Override
@SideOnly(Side.CLIENT)
public IIcon getIcon(int side, int metadata){
return (this.type == Type.FACE && ClientProxy.pumpkinBlurPumpkinBlur && side > 1) ? this.iconSeasonal : this.blockIcon;
}

View file

@ -48,6 +48,7 @@ public class BlockPhantomBooster extends BlockContainerBase implements IActAddIt
}
@Override
@SideOnly(Side.CLIENT)
public IIcon getIcon(int side, int metadata){
return this.blockIcon;
}

View file

@ -31,14 +31,16 @@ public class BlockPlant extends BlockCrops implements IActAddItemOrBlock{
public Item seedItem;
public Item returnItem;
public int returnMeta;
@SideOnly(Side.CLIENT)
private IIcon[] textures;
private int stages;
private String name;
private int minDropAmount;
private int addDropAmount;
public BlockPlant(String name, int stages, int minDropAmount, int addDropAmount){
this.name = name;
this.textures = new IIcon[stages];
this.stages = stages;
this.minDropAmount = minDropAmount;
this.addDropAmount = addDropAmount;
}
@ -80,6 +82,7 @@ public class BlockPlant extends BlockCrops implements IActAddItemOrBlock{
@Override
@SideOnly(Side.CLIENT)
public void registerBlockIcons(IIconRegister iconReg){
this.textures = new IIcon[this.stages];
for(int i = 0; i < this.textures.length; i++){
textures[i] = iconReg.registerIcon(ModUtil.MOD_ID_LOWER+":"+this.getName()+"Stage"+(i+1));
}

View file

@ -43,6 +43,7 @@ public class BlockRangedCollector extends BlockContainerBase implements IActAddI
}
@Override
@SideOnly(Side.CLIENT)
public IIcon getIcon(int side, int meta){
return this.blockIcon;
}

View file

@ -51,6 +51,7 @@ public class BlockSmileyCloud extends BlockContainerBase implements IActAddItemO
}
@Override
@SideOnly(Side.CLIENT)
public IIcon getIcon(int side, int metadata){
return this.blockIcon;
}

View file

@ -36,8 +36,11 @@ import java.util.Random;
public class BlockTreasureChest extends Block implements IActAddItemOrBlock{
@SideOnly(Side.CLIENT)
private IIcon topIcon;
@SideOnly(Side.CLIENT)
private IIcon bottomIcon;
@SideOnly(Side.CLIENT)
private IIcon frontIcon;
public BlockTreasureChest(){
@ -50,6 +53,7 @@ public class BlockTreasureChest extends Block implements IActAddItemOrBlock{
}
@Override
@SideOnly(Side.CLIENT)
public IIcon getIcon(IBlockAccess world, int x, int y, int z, int side){
int meta = world.getBlockMetadata(x, y, z);
if(side == 1){
@ -65,6 +69,7 @@ public class BlockTreasureChest extends Block implements IActAddItemOrBlock{
}
@Override
@SideOnly(Side.CLIENT)
public IIcon getIcon(int side, int meta){
if(side == 1){
return this.topIcon;

View file

@ -33,7 +33,6 @@ import java.util.List;
public class BlockWildPlant extends BlockBush implements IActAddItemOrBlock{
public static final TheWildPlants[] allWildPlants = TheWildPlants.values();
public IIcon[] textures = new IIcon[allWildPlants.length];
public BlockWildPlant(){
this.setStepSound(soundTypeGrass);
@ -45,6 +44,7 @@ public class BlockWildPlant extends BlockBush implements IActAddItemOrBlock{
}
@Override
@SideOnly(Side.CLIENT)
public IIcon getIcon(int side, int metadata){
return metadata >= allWildPlants.length ? null : allWildPlants[metadata].wildVersionOf.getIcon(0, 7);
}
@ -98,8 +98,8 @@ public class BlockWildPlant extends BlockBush implements IActAddItemOrBlock{
this.setMaxDamage(0);
}
@SideOnly(Side.CLIENT)
@Override
@SideOnly(Side.CLIENT)
public IIcon getIconFromDamage(int meta){
return this.field_150939_a.getIcon(0, meta);
}

View file

@ -35,7 +35,9 @@ import net.minecraft.world.World;
public class BlockXPSolidifier extends BlockContainerBase implements IActAddItemOrBlock{
@SideOnly(Side.CLIENT)
private IIcon topIcon;
@SideOnly(Side.CLIENT)
private IIcon frontIcon;
public BlockXPSolidifier(){
@ -52,6 +54,7 @@ public class BlockXPSolidifier extends BlockContainerBase implements IActAddItem
}
@Override
@SideOnly(Side.CLIENT)
public IIcon getIcon(IBlockAccess world, int x, int y, int z, int side){
int meta = world.getBlockMetadata(x, y, z);
if(side == 1 || side == 0){
@ -64,6 +67,7 @@ public class BlockXPSolidifier extends BlockContainerBase implements IActAddItem
}
@Override
@SideOnly(Side.CLIENT)
public IIcon getIcon(int side, int meta){
if(side == 1 || side == 0){
return this.topIcon;

View file

@ -44,14 +44,14 @@ public class BookletChapter{
return this.unlocalizedName;
}
public String getLocalizedName(){
return StringUtil.localize("booklet."+ModUtil.MOD_ID_LOWER+".chapter."+this.unlocalizedName+".name");
}
public String getNameWithColor(){
return this.color+this.getLocalizedName();
}
public String getLocalizedName(){
return StringUtil.localize("booklet."+ModUtil.MOD_ID_LOWER+".chapter."+this.unlocalizedName+".name");
}
public BookletChapter setImportant(){
this.color = EnumChatFormatting.DARK_GREEN;
return this;

View file

@ -19,8 +19,8 @@ import java.util.ArrayList;
public class BookletIndexEntry{
private final String unlocalizedName;
private EnumChatFormatting color;
public ArrayList<BookletChapter> chapters = new ArrayList<BookletChapter>();
private EnumChatFormatting color;
public BookletIndexEntry(String unlocalizedName){
this.unlocalizedName = unlocalizedName;
@ -37,14 +37,14 @@ public class BookletIndexEntry{
this.chapters.add(chapter);
}
public String getLocalizedName(){
return StringUtil.localize("booklet."+ModUtil.MOD_ID_LOWER+".indexEntry."+this.unlocalizedName+".name");
}
public String getNameWithColor(){
return this.color+this.getLocalizedName();
}
public String getLocalizedName(){
return StringUtil.localize("booklet."+ModUtil.MOD_ID_LOWER+".indexEntry."+this.unlocalizedName+".name");
}
public BookletIndexEntry setImportant(){
this.color = EnumChatFormatting.DARK_GREEN;
return this;

View file

@ -27,25 +27,23 @@ import net.minecraftforge.oredict.ShapelessOreRecipe;
public class InitForeignPaxels{
//MekanismTools
private static final String MEKANISM_TOOLS = "MekanismTools";
public static final int[] MT_COLORS = new int[]{4166, 2248890, 8882649, 12410135, 11451392, 3684412};
public static final String[] MT_NAMES = new String[]{"Obsidian", "LapisLazuli", "Osmium", "Bronze", "Glowstone", "Steel"};
public static final int[] TF_COLORS = new int[]{13332762, 5407943, 5407895, 5394789, 12960613, 12960653, 12410135, 2999795, 10143162};
public static final int[] SO_COLORS = new int[]{9409450, 2040021, 5714944, 526344, 545032};
//MekanismTools
private static final String MEKANISM_TOOLS = "MekanismTools";
private static final String[] MT_REPAIR_NAMES = new String[]{"ingotRefinedObsidian", "gemLapis", "ingotOsmium", "ingotBronze", "ingotRefinedGlowstone", "ingotSteel"};
private static Item[] mtPaxels = new Item[6];
//ThermalFoundation
private static final String THERMAL_FOUNDATION = "ThermalFoundation";
public static final int[] TF_COLORS = new int[]{13332762, 5407943, 5407895, 5394789, 12960613, 12960653, 12410135, 2999795, 10143162};
private static final String[] TF_NAMES = new String[]{"Copper", "Tin", "Silver", "Lead", "Nickel", "Electrum", "Bronze", "Platinum", "Invar"};
public static Item[] tfPaxels = new Item[9];
//SimpleOres
private static final String SIMPLE_ORES = "simpleores";
public static final int[] SO_COLORS = new int[]{9409450, 2040021, 5714944, 526344, 545032};
private static final String[] SO_NAMES = new String[]{"tin", "mythril", "copper", "onyx", "adamantium"};
private static final String[] SO_REPAIR_NAMES = new String[]{"ingotTin", "ingotMythril", "ingotCopper", "gemOnyx", "ingotAdamantium"};
public static Item[] tfPaxels = new Item[9];
public static Item[] soPaxels = new Item[5];
private static Item[] mtPaxels = new Item[6];
public static void init(){
//SimpleOres

View file

@ -45,6 +45,7 @@ public class ItemArmorAA extends ItemArmor implements IActAddItemOrBlock{
}
@Override
@SideOnly(Side.CLIENT)
public IIcon getIcon(ItemStack stack, int pass){
return this.itemIcon;
}

View file

@ -40,6 +40,7 @@ public class ItemBattery extends ItemEnergy{
}
@Override
@SideOnly(Side.CLIENT)
public IIcon getIcon(ItemStack stack, int pass){
return this.itemIcon;
}

View file

@ -44,6 +44,7 @@ public class ItemBucketAA extends ItemBucket implements IActAddItemOrBlock{
}
@Override
@SideOnly(Side.CLIENT)
public IIcon getIcon(ItemStack stack, int pass){
return this.itemIcon;
}

View file

@ -86,6 +86,7 @@ public class ItemChestToCrateUpgrade extends Item implements IActAddItemOrBlock{
}
@Override
@SideOnly(Side.CLIENT)
public IIcon getIcon(ItemStack stack, int pass){
return this.itemIcon;
}

View file

@ -188,6 +188,7 @@ public class ItemCoffee extends ItemFood implements IActAddItemOrBlock{
}
@Override
@SideOnly(Side.CLIENT)
public IIcon getIconFromDamage(int par1){
return this.itemIcon;
}

View file

@ -50,6 +50,7 @@ public class ItemCrafterOnAStick extends Item implements IActAddItemOrBlock{
}
@Override
@SideOnly(Side.CLIENT)
public IIcon getIcon(ItemStack stack, int pass){
return this.itemIcon;
}

View file

@ -247,6 +247,7 @@ public class ItemDrill extends ItemEnergy{
}
@Override
@SideOnly(Side.CLIENT)
public IIcon getIcon(ItemStack stack, int pass){
return this.itemIcon;
}

View file

@ -67,6 +67,7 @@ public class ItemDrillUpgrade extends Item implements IActAddItemOrBlock{
}
@Override
@SideOnly(Side.CLIENT)
public IIcon getIcon(ItemStack stack, int pass){
return this.itemIcon;
}

View file

@ -73,6 +73,7 @@ public class ItemDust extends Item implements IActAddItemOrBlock{
}
@Override
@SideOnly(Side.CLIENT)
public IIcon getIcon(ItemStack stack, int pass){
return this.itemIcon;
}

View file

@ -48,6 +48,7 @@ public class ItemFertilizer extends Item implements IActAddItemOrBlock{
}
@Override
@SideOnly(Side.CLIENT)
public IIcon getIcon(ItemStack stack, int pass){
return this.itemIcon;
}

View file

@ -28,7 +28,8 @@ import java.util.List;
public class ItemFoods extends ItemFood implements IActAddItemOrBlock{
public static final TheFoods[] allFoods = TheFoods.values();
public IIcon[] textures = new IIcon[allFoods.length];
@SideOnly(Side.CLIENT)
public IIcon[] textures;
public ItemFoods(){
super(0, 0.0F, false);
@ -74,6 +75,7 @@ public class ItemFoods extends ItemFood implements IActAddItemOrBlock{
}
@Override
@SideOnly(Side.CLIENT)
public IIcon getIconFromDamage(int par1){
return par1 >= textures.length ? null : textures[par1];
}
@ -104,6 +106,7 @@ public class ItemFoods extends ItemFood implements IActAddItemOrBlock{
@Override
@SideOnly(Side.CLIENT)
public void registerIcons(IIconRegister iconReg){
this.textures = new IIcon[allFoods.length];
for(int i = 0; i < textures.length; i++){
textures[i] = iconReg.registerIcon(ModUtil.MOD_ID_LOWER+":"+this.getName()+allFoods[i].name);
}

View file

@ -111,6 +111,7 @@ public class ItemGrowthRing extends ItemEnergy{
}
@Override
@SideOnly(Side.CLIENT)
public IIcon getIcon(ItemStack stack, int pass){
return this.itemIcon;
}

View file

@ -60,6 +60,7 @@ public class ItemHairyBall extends Item implements IActAddItemOrBlock{
}
@Override
@SideOnly(Side.CLIENT)
public IIcon getIcon(ItemStack stack, int pass){
return this.itemIcon;
}

View file

@ -33,6 +33,7 @@ import java.util.List;
public class ItemJams extends ItemFood implements IActAddItemOrBlock{
public static final TheJams[] allJams = TheJams.values();
@SideOnly(Side.CLIENT)
public IIcon overlayIcon;
public ItemJams(){

View file

@ -75,6 +75,7 @@ public class ItemKnife extends Item implements IActAddItemOrBlock{
}
@Override
@SideOnly(Side.CLIENT)
public IIcon getIcon(ItemStack stack, int pass){
return this.itemIcon;
}

View file

@ -107,6 +107,7 @@ public class ItemLaserWrench extends Item implements IActAddItemOrBlock{
}
@Override
@SideOnly(Side.CLIENT)
public IIcon getIcon(ItemStack stack, int pass){
return this.itemIcon;
}

View file

@ -131,6 +131,7 @@ public class ItemLeafBlower extends Item implements IActAddItemOrBlock{
}
@Override
@SideOnly(Side.CLIENT)
public IIcon getIcon(ItemStack stack, int pass){
return this.itemIcon;
}

View file

@ -75,6 +75,7 @@ public class ItemMagnetRing extends ItemEnergy{
}
@Override
@SideOnly(Side.CLIENT)
public IIcon getIcon(ItemStack stack, int pass){
return this.itemIcon;
}

View file

@ -27,13 +27,15 @@ import java.util.List;
public class ItemMisc extends Item implements IActAddItemOrBlock{
public static final TheMiscItems[] allMiscItems = TheMiscItems.values();
public IIcon[] textures = new IIcon[allMiscItems.length];
@SideOnly(Side.CLIENT)
public IIcon[] textures;
public ItemMisc(){
this.setHasSubtypes(true);
}
@Override
@SideOnly(Side.CLIENT)
public IIcon getIconFromDamage(int par1){
return par1 >= textures.length ? null : textures[par1];
}
@ -64,6 +66,7 @@ public class ItemMisc extends Item implements IActAddItemOrBlock{
@Override
@SideOnly(Side.CLIENT)
public void registerIcons(IIconRegister iconReg){
this.textures = new IIcon[allMiscItems.length];
for(int i = 0; i < textures.length; i++){
textures[i] = iconReg.registerIcon(ModUtil.MOD_ID_LOWER+":"+this.getName()+allMiscItems[i].name);
}

View file

@ -146,6 +146,7 @@ public class ItemPhantomConnector extends Item implements IActAddItemOrBlock{
}
@Override
@SideOnly(Side.CLIENT)
public IIcon getIcon(ItemStack stack, int pass){
return this.itemIcon;
}

View file

@ -117,6 +117,7 @@ public class ItemPotionRing extends Item implements IActAddItemOrBlock{
}
@Override
@SideOnly(Side.CLIENT)
public IIcon getIcon(ItemStack stack, int pass){
return this.itemIcon;
}

View file

@ -45,6 +45,7 @@ public class ItemResonantRice extends Item implements IActAddItemOrBlock{
}
@Override
@SideOnly(Side.CLIENT)
public IIcon getIcon(ItemStack stack, int pass){
return this.itemIcon;
}

View file

@ -53,6 +53,7 @@ public class ItemSeed extends ItemSeeds implements IActAddItemOrBlock{
}
@Override
@SideOnly(Side.CLIENT)
public IIcon getIcon(ItemStack stack, int pass){
return this.itemIcon;
}

View file

@ -32,13 +32,15 @@ public class ItemSpecialDrop extends Item implements IActAddItemOrBlock{
public static final int SOLID_XP_AMOUNT = 8;
public static final TheSpecialDrops[] allDrops = TheSpecialDrops.values();
public IIcon[] textures = new IIcon[allDrops.length];
@SideOnly(Side.CLIENT)
public IIcon[] textures;
public ItemSpecialDrop(){
this.setHasSubtypes(true);
}
@Override
@SideOnly(Side.CLIENT)
public IIcon getIconFromDamage(int par1){
return par1 >= textures.length ? null : textures[par1];
}
@ -90,6 +92,7 @@ public class ItemSpecialDrop extends Item implements IActAddItemOrBlock{
@Override
@SideOnly(Side.CLIENT)
public void registerIcons(IIconRegister iconReg){
this.textures = new IIcon[allDrops.length];
for(int i = 0; i < textures.length; i++){
textures[i] = iconReg.registerIcon(ModUtil.MOD_ID_LOWER+":"+this.getName()+allDrops[i].name);
}

View file

@ -91,6 +91,7 @@ public class ItemTeleStaff extends ItemEnergy{
}
@Override
@SideOnly(Side.CLIENT)
public IIcon getIcon(ItemStack stack, int pass){
return this.itemIcon;
}

View file

@ -84,6 +84,7 @@ public class ItemWaterRemovalRing extends ItemEnergy{
}
@Override
@SideOnly(Side.CLIENT)
public IIcon getIcon(ItemStack stack, int pass){
return this.itemIcon;
}

View file

@ -104,6 +104,7 @@ public class ItemWingsOfTheBats extends Item implements IActAddItemOrBlock{
}
@Override
@SideOnly(Side.CLIENT)
public IIcon getIcon(ItemStack stack, int pass){
return this.itemIcon;
}

View file

@ -37,6 +37,7 @@ import java.util.Set;
@SuppressWarnings("unchecked")
public class ItemAllToolAA extends ItemTool implements IActAddItemOrBlock{
@SideOnly(Side.CLIENT)
private IIcon overlayIcon;
private int color;
@ -88,15 +89,20 @@ public class ItemAllToolAA extends ItemTool implements IActAddItemOrBlock{
}
}
@Override
@SideOnly(Side.CLIENT)
public int getColorFromItemStack(ItemStack stack, int pass){
return pass > 0 ? this.color : super.getColorFromItemStack(stack, pass);
}
@Override
public EnumRarity getRarity(ItemStack stack){
return this.rarity;
}
@Override
@SideOnly(Side.CLIENT)
public int getColorFromItemStack(ItemStack stack, int pass){
return pass > 0 ? this.color : super.getColorFromItemStack(stack, pass);
public boolean requiresMultipleRenderPasses(){
return true;
}
@Override
@ -112,11 +118,6 @@ public class ItemAllToolAA extends ItemTool implements IActAddItemOrBlock{
this.overlayIcon = iconReg.registerIcon(ModUtil.MOD_ID_LOWER+":itemPaxelOverlay");
}
@Override
public boolean requiresMultipleRenderPasses(){
return true;
}
@Override
public boolean canHarvestBlock(Block block, ItemStack stack){
return this.hasExtraWhitelist(block) || block.getMaterial().isToolNotRequired() || (block == Blocks.snow_layer || block == Blocks.snow || (block == Blocks.obsidian ? this.toolMaterial.getHarvestLevel() == 3 : (block != Blocks.diamond_block && block != Blocks.diamond_ore ? (block != Blocks.emerald_ore && block != Blocks.emerald_block ? (block != Blocks.gold_block && block != Blocks.gold_ore ? (block != Blocks.iron_block && block != Blocks.iron_ore ? (block != Blocks.lapis_block && block != Blocks.lapis_ore ? (block != Blocks.redstone_ore && block != Blocks.lit_redstone_ore ? (block.getMaterial() == Material.rock || (block.getMaterial() == Material.iron || block.getMaterial() == Material.anvil)) : this.toolMaterial.getHarvestLevel() >= 2) : this.toolMaterial.getHarvestLevel() >= 1) : this.toolMaterial.getHarvestLevel() >= 1) : this.toolMaterial.getHarvestLevel() >= 2) : this.toolMaterial.getHarvestLevel() >= 2) : this.toolMaterial.getHarvestLevel() >= 2)));

View file

@ -57,6 +57,7 @@ public class ItemAxeAA extends ItemAxe implements IActAddItemOrBlock{
}
@Override
@SideOnly(Side.CLIENT)
public IIcon getIcon(ItemStack stack, int pass){
return this.itemIcon;
}

View file

@ -59,6 +59,7 @@ public class ItemHoeAA extends ItemHoe implements IActAddItemOrBlock{
}
@Override
@SideOnly(Side.CLIENT)
public IIcon getIcon(ItemStack stack, int pass){
return this.itemIcon;
}

View file

@ -57,6 +57,7 @@ public class ItemPickaxeAA extends ItemPickaxe implements IActAddItemOrBlock{
}
@Override
@SideOnly(Side.CLIENT)
public IIcon getIcon(ItemStack stack, int pass){
return this.itemIcon;
}

View file

@ -59,6 +59,7 @@ public class ItemShovelAA extends ItemSpade implements IActAddItemOrBlock{
}
@Override
@SideOnly(Side.CLIENT)
public IIcon getIcon(ItemStack stack, int pass){
return this.itemIcon;
}

View file

@ -59,6 +59,7 @@ public class ItemSwordAA extends ItemSword implements IActAddItemOrBlock{
}
@Override
@SideOnly(Side.CLIENT)
public IIcon getIcon(ItemStack stack, int pass){
return this.itemIcon;
}

View file

@ -400,19 +400,6 @@ public class TileEntityInputter extends TileEntityInventoryBase implements IButt
this.markDirty();
}
@Override
public void readSyncableNBT(NBTTagCompound compound, boolean sync){
this.sideToPut = compound.getInteger("SideToPut");
this.slotToPutStart = compound.getInteger("SlotToPut");
this.slotToPutEnd = compound.getInteger("SlotToPutEnd");
this.sideToPull = compound.getInteger("SideToPull");
this.slotToPullStart = compound.getInteger("SlotToPull");
this.slotToPullEnd = compound.getInteger("SlotToPullEnd");
this.isPullWhitelist = compound.getBoolean("PullWhitelist");
this.isPutWhitelist = compound.getBoolean("PutWhitelist");
super.readSyncableNBT(compound, sync);
}
@Override
public void writeSyncableNBT(NBTTagCompound compound, boolean sync){
super.writeSyncableNBT(compound, sync);
@ -426,6 +413,19 @@ public class TileEntityInputter extends TileEntityInventoryBase implements IButt
compound.setBoolean("PutWhitelist", this.isPutWhitelist);
}
@Override
public void readSyncableNBT(NBTTagCompound compound, boolean sync){
this.sideToPut = compound.getInteger("SideToPut");
this.slotToPutStart = compound.getInteger("SlotToPut");
this.slotToPutEnd = compound.getInteger("SlotToPutEnd");
this.sideToPull = compound.getInteger("SideToPull");
this.slotToPullStart = compound.getInteger("SlotToPull");
this.slotToPullEnd = compound.getInteger("SlotToPullEnd");
this.isPullWhitelist = compound.getBoolean("PullWhitelist");
this.isPutWhitelist = compound.getBoolean("PutWhitelist");
super.readSyncableNBT(compound, sync);
}
@Override
public boolean isItemValidForSlot(int i, ItemStack stack){
return i == 0;

View file

@ -28,12 +28,6 @@ import java.util.ArrayList;
public class TileEntityLaserRelay extends TileEntityBase implements IEnergyReceiver{
@Override
public void invalidate(){
super.invalidate();
LaserRelayConnectionHandler.getInstance().removeRelayFromNetwork(new WorldPos(this.worldObj, this.xCoord, this.yCoord, this.zCoord));
}
@Override
public void updateEntity(){
if(this.worldObj.isRemote){
@ -41,6 +35,12 @@ public class TileEntityLaserRelay extends TileEntityBase implements IEnergyRecei
}
}
@Override
public void invalidate(){
super.invalidate();
LaserRelayConnectionHandler.getInstance().removeRelayFromNetwork(new WorldPos(this.worldObj, this.xCoord, this.yCoord, this.zCoord));
}
@SideOnly(Side.CLIENT)
public void renderParticles(){
if(this.worldObj.rand.nextInt(2) == 0){

View file

@ -61,21 +61,6 @@ public class TileEntityPhantomface extends TileEntityInventoryBase implements IP
}
}
@SideOnly(Side.CLIENT)
public void renderParticles(){
if(this.worldObj.rand.nextInt(2) == 0){
double d1 = (double)((float)this.boundPosition.getY()+worldObj.rand.nextFloat());
int i1 = worldObj.rand.nextInt(2)*2-1;
int j1 = worldObj.rand.nextInt(2)*2-1;
double d4 = ((double)worldObj.rand.nextFloat()-0.5D)*0.125D;
double d2 = (double)this.boundPosition.getZ()+0.5D+0.25D*(double)j1;
double d5 = (double)(worldObj.rand.nextFloat()*1.0F*(float)j1);
double d0 = (double)this.boundPosition.getX()+0.5D+0.25D*(double)i1;
double d3 = (double)(worldObj.rand.nextFloat()*1.0F*(float)i1);
worldObj.spawnParticle("portal", d0, d1, d2, d3, d4, d5);
}
}
public static int upgradeRange(int defaultRange, World world, int x, int y, int z){
int newRange = defaultRange;
for(int i = 0; i < 3; i++){
@ -102,6 +87,21 @@ public class TileEntityPhantomface extends TileEntityInventoryBase implements IP
return false;
}
@SideOnly(Side.CLIENT)
public void renderParticles(){
if(this.worldObj.rand.nextInt(2) == 0){
double d1 = (double)((float)this.boundPosition.getY()+worldObj.rand.nextFloat());
int i1 = worldObj.rand.nextInt(2)*2-1;
int j1 = worldObj.rand.nextInt(2)*2-1;
double d4 = ((double)worldObj.rand.nextFloat()-0.5D)*0.125D;
double d2 = (double)this.boundPosition.getZ()+0.5D+0.25D*(double)j1;
double d5 = (double)(worldObj.rand.nextFloat()*1.0F*(float)j1);
double d0 = (double)this.boundPosition.getX()+0.5D+0.25D*(double)i1;
double d3 = (double)(worldObj.rand.nextFloat()*1.0F*(float)i1);
worldObj.spawnParticle("portal", d0, d1, d2, d3, d4, d5);
}
}
@Override
public boolean isBoundThingInRange(){
if(this.hasBoundPosition()){

View file

@ -18,6 +18,10 @@ import net.minecraft.item.ItemBlock;
public class BlockUtil{
public static void register(Block block){
register(block, ItemBlockBase.class);
}
public static void register(Block block, Class<? extends ItemBlock> itemBlock){
block.setCreativeTab(CreativeTab.instance);
block.setBlockName(createUnlocalizedName(block));
@ -27,8 +31,4 @@ public class BlockUtil{
public static String createUnlocalizedName(Block block){
return ModUtil.MOD_ID_LOWER+"."+((IActAddItemOrBlock)block).getName();
}
public static void register(Block block){
register(block, ItemBlockBase.class);
}
}