Auto cleanup

This commit is contained in:
Shadows_of_Fire 2019-02-27 13:53:05 -05:00
parent 82020bcd49
commit 0d8f38710e
204 changed files with 1242 additions and 1307 deletions

View file

@ -14,7 +14,7 @@ import io.netty.util.internal.ConcurrentSet;
public class Network{ public class Network{
public final ConcurrentSet<IConnectionPair> connections = new ConcurrentSet<IConnectionPair>(); public final ConcurrentSet<IConnectionPair> connections = new ConcurrentSet<>();
public int changeAmount; public int changeAmount;
@Override @Override

View file

@ -2,11 +2,11 @@ package de.ellpeck.actuallyadditions.api.misc;
public interface IDisableableItem { public interface IDisableableItem {
/** /**
* Represents an item that can be disabled in the configuration of the mod. * Represents an item that can be disabled in the configuration of the mod.
* If this returns true, assume the item is not registered with the game, but may still be instantiated. * If this returns true, assume the item is not registered with the game, but may still be instantiated.
* @return If the item has not been registered with the Forge Registry. * @return If the item has not been registered with the Forge Registry.
*/ */
public boolean isDisabled(); public boolean isDisabled();
} }

View file

@ -33,11 +33,11 @@ public class CoffeeIngredient {
} }
public boolean matches(ItemStack stack) { public boolean matches(ItemStack stack) {
return input.apply(stack); return this.input.apply(stack);
} }
public Ingredient getInput() { public Ingredient getInput() {
return input; return this.input;
} }
public PotionEffect[] getEffects() { public PotionEffect[] getEffects() {
@ -53,6 +53,6 @@ public class CoffeeIngredient {
} }
public int getMaxAmplifier() { public int getMaxAmplifier() {
return maxAmplifier; return this.maxAmplifier;
} }
} }

View file

@ -35,23 +35,23 @@ public class CompostRecipe{
} }
public boolean matches(ItemStack stack) { public boolean matches(ItemStack stack) {
return input.apply(stack); return this.input.apply(stack);
} }
public Ingredient getInput() { public Ingredient getInput() {
return input; return this.input;
} }
public ItemStack getOutput() { public ItemStack getOutput() {
return output; return this.output;
} }
public IBlockState getInputDisplay() { public IBlockState getInputDisplay() {
return inputDisplay; return this.inputDisplay;
} }
public IBlockState getOutputDisplay() { public IBlockState getOutputDisplay() {
return outputDisplay; return this.outputDisplay;
} }
} }

View file

@ -33,23 +33,23 @@ public class CrusherRecipe {
} }
public boolean matches(ItemStack stack) { public boolean matches(ItemStack stack) {
return input.apply(stack); return this.input.apply(stack);
} }
public ItemStack getOutputOne() { public ItemStack getOutputOne() {
return outputOne; return this.outputOne;
} }
public ItemStack getOutputTwo() { public ItemStack getOutputTwo() {
return outputTwo; return this.outputTwo;
} }
public int getSecondChance() { public int getSecondChance() {
return outputChance; return this.outputChance;
} }
public Ingredient getInput() { public Ingredient getInput() {
return input; return this.input;
} }
} }

View file

@ -48,22 +48,22 @@ public class EmpowererRecipe {
} }
public boolean matches(ItemStack base, ItemStack stand1, ItemStack stand2, ItemStack stand3, ItemStack stand4) { public boolean matches(ItemStack base, ItemStack stand1, ItemStack stand2, ItemStack stand3, ItemStack stand4) {
if (!input.apply(base)) return false; if (!this.input.apply(base)) return false;
List<Ingredient> matches = new ArrayList<>(); List<Ingredient> matches = new ArrayList<>();
ItemStack[] stacks = { stand1, stand2, stand3, stand4 }; ItemStack[] stacks = { stand1, stand2, stand3, stand4 };
boolean[] unused = { true, true, true, true }; boolean[] unused = { true, true, true, true };
for (ItemStack s : stacks) { for (ItemStack s : stacks) {
if (unused[0] && modifier1.apply(s)) { if (unused[0] && this.modifier1.apply(s)) {
matches.add(modifier1); matches.add(this.modifier1);
unused[0] = false; unused[0] = false;
} else if (unused[1] && modifier2.apply(s)) { } else if (unused[1] && this.modifier2.apply(s)) {
matches.add(modifier2); matches.add(this.modifier2);
unused[1] = false; unused[1] = false;
} else if (unused[2] && modifier3.apply(s)) { } else if (unused[2] && this.modifier3.apply(s)) {
matches.add(modifier3); matches.add(this.modifier3);
unused[2] = false; unused[2] = false;
} else if (unused[3] && modifier4.apply(s)) { } else if (unused[3] && this.modifier4.apply(s)) {
matches.add(modifier4); matches.add(this.modifier4);
unused[3] = false; unused[3] = false;
} }
} }
@ -72,38 +72,38 @@ public class EmpowererRecipe {
} }
public Ingredient getInput() { public Ingredient getInput() {
return input; return this.input;
} }
public ItemStack getOutput() { public ItemStack getOutput() {
return output; return this.output;
} }
public Ingredient getStandOne() { public Ingredient getStandOne() {
return modifier1; return this.modifier1;
} }
public Ingredient getStandTwo() { public Ingredient getStandTwo() {
return modifier2; return this.modifier2;
} }
public Ingredient getStandThree() { public Ingredient getStandThree() {
return modifier3; return this.modifier3;
} }
public Ingredient getStandFour() { public Ingredient getStandFour() {
return modifier4; return this.modifier4;
} }
public int getTime() { public int getTime() {
return time; return this.time;
} }
public int getEnergyPerStand() { public int getEnergyPerStand() {
return energyPerStand; return this.energyPerStand;
} }
public float[] getParticleColors() { public float[] getParticleColors() {
return particleColor; return this.particleColor;
} }
} }

View file

@ -41,19 +41,19 @@ public class LensConversionRecipe {
} }
public Ingredient getInput() { public Ingredient getInput() {
return input; return this.input;
} }
public ItemStack getOutput() { public ItemStack getOutput() {
return output; return this.output;
} }
public int getEnergyUsed() { public int getEnergyUsed() {
return energy; return this.energy;
} }
public Lens getType() { public Lens getType() {
return type; return this.type;
} }
public void transformHook(ItemStack stack, IBlockState state, BlockPos pos, IAtomicReconstructor tile) { public void transformHook(ItemStack stack, IBlockState state, BlockPos pos, IAtomicReconstructor tile) {

View file

@ -6,6 +6,7 @@ import de.ellpeck.actuallyadditions.mod.blocks.render.IHasModel;
import de.ellpeck.actuallyadditions.mod.fluids.InitFluids; import de.ellpeck.actuallyadditions.mod.fluids.InitFluids;
import de.ellpeck.actuallyadditions.mod.util.FluidStateMapper; import de.ellpeck.actuallyadditions.mod.util.FluidStateMapper;
import net.minecraft.block.Block; import net.minecraft.block.Block;
import net.minecraft.client.renderer.block.model.ModelBakery;
import net.minecraft.client.renderer.block.model.ModelResourceLocation; import net.minecraft.client.renderer.block.model.ModelResourceLocation;
import net.minecraft.item.Item; import net.minecraft.item.Item;
import net.minecraft.item.ItemStack; import net.minecraft.item.ItemStack;
@ -21,7 +22,7 @@ import java.util.Map;
public class ClientRegistryHandler{ public class ClientRegistryHandler{
public static final Map<ItemStack, ModelResourceLocation> MODEL_LOCATIONS_FOR_REGISTERING = new HashMap<ItemStack, ModelResourceLocation>(); public static final Map<ItemStack, ModelResourceLocation> MODEL_LOCATIONS_FOR_REGISTERING = new HashMap<>();
/** /**
* (Excerpted from Tinkers' Construct with permission, thanks guys!) * (Excerpted from Tinkers' Construct with permission, thanks guys!)
@ -30,7 +31,7 @@ public class ClientRegistryHandler{
Block block = fluid.getBlock(); Block block = fluid.getBlock();
Item item = Item.getItemFromBlock(block); Item item = Item.getItemFromBlock(block);
FluidStateMapper mapper = new FluidStateMapper(fluid); FluidStateMapper mapper = new FluidStateMapper(fluid);
ModelLoader.registerItemVariants(item); ModelBakery.registerItemVariants(item);
ModelLoader.setCustomMeshDefinition(item, mapper); ModelLoader.setCustomMeshDefinition(item, mapper);
ModelLoader.setCustomStateMapper(block, mapper); ModelLoader.setCustomStateMapper(block, mapper);
} }

View file

@ -44,4 +44,4 @@ public final class InitAchievements{
} }
} }
*/ */

View file

@ -143,4 +143,4 @@ public enum TheAchievements{
} }
} }
} }
*/ */

View file

@ -217,11 +217,11 @@ public class BlockAtomicReconstructor extends BlockContainerBase implements IHud
@Override @Override
public int getComparatorInputOverride(IBlockState blockState, World world, BlockPos pos){ public int getComparatorInputOverride(IBlockState blockState, World world, BlockPos pos){
TileEntity t = world.getTileEntity(pos); TileEntity t = world.getTileEntity(pos);
int i = 0; int i = 0;
if (t instanceof TileEntityAtomicReconstructor) { if (t instanceof TileEntityAtomicReconstructor) {
i = ((TileEntityAtomicReconstructor) t).getEnergy(); i = ((TileEntityAtomicReconstructor) t).getEnergy();
} }
return MathHelper.clamp(i / 20000, 0, 15); return MathHelper.clamp(i / 20000, 0, 15);
} }
} }

View file

@ -88,7 +88,7 @@ public class BlockCoffeeMachine extends BlockContainerBase{
@Override @Override
public void onBlockPlacedBy(World world, BlockPos pos, IBlockState state, EntityLivingBase player, ItemStack stack){ public void onBlockPlacedBy(World world, BlockPos pos, IBlockState state, EntityLivingBase player, ItemStack stack){
int rotation = MathHelper.floor((double)(player.rotationYaw*4.0F/360.0F)+0.5D) & 3; int rotation = MathHelper.floor(player.rotationYaw*4.0F/360.0F+0.5D) & 3;
if(rotation == 0){ if(rotation == 0){
world.setBlockState(pos, this.getStateFromMeta(0), 2); world.setBlockState(pos, this.getStateFromMeta(0), 2);

View file

@ -157,8 +157,8 @@ public class BlockColoredLamp extends BlockBase{
if(stack.getItemDamage() >= ALL_LAMP_TYPES.length){ if(stack.getItemDamage() >= ALL_LAMP_TYPES.length){
return StringUtil.BUGGED_ITEM_NAME; return StringUtil.BUGGED_ITEM_NAME;
} }
if(Util.isClient()) return super.getItemStackDisplayName(stack)+(((BlockColoredLamp)this.block).isOn ? " ("+StringUtil.localize("tooltip."+ActuallyAdditions.MODID+".onSuffix.desc")+")" : ""); if(Util.isClient()) return super.getItemStackDisplayName(stack)+(((BlockColoredLamp)this.block).isOn ? " ("+StringUtil.localize("tooltip."+ActuallyAdditions.MODID+".onSuffix.desc")+")" : "");
else return super.getItemStackDisplayName(stack); else return super.getItemStackDisplayName(stack);
} }

View file

@ -139,7 +139,7 @@ public class BlockCompost extends BlockContainerBase implements IHudDisplay {
} }
} }
tile.markDirty(); tile.markDirty();
world.notifyBlockUpdate(pos, getDefaultState(), getDefaultState(), 3); world.notifyBlockUpdate(pos, this.getDefaultState(), this.getDefaultState(), 3);
} }
} else { } else {
return true; return true;

View file

@ -34,7 +34,6 @@ import net.minecraft.util.Mirror;
import net.minecraft.util.Rotation; import net.minecraft.util.Rotation;
import net.minecraft.util.math.BlockPos; import net.minecraft.util.math.BlockPos;
import net.minecraft.util.math.RayTraceResult; import net.minecraft.util.math.RayTraceResult;
import net.minecraft.world.IBlockAccess;
import net.minecraft.world.World; import net.minecraft.world.World;
import net.minecraftforge.fml.relauncher.Side; import net.minecraftforge.fml.relauncher.Side;
import net.minecraftforge.fml.relauncher.SideOnly; import net.minecraftforge.fml.relauncher.SideOnly;
@ -105,12 +104,7 @@ public class BlockCrystalCluster extends BlockBase implements IColorProvidingBlo
@Override @Override
@SideOnly(Side.CLIENT) @SideOnly(Side.CLIENT)
public IBlockColor getBlockColor(){ public IBlockColor getBlockColor(){
return new IBlockColor(){ return (state, world, pos, tintIndex) -> BlockCrystalCluster.this.crystal.clusterColor;
@Override
public int colorMultiplier(IBlockState state, IBlockAccess world, BlockPos pos, int tintIndex){
return BlockCrystalCluster.this.crystal.clusterColor;
}
};
} }
@Override @Override
@ -121,12 +115,7 @@ public class BlockCrystalCluster extends BlockBase implements IColorProvidingBlo
@Override @Override
@SideOnly(Side.CLIENT) @SideOnly(Side.CLIENT)
public IItemColor getItemColor(){ public IItemColor getItemColor(){
return new IItemColor(){ return (stack, tintIndex) -> BlockCrystalCluster.this.crystal.clusterColor;
@Override
public int colorMultiplier(ItemStack stack, int tintIndex){
return BlockCrystalCluster.this.crystal.clusterColor;
}
};
} }
@Override @Override

View file

@ -63,12 +63,12 @@ public class BlockGiantChest extends BlockContainerBase{
@Override @Override
public TileEntity createNewTileEntity(World world, int par2){ public TileEntity createNewTileEntity(World world, int par2){
switch(this.type){ switch(this.type){
case 1: case 1:
return new TileEntityGiantChestMedium(); return new TileEntityGiantChestMedium();
case 2: case 2:
return new TileEntityGiantChestLarge(); return new TileEntityGiantChestLarge();
default: default:
return new TileEntityGiantChest(); return new TileEntityGiantChest();
} }
} }

View file

@ -104,17 +104,17 @@ public class BlockInputter extends BlockContainerBase{
@Override @Override
public String getItemStackDisplayName(ItemStack stack){ public String getItemStackDisplayName(ItemStack stack){
if(Util.isClient()) { if(Util.isClient()) {
long sysTime = System.currentTimeMillis(); long sysTime = System.currentTimeMillis();
if(this.lastSysTime+5000 < sysTime){ if(this.lastSysTime+5000 < sysTime){
this.lastSysTime = sysTime; this.lastSysTime = sysTime;
this.toPick = this.rand.nextInt(NAME_FLAVOR_AMOUNTS)+1; this.toPick = this.rand.nextInt(NAME_FLAVOR_AMOUNTS)+1;
}
return StringUtil.localize(this.getTranslationKey()+".name")+" ("+StringUtil.localize("tile."+ActuallyAdditions.MODID+".block_inputter.add."+this.toPick+".name")+")";
} }
else return super.getItemStackDisplayName(stack);
return StringUtil.localize(this.getTranslationKey()+".name")+" ("+StringUtil.localize("tile."+ActuallyAdditions.MODID+".block_inputter.add."+this.toPick+".name")+")";
}
else return super.getItemStackDisplayName(stack);
} }
} }
} }

View file

@ -10,7 +10,6 @@
package de.ellpeck.actuallyadditions.mod.blocks; package de.ellpeck.actuallyadditions.mod.blocks;
import com.google.common.base.Predicate;
import de.ellpeck.actuallyadditions.mod.tile.TileEntityItemViewerHopping; import de.ellpeck.actuallyadditions.mod.tile.TileEntityItemViewerHopping;
import net.minecraft.block.properties.PropertyDirection; import net.minecraft.block.properties.PropertyDirection;
import net.minecraft.block.state.BlockStateContainer; import net.minecraft.block.state.BlockStateContainer;
@ -34,12 +33,7 @@ import java.util.List;
//Most of this is just copied from BlockHopper, no credit taken. Or clue what it is. //Most of this is just copied from BlockHopper, no credit taken. Or clue what it is.
public class BlockItemViewerHopping extends BlockItemViewer{ public class BlockItemViewerHopping extends BlockItemViewer{
public static final PropertyDirection FACING = PropertyDirection.create("facing", new Predicate<EnumFacing>(){ public static final PropertyDirection FACING = PropertyDirection.create("facing", facing -> facing != EnumFacing.UP);
@Override
public boolean apply(EnumFacing facing){
return facing != EnumFacing.UP;
}
});
private static final AxisAlignedBB BASE_AABB = new AxisAlignedBB(0.0D, 0.0D, 0.0D, 1.0D, 0.625D, 1.0D); private static final AxisAlignedBB BASE_AABB = new AxisAlignedBB(0.0D, 0.0D, 0.0D, 1.0D, 0.625D, 1.0D);
private static final AxisAlignedBB SOUTH_AABB = new AxisAlignedBB(0.0D, 0.0D, 0.0D, 1.0D, 1.0D, 0.125D); private static final AxisAlignedBB SOUTH_AABB = new AxisAlignedBB(0.0D, 0.0D, 0.0D, 1.0D, 1.0D, 0.125D);

View file

@ -99,18 +99,18 @@ public class BlockLaserRelay extends BlockContainerBase implements IHudDisplay{
@Override @Override
public AxisAlignedBB getBoundingBox(IBlockState state, IBlockAccess source, BlockPos pos){ public AxisAlignedBB getBoundingBox(IBlockState state, IBlockAccess source, BlockPos pos){
switch(this.getMetaFromState(state)){ switch(this.getMetaFromState(state)){
case 1: case 1:
return AABB_UP; return AABB_UP;
case 2: case 2:
return AABB_NORTH; return AABB_NORTH;
case 3: case 3:
return AABB_SOUTH; return AABB_SOUTH;
case 4: case 4:
return AABB_WEST; return AABB_WEST;
case 5: case 5:
return AABB_EAST; return AABB_EAST;
default: default:
return AABB_DOWN; return AABB_DOWN;
} }
} }
@ -230,18 +230,18 @@ public class BlockLaserRelay extends BlockContainerBase implements IHudDisplay{
@Override @Override
public TileEntity createNewTileEntity(World world, int i){ public TileEntity createNewTileEntity(World world, int i){
switch(this.type){ switch(this.type){
case ITEM: case ITEM:
return new TileEntityLaserRelayItem(); return new TileEntityLaserRelayItem();
case ITEM_WHITELIST: case ITEM_WHITELIST:
return new TileEntityLaserRelayItemWhitelist(); return new TileEntityLaserRelayItemWhitelist();
case ENERGY_ADVANCED: case ENERGY_ADVANCED:
return new TileEntityLaserRelayEnergyAdvanced(); return new TileEntityLaserRelayEnergyAdvanced();
case ENERGY_EXTREME: case ENERGY_EXTREME:
return new TileEntityLaserRelayEnergyExtreme(); return new TileEntityLaserRelayEnergyExtreme();
case FLUIDS: case FLUIDS:
return new TileEntityLaserRelayFluids(); return new TileEntityLaserRelayFluids();
default: default:
return new TileEntityLaserRelayEnergy(); return new TileEntityLaserRelayEnergy();
} }
} }

View file

@ -76,7 +76,7 @@ public class BlockMiner extends BlockContainerBase implements IHudDisplay{
TileEntity tile = minecraft.world.getTileEntity(posHit.getBlockPos()); TileEntity tile = minecraft.world.getTileEntity(posHit.getBlockPos());
if(tile instanceof TileEntityMiner){ if(tile instanceof TileEntityMiner){
TileEntityMiner miner = (TileEntityMiner)tile; TileEntityMiner miner = (TileEntityMiner)tile;
String info = miner.checkY == 0 ? "Done Mining!" : (miner.checkY == -1 ? "Calculating positions..." : "Mining at "+(miner.getPos().getX()+miner.checkX)+", "+miner.checkY+", "+(miner.getPos().getZ()+miner.checkZ)+"."); String info = miner.checkY == 0 ? "Done Mining!" : miner.checkY == -1 ? "Calculating positions..." : "Mining at "+(miner.getPos().getX()+miner.checkX)+", "+miner.checkY+", "+(miner.getPos().getZ()+miner.checkZ)+".";
minecraft.fontRenderer.drawStringWithShadow(info, resolution.getScaledWidth()/2+5, resolution.getScaledHeight()/2-20, StringUtil.DECIMAL_COLOR_WHITE); minecraft.fontRenderer.drawStringWithShadow(info, resolution.getScaledWidth()/2+5, resolution.getScaledHeight()/2-20, StringUtil.DECIMAL_COLOR_WHITE);
} }
} }

View file

@ -98,7 +98,7 @@ public class BlockMisc extends BlockBase{
@Override @Override
public int getItemBurnTime(ItemStack stack) { public int getItemBurnTime(ItemStack stack) {
if(stack.getMetadata() == TheMiscBlocks.CHARCOAL_BLOCK.ordinal()) return 16000; if(stack.getMetadata() == TheMiscBlocks.CHARCOAL_BLOCK.ordinal()) return 16000;
return super.getItemBurnTime(stack); return super.getItemBurnTime(stack);
} }
} }
} }

View file

@ -86,18 +86,18 @@ public class BlockPhantom extends BlockContainerBase implements IHudDisplay{
@Override @Override
public TileEntity createNewTileEntity(World world, int par2){ public TileEntity createNewTileEntity(World world, int par2){
switch(this.type){ switch(this.type){
case PLACER: case PLACER:
return new TileEntityPhantomPlacer(); return new TileEntityPhantomPlacer();
case BREAKER: case BREAKER:
return new TileEntityPhantomBreaker(); return new TileEntityPhantomBreaker();
case LIQUIFACE: case LIQUIFACE:
return new TileEntityPhantomLiquiface(); return new TileEntityPhantomLiquiface();
case ENERGYFACE: case ENERGYFACE:
return new TileEntityPhantomEnergyface(); return new TileEntityPhantomEnergyface();
case REDSTONEFACE: case REDSTONEFACE:
return new TileEntityPhantomRedstoneface(); return new TileEntityPhantomRedstoneface();
default: default:
return new TileEntityPhantomItemface(); return new TileEntityPhantomItemface();
} }
} }

View file

@ -54,8 +54,8 @@ public class BlockShockSuppressor extends BlockContainerBase{
if(!suppressor.isRedstonePowered){ if(!suppressor.isRedstonePowered){
BlockPos supPos = suppressor.getPos(); BlockPos supPos = suppressor.getPos();
List<Entity> entitiesToRemove = new ArrayList<Entity>(); List<Entity> entitiesToRemove = new ArrayList<>();
List<BlockPos> posesToRemove = new ArrayList<BlockPos>(); List<BlockPos> posesToRemove = new ArrayList<>();
for(BlockPos pos : affectedBlocks){ for(BlockPos pos : affectedBlocks){
if(pos.distanceSq(supPos) <= rangeSq){ if(pos.distanceSq(supPos) <= rangeSq){

View file

@ -118,7 +118,7 @@ public class BlockSlabs extends BlockBase{
if(state.getBlock() == this.block){ if(state.getBlock() == this.block){
BlockSlabs theBlock = (BlockSlabs)this.block; BlockSlabs theBlock = (BlockSlabs)this.block;
if((facing == EnumFacing.UP && state.getValue(BlockSlab.HALF) == BlockSlab.EnumBlockHalf.BOTTOM) || (facing == EnumFacing.DOWN && state.getValue(BlockSlab.HALF) == BlockSlab.EnumBlockHalf.TOP)){ if(facing == EnumFacing.UP && state.getValue(BlockSlab.HALF) == BlockSlab.EnumBlockHalf.BOTTOM || facing == EnumFacing.DOWN && state.getValue(BlockSlab.HALF) == BlockSlab.EnumBlockHalf.TOP){
IBlockState newState = theBlock.fullBlockState; IBlockState newState = theBlock.fullBlockState;
AxisAlignedBB bound = newState.getCollisionBoundingBox(world, pos); AxisAlignedBB bound = newState.getCollisionBoundingBox(world, pos);
@ -145,7 +145,7 @@ public class BlockSlabs extends BlockBase{
IBlockState state = worldIn.getBlockState(pos); IBlockState state = worldIn.getBlockState(pos);
if(state.getBlock() == this.block){ if(state.getBlock() == this.block){
if((side == EnumFacing.UP && state.getValue(BlockSlab.HALF) == BlockSlab.EnumBlockHalf.BOTTOM) || (side == EnumFacing.DOWN && state.getValue(BlockSlab.HALF) == BlockSlab.EnumBlockHalf.TOP)){ if(side == EnumFacing.UP && state.getValue(BlockSlab.HALF) == BlockSlab.EnumBlockHalf.BOTTOM || side == EnumFacing.DOWN && state.getValue(BlockSlab.HALF) == BlockSlab.EnumBlockHalf.TOP){
return true; return true;
} }
} }
@ -162,7 +162,7 @@ public class BlockSlabs extends BlockBase{
AxisAlignedBB bound = newState.getCollisionBoundingBox(world, pos); AxisAlignedBB bound = newState.getCollisionBoundingBox(world, pos);
if(bound != Block.NULL_AABB && world.checkNoEntityCollision(bound.offset(pos)) && world.setBlockState(pos, newState, 11)){ if(bound != Block.NULL_AABB && world.checkNoEntityCollision(bound.offset(pos)) && world.setBlockState(pos, newState, 11)){
SoundType soundtype = theBlock.fullBlockState.getBlock().getSoundType(theBlock.fullBlockState, world, pos, player); SoundType soundtype = theBlock.fullBlockState.getBlock().getSoundType(theBlock.fullBlockState, world, pos, player);
world.playSound(player, pos, soundtype.getPlaceSound(), SoundCategory.BLOCKS, (soundtype.getVolume()+1.0F)/2.0F, soundtype.getPitch()*0.8F); world.playSound(player, pos, soundtype.getPlaceSound(), SoundCategory.BLOCKS, (soundtype.getVolume()+1.0F)/2.0F, soundtype.getPitch()*0.8F);
player.setHeldItem(hand, StackUtil.shrink(stack, 1)); player.setHeldItem(hand, StackUtil.shrink(stack, 1));

View file

@ -55,16 +55,16 @@ public class BlockTinyTorch extends BlockBase{
@Override @Override
public AxisAlignedBB getBoundingBox(IBlockState state, IBlockAccess source, BlockPos pos){ public AxisAlignedBB getBoundingBox(IBlockState state, IBlockAccess source, BlockPos pos){
switch(state.getValue(BlockTorch.FACING)){ switch(state.getValue(BlockTorch.FACING)){
case EAST: case EAST:
return TORCH_EAST_AABB; return TORCH_EAST_AABB;
case WEST: case WEST:
return TORCH_WEST_AABB; return TORCH_WEST_AABB;
case SOUTH: case SOUTH:
return TORCH_SOUTH_AABB; return TORCH_SOUTH_AABB;
case NORTH: case NORTH:
return TORCH_NORTH_AABB; return TORCH_NORTH_AABB;
default: default:
return STANDING_AABB; return STANDING_AABB;
} }
} }
@ -189,14 +189,14 @@ public class BlockTinyTorch extends BlockBase{
public void randomDisplayTick(IBlockState stateIn, World worldIn, BlockPos pos, Random rand){ public void randomDisplayTick(IBlockState stateIn, World worldIn, BlockPos pos, Random rand){
if(rand.nextBoolean()){ if(rand.nextBoolean()){
EnumFacing enumfacing = stateIn.getValue(BlockTorch.FACING); EnumFacing enumfacing = stateIn.getValue(BlockTorch.FACING);
double d0 = (double)pos.getX()+0.5D; double d0 = pos.getX()+0.5D;
double d1 = (double)pos.getY()+0.4D; double d1 = pos.getY()+0.4D;
double d2 = (double)pos.getZ()+0.5D; double d2 = pos.getZ()+0.5D;
if(enumfacing.getAxis().isHorizontal()){ if(enumfacing.getAxis().isHorizontal()){
EnumFacing enumfacing1 = enumfacing.getOpposite(); EnumFacing enumfacing1 = enumfacing.getOpposite();
worldIn.spawnParticle(EnumParticleTypes.SMOKE_NORMAL, d0+0.35D*(double)enumfacing1.getXOffset(), d1+0.22D, d2+0.35D*(double)enumfacing1.getZOffset(), 0.0D, 0.0D, 0.0D); worldIn.spawnParticle(EnumParticleTypes.SMOKE_NORMAL, d0+0.35D*enumfacing1.getXOffset(), d1+0.22D, d2+0.35D*enumfacing1.getZOffset(), 0.0D, 0.0D, 0.0D);
worldIn.spawnParticle(EnumParticleTypes.FLAME, d0+0.35D*(double)enumfacing1.getXOffset(), d1+0.22D, d2+0.35D*(double)enumfacing1.getZOffset(), 0.0D, 0.0D, 0.0D); worldIn.spawnParticle(EnumParticleTypes.FLAME, d0+0.35D*enumfacing1.getXOffset(), d1+0.22D, d2+0.35D*enumfacing1.getZOffset(), 0.0D, 0.0D, 0.0D);
} }
else{ else{
worldIn.spawnParticle(EnumParticleTypes.SMOKE_NORMAL, d0, d1, d2, 0.0D, 0.0D, 0.0D); worldIn.spawnParticle(EnumParticleTypes.SMOKE_NORMAL, d0, d1, d2, 0.0D, 0.0D, 0.0D);
@ -210,21 +210,21 @@ public class BlockTinyTorch extends BlockBase{
IBlockState iblockstate = this.getDefaultState(); IBlockState iblockstate = this.getDefaultState();
switch(meta){ switch(meta){
case 1: case 1:
iblockstate = iblockstate.withProperty(BlockTorch.FACING, EnumFacing.EAST); iblockstate = iblockstate.withProperty(BlockTorch.FACING, EnumFacing.EAST);
break; break;
case 2: case 2:
iblockstate = iblockstate.withProperty(BlockTorch.FACING, EnumFacing.WEST); iblockstate = iblockstate.withProperty(BlockTorch.FACING, EnumFacing.WEST);
break; break;
case 3: case 3:
iblockstate = iblockstate.withProperty(BlockTorch.FACING, EnumFacing.SOUTH); iblockstate = iblockstate.withProperty(BlockTorch.FACING, EnumFacing.SOUTH);
break; break;
case 4: case 4:
iblockstate = iblockstate.withProperty(BlockTorch.FACING, EnumFacing.NORTH); iblockstate = iblockstate.withProperty(BlockTorch.FACING, EnumFacing.NORTH);
break; break;
case 5: case 5:
default: default:
iblockstate = iblockstate.withProperty(BlockTorch.FACING, EnumFacing.UP); iblockstate = iblockstate.withProperty(BlockTorch.FACING, EnumFacing.UP);
} }
return iblockstate; return iblockstate;
@ -240,22 +240,22 @@ public class BlockTinyTorch extends BlockBase{
int i = 0; int i = 0;
switch(state.getValue(BlockTorch.FACING)){ switch(state.getValue(BlockTorch.FACING)){
case EAST: case EAST:
i = i | 1; i = i | 1;
break; break;
case WEST: case WEST:
i = i | 2; i = i | 2;
break; break;
case SOUTH: case SOUTH:
i = i | 3; i = i | 3;
break; break;
case NORTH: case NORTH:
i = i | 4; i = i | 4;
break; break;
case DOWN: case DOWN:
case UP: case UP:
default: default:
i = i | 5; i = i | 5;
} }
return i; return i;

View file

@ -117,7 +117,7 @@ public class BlockWallAA extends BlockBase{
public boolean canConnectTo(IBlockAccess worldIn, BlockPos pos){ public boolean canConnectTo(IBlockAccess worldIn, BlockPos pos){
IBlockState state = worldIn.getBlockState(pos); IBlockState state = worldIn.getBlockState(pos);
Block block = state.getBlock(); Block block = state.getBlock();
return block != Blocks.BARRIER && (!(block != this && !(block instanceof BlockFenceGate)) || ((state.getMaterial().isOpaque() && state.isFullCube()) && state.getMaterial() != Material.GOURD)); return block != Blocks.BARRIER && (!(block != this && !(block instanceof BlockFenceGate)) || state.getMaterial().isOpaque() && state.isFullCube() && state.getMaterial() != Material.GOURD);
} }

View file

@ -45,6 +45,7 @@ public class BlockBase extends Block implements ItemBlockBase.ICustomRarity, IHa
return true; return true;
} }
@Override
public void registerRendering(){ public void registerRendering(){
ActuallyAdditions.PROXY.addRenderRegister(new ItemStack(this), this.getRegistryName(), "inventory"); ActuallyAdditions.PROXY.addRenderRegister(new ItemStack(this), this.getRegistryName(), "inventory");
} }

View file

@ -45,6 +45,7 @@ public class BlockBushBase extends BlockBush implements ItemBlockBase.ICustomRar
return true; return true;
} }
@Override
public void registerRendering(){ public void registerRendering(){
ActuallyAdditions.PROXY.addRenderRegister(new ItemStack(this), this.getRegistryName(), "inventory"); ActuallyAdditions.PROXY.addRenderRegister(new ItemStack(this), this.getRegistryName(), "inventory");
} }

View file

@ -74,6 +74,7 @@ public abstract class BlockContainerBase extends BlockContainer implements ItemB
return true; return true;
} }
@Override
public void registerRendering(){ public void registerRendering(){
ActuallyAdditions.PROXY.addRenderRegister(new ItemStack(this), this.getRegistryName(), "inventory"); ActuallyAdditions.PROXY.addRenderRegister(new ItemStack(this), this.getRegistryName(), "inventory");
} }
@ -246,7 +247,7 @@ public abstract class BlockContainerBase extends BlockContainer implements ItemB
base.writeSyncableNBT(data, TileEntityBase.NBTType.SAVE_BLOCK); base.writeSyncableNBT(data, TileEntityBase.NBTType.SAVE_BLOCK);
//Remove unnecessarily saved default values to avoid unstackability //Remove unnecessarily saved default values to avoid unstackability
List<String> keysToRemove = new ArrayList<String>(); List<String> keysToRemove = new ArrayList<>();
for(String key : data.getKeySet()){ for(String key : data.getKeySet()){
NBTBase tag = data.getTag(key); NBTBase tag = data.getTag(key);
//Remove only ints because they are the most common ones //Remove only ints because they are the most common ones

View file

@ -69,6 +69,7 @@ public class BlockPlant extends BlockCrops implements ItemBlockBase.ICustomRarit
return false; return false;
} }
@Override
public void registerRendering(){ public void registerRendering(){
ActuallyAdditions.PROXY.addRenderRegister(new ItemStack(this), this.getRegistryName(), "inventory"); ActuallyAdditions.PROXY.addRenderRegister(new ItemStack(this), this.getRegistryName(), "inventory");
} }

View file

@ -52,6 +52,7 @@ public class BlockStair extends BlockStairs implements ItemBlockBase.ICustomRari
return true; return true;
} }
@Override
public void registerRendering(){ public void registerRendering(){
ActuallyAdditions.PROXY.addRenderRegister(new ItemStack(this), this.getRegistryName(), "inventory"); ActuallyAdditions.PROXY.addRenderRegister(new ItemStack(this), this.getRegistryName(), "inventory");
} }

View file

@ -40,10 +40,10 @@ public enum TheWildPlants implements IStringSerializable {
} }
public EnumRarity getRarity() { public EnumRarity getRarity() {
return rarity; return this.rarity;
} }
public Block getNormalVersion() { public Block getNormalVersion() {
return normal; return this.normal;
} }
} }

View file

@ -35,8 +35,8 @@ public class CompostModel implements IBakedModel {
for (EnumFacing face : EnumFacing.values()) { for (EnumFacing face : EnumFacing.values()) {
builder = ImmutableList.builder(); builder = ImmutableList.builder();
if (!display.isBuiltInRenderer()) { if (!this.display.isBuiltInRenderer()) {
for (BakedQuad quad : display.getQuads(flowerState, face, 0)) { for (BakedQuad quad : this.display.getQuads(flowerState, face, 0)) {
Transformer transformer = new Transformer(transform, quad.getFormat()); Transformer transformer = new Transformer(transform, quad.getFormat());
quad.pipe(transformer); quad.pipe(transformer);
builder.add(transformer.build()); builder.add(transformer.build());
@ -46,29 +46,29 @@ public class CompostModel implements IBakedModel {
faces.put(face, builder.build()); faces.put(face, builder.build());
} }
if (!display.isBuiltInRenderer()) { if (!this.display.isBuiltInRenderer()) {
builder = ImmutableList.builder(); builder = ImmutableList.builder();
for (BakedQuad quad : display.getQuads(flowerState, null, 0)) { for (BakedQuad quad : this.display.getQuads(flowerState, null, 0)) {
Transformer transformer = new Transformer(transform, quad.getFormat()); Transformer transformer = new Transformer(transform, quad.getFormat());
quad.pipe(transformer); quad.pipe(transformer);
builder.add(transformer.build()); builder.add(transformer.build());
} }
builder.addAll(compostBase.getQuads(null, null, 0)); builder.addAll(compostBase.getQuads(null, null, 0));
this.general = builder.build(); this.general = builder.build();
} else general = ImmutableList.of(); } else this.general = ImmutableList.of();
this.faces = Maps.immutableEnumMap(faces); this.faces = Maps.immutableEnumMap(faces);
} }
@Override @Override
public List<BakedQuad> getQuads(@Nullable IBlockState state, @Nullable EnumFacing side, long rand) { public List<BakedQuad> getQuads(@Nullable IBlockState state, @Nullable EnumFacing side, long rand) {
if (side == null) return general; if (side == null) return this.general;
return faces.get(side); return this.faces.get(side);
} }
@Override @Override
public boolean isAmbientOcclusion() { public boolean isAmbientOcclusion() {
return compostBase.isAmbientOcclusion() && display.isAmbientOcclusion(); return compostBase.isAmbientOcclusion() && this.display.isAmbientOcclusion();
} }
@Override @Override

View file

@ -37,7 +37,7 @@ public class RenderBatteryBox extends TileEntitySpecialRenderer<TileEntityBatter
return; return;
} }
ItemStack stack = ((TileEntityBatteryBox)tile).inv.getStackInSlot(0); ItemStack stack = tile.inv.getStackInSlot(0);
if(StackUtil.isValid(stack) && stack.getItem() instanceof ItemBattery){ if(StackUtil.isValid(stack) && stack.getItem() instanceof ItemBattery){
GlStateManager.pushMatrix(); GlStateManager.pushMatrix();
GlStateManager.translate((float)x+0.5F, (float)y+1F, (float)z+0.5F); GlStateManager.translate((float)x+0.5F, (float)y+1F, (float)z+0.5F);
@ -71,7 +71,7 @@ public class RenderBatteryBox extends TileEntitySpecialRenderer<TileEntityBatter
double boop = Minecraft.getSystemTime()/800D; double boop = Minecraft.getSystemTime()/800D;
GlStateManager.translate(0D, Math.sin(boop%(2*Math.PI))*0.065, 0D); GlStateManager.translate(0D, Math.sin(boop%(2*Math.PI))*0.065, 0D);
GlStateManager.rotate((float)(((boop*40D)%360)), 0, 1, 0); GlStateManager.rotate((float)(boop*40D%360), 0, 1, 0);
float scale = stack.getItem() instanceof ItemBlock ? 0.85F : 0.65F; float scale = stack.getItem() instanceof ItemBlock ? 0.85F : 0.65F;
GlStateManager.scale(scale, scale, scale); GlStateManager.scale(scale, scale, scale);

View file

@ -31,14 +31,14 @@ public class RenderDisplayStand extends TileEntitySpecialRenderer<TileEntityDisp
return; return;
} }
ItemStack stack = ((TileEntityDisplayStand)tile).inv.getStackInSlot(0); ItemStack stack = tile.inv.getStackInSlot(0);
if(StackUtil.isValid(stack)){ if(StackUtil.isValid(stack)){
GlStateManager.pushMatrix(); GlStateManager.pushMatrix();
GlStateManager.translate((float)x+0.5F, (float)y+1F, (float)z+0.5F); GlStateManager.translate((float)x+0.5F, (float)y+1F, (float)z+0.5F);
double boop = Minecraft.getSystemTime()/800D; double boop = Minecraft.getSystemTime()/800D;
GlStateManager.translate(0D, Math.sin(boop%(2*Math.PI))*0.065, 0D); GlStateManager.translate(0D, Math.sin(boop%(2*Math.PI))*0.065, 0D);
GlStateManager.rotate((float)(((boop*40D)%360)), 0, 1, 0); GlStateManager.rotate((float)(boop*40D%360), 0, 1, 0);
float scale = stack.getItem() instanceof ItemBlock ? 0.85F : 0.65F; float scale = stack.getItem() instanceof ItemBlock ? 0.85F : 0.65F;
GlStateManager.scale(scale, scale, scale); GlStateManager.scale(scale, scale, scale);

View file

@ -35,14 +35,14 @@ public class RenderEmpowerer extends TileEntitySpecialRenderer<TileEntityEmpower
return; return;
} }
ItemStack stack = ((TileEntityEmpowerer)tile).inv.getStackInSlot(0); ItemStack stack = tile.inv.getStackInSlot(0);
if(StackUtil.isValid(stack)){ if(StackUtil.isValid(stack)){
GlStateManager.pushMatrix(); GlStateManager.pushMatrix();
GlStateManager.translate((float)x+0.5F, (float)y+1F, (float)z+0.5F); GlStateManager.translate((float)x+0.5F, (float)y+1F, (float)z+0.5F);
double boop = Minecraft.getSystemTime()/800D; double boop = Minecraft.getSystemTime()/800D;
GlStateManager.translate(0D, Math.sin(boop%(2*Math.PI))*0.065, 0D); GlStateManager.translate(0D, Math.sin(boop%(2*Math.PI))*0.065, 0D);
GlStateManager.rotate((float)(((boop*40D)%360)), 0, 1, 0); GlStateManager.rotate((float)(boop*40D%360), 0, 1, 0);
float scale = stack.getItem() instanceof ItemBlock ? 0.85F : 0.65F; float scale = stack.getItem() instanceof ItemBlock ? 0.85F : 0.65F;
GlStateManager.scale(scale, scale, scale); GlStateManager.scale(scale, scale, scale);
@ -56,7 +56,7 @@ public class RenderEmpowerer extends TileEntitySpecialRenderer<TileEntityEmpower
GlStateManager.popMatrix(); GlStateManager.popMatrix();
} }
int index = ((TileEntityEmpowerer)tile).recipeForRenderIndex; int index = tile.recipeForRenderIndex;
if(index >= 0 && ActuallyAdditionsAPI.EMPOWERER_RECIPES.size() > index){ if(index >= 0 && ActuallyAdditionsAPI.EMPOWERER_RECIPES.size() > index){
EmpowererRecipe recipe = ActuallyAdditionsAPI.EMPOWERER_RECIPES.get(index); EmpowererRecipe recipe = ActuallyAdditionsAPI.EMPOWERER_RECIPES.get(index);
if(recipe != null){ if(recipe != null){

View file

@ -43,7 +43,7 @@ public class RenderLaserRelay extends TileEntitySpecialRenderer<TileEntityLaserR
@Override @Override
public void render(TileEntityLaserRelay tile, double x, double y, double z, float par5, int par6, float f){ public void render(TileEntityLaserRelay tile, double x, double y, double z, float par5, int par6, float f){
if(tile instanceof TileEntityLaserRelay){ if(tile instanceof TileEntityLaserRelay){
TileEntityLaserRelay relay = (TileEntityLaserRelay)tile; TileEntityLaserRelay relay = tile;
boolean hasInvis = false; boolean hasInvis = false;
EntityPlayer player = Minecraft.getMinecraft().player; EntityPlayer player = Minecraft.getMinecraft().player;
@ -56,7 +56,7 @@ public class RenderLaserRelay extends TileEntitySpecialRenderer<TileEntityLaserR
} }
ItemStack hand = player.getHeldItemMainhand(); ItemStack hand = player.getHeldItemMainhand();
if(hasGoggles || (StackUtil.isValid(hand) && (hand.getItem() == ConfigValues.itemCompassConfigurator || hand.getItem() instanceof ItemLaserWrench)) || "themattabase".equals(player.getName())){ if(hasGoggles || StackUtil.isValid(hand) && (hand.getItem() == ConfigValues.itemCompassConfigurator || hand.getItem() instanceof ItemLaserWrench) || "themattabase".equals(player.getName())){
GlStateManager.pushMatrix(); GlStateManager.pushMatrix();
float yTrans = tile.getBlockMetadata() == 0 ? 0.2F : 0.8F; float yTrans = tile.getBlockMetadata() == 0 ? 0.2F : 0.8F;
@ -64,7 +64,7 @@ public class RenderLaserRelay extends TileEntitySpecialRenderer<TileEntityLaserR
GlStateManager.scale(0.2F, 0.2F, 0.2F); GlStateManager.scale(0.2F, 0.2F, 0.2F);
double boop = Minecraft.getSystemTime()/800D; double boop = Minecraft.getSystemTime()/800D;
GlStateManager.rotate((float)(((boop*40D)%360)), 0, 1, 0); GlStateManager.rotate((float)(boop*40D%360), 0, 1, 0);
AssetUtil.renderItemInWorld(upgrade); AssetUtil.renderItemInWorld(upgrade);
@ -85,7 +85,7 @@ public class RenderLaserRelay extends TileEntitySpecialRenderer<TileEntityLaserR
boolean otherInvis = StackUtil.isValid(secondUpgrade) && secondUpgrade.getItem() == InitItems.itemLaserUpgradeInvisibility; boolean otherInvis = StackUtil.isValid(secondUpgrade) && secondUpgrade.getItem() == InitItems.itemLaserUpgradeInvisibility;
if(hasGoggles || !hasInvis || !otherInvis){ if(hasGoggles || !hasInvis || !otherInvis){
float[] color = hasInvis && otherInvis ? COLOR_INFRARED : (relay.type == LaserType.ITEM ? COLOR_ITEM : (relay.type == LaserType.FLUID ? COLOR_FLUIDS : COLOR)); float[] color = hasInvis && otherInvis ? COLOR_INFRARED : relay.type == LaserType.ITEM ? COLOR_ITEM : relay.type == LaserType.FLUID ? COLOR_FLUIDS : COLOR;
AssetUtil.renderLaser(first.getX()+0.5, first.getY()+0.5, first.getZ()+0.5, second.getX()+0.5, second.getY()+0.5, second.getZ()+0.5, 120, hasInvis && otherInvis ? 0.1F : 0.35F, 0.05, color); AssetUtil.renderLaser(first.getX()+0.5, first.getY()+0.5, first.getZ()+0.5, second.getX()+0.5, second.getY()+0.5, second.getZ()+0.5, 120, hasInvis && otherInvis ? 0.1F : 0.35F, 0.05, color);
} }

View file

@ -27,10 +27,9 @@ public class RenderReconstructorLens extends TileEntitySpecialRenderer<TileEntit
@Override @Override
public void render(TileEntityAtomicReconstructor tile, double x, double y, double z, float par5, int par6, float f){ public void render(TileEntityAtomicReconstructor tile, double x, double y, double z, float par5, int par6, float f){
if(!(tile instanceof TileEntityAtomicReconstructor)){ if(tile == null) return;
return;
} ItemStack stack = tile.inv.getStackInSlot(0);
ItemStack stack = ((TileEntityAtomicReconstructor)tile).inv.getStackInSlot(0);
if(StackUtil.isValid(stack) && stack.getItem() instanceof ILensItem){ if(StackUtil.isValid(stack) && stack.getItem() instanceof ILensItem){
GlStateManager.pushMatrix(); GlStateManager.pushMatrix();

View file

@ -43,15 +43,15 @@ public class RenderSmileyCloud extends TileEntitySpecialRenderer<TileEntitySmile
boolean renderedEaster = false; boolean renderedEaster = false;
easterEggs: easterEggs:
for(ISmileyCloudEasterEgg cloud : SmileyCloudEasterEggs.CLOUD_STUFF){ for(ISmileyCloudEasterEgg cloud : SmileyCloudEasterEggs.CLOUD_STUFF){
for(String triggerName : cloud.getTriggerNames()){ for(String triggerName : cloud.getTriggerNames()){
if(triggerName != null && theCloud.name != null){ if(triggerName != null && theCloud.name != null){
if(triggerName.equalsIgnoreCase(theCloud.name)){ if(triggerName.equalsIgnoreCase(theCloud.name)){
GlStateManager.pushMatrix(); GlStateManager.pushMatrix();
IBlockState state = theCloud.getWorld().getBlockState(theCloud.getPos()); IBlockState state = theCloud.getWorld().getBlockState(theCloud.getPos());
if(state.getBlock() == InitBlocks.blockSmileyCloud){ if(state.getBlock() == InitBlocks.blockSmileyCloud){
switch(state.getValue(BlockHorizontal.FACING)){ switch(state.getValue(BlockHorizontal.FACING)){
case NORTH: case NORTH:
GlStateManager.rotate(180, 0, 1, 0); GlStateManager.rotate(180, 0, 1, 0);
break; break;
@ -62,19 +62,19 @@ public class RenderSmileyCloud extends TileEntitySpecialRenderer<TileEntitySmile
GlStateManager.rotate(90, 0, 1, 0); GlStateManager.rotate(90, 0, 1, 0);
break; break;
default: default:
break; break;
}
} }
cloud.renderExtra(0.0625F);
GlStateManager.popMatrix();
renderedEaster = true;
break easterEggs;
} }
cloud.renderExtra(0.0625F);
GlStateManager.popMatrix();
renderedEaster = true;
break easterEggs;
} }
} }
} }
}
String nameLower = theCloud.name.toLowerCase(Locale.ROOT); String nameLower = theCloud.name.toLowerCase(Locale.ROOT);
if(SpecialRenderInit.SPECIAL_LIST.containsKey(nameLower)){ if(SpecialRenderInit.SPECIAL_LIST.containsKey(nameLower)){

View file

@ -29,18 +29,18 @@ public class Transformer extends VertexTransformer {
@Override @Override
public void put(int element, float... data) { public void put(int element, float... data) {
VertexFormatElement.EnumUsage usage = parent.getVertexFormat().getElement(element).getUsage(); VertexFormatElement.EnumUsage usage = this.parent.getVertexFormat().getElement(element).getUsage();
// transform normals and position // transform normals and position
if (usage == VertexFormatElement.EnumUsage.POSITION && data.length >= 3) { if (usage == VertexFormatElement.EnumUsage.POSITION && data.length >= 3) {
Vector4f vec = new Vector4f(data); Vector4f vec = new Vector4f(data);
vec.setW(1.0f); vec.setW(1.0f);
transformation.transform(vec); this.transformation.transform(vec);
data = new float[4]; data = new float[4];
vec.get(data); vec.get(data);
} else if (usage == VertexFormatElement.EnumUsage.NORMAL && data.length >= 3) { } else if (usage == VertexFormatElement.EnumUsage.NORMAL && data.length >= 3) {
Vector3f vec = new Vector3f(data); Vector3f vec = new Vector3f(data);
normalTransformation.transform(vec); this.normalTransformation.transform(vec);
vec.normalize(); vec.normalize();
data = new float[4]; data = new float[4];
vec.get(data); vec.get(data);
@ -49,6 +49,6 @@ public class Transformer extends VertexTransformer {
} }
public UnpackedBakedQuad build() { public UnpackedBakedQuad build() {
return ((UnpackedBakedQuad.Builder) parent).build(); return ((UnpackedBakedQuad.Builder) this.parent).build();
} }
} }

View file

@ -13,7 +13,6 @@ package de.ellpeck.actuallyadditions.mod.booklet;
import java.util.ArrayList; import java.util.ArrayList;
import java.util.Arrays; import java.util.Arrays;
import java.util.Collections; import java.util.Collections;
import java.util.Comparator;
import java.util.List; import java.util.List;
import de.ellpeck.actuallyadditions.api.ActuallyAdditionsAPI; import de.ellpeck.actuallyadditions.api.ActuallyAdditionsAPI;
@ -127,12 +126,12 @@ public final class InitBooklet{
for(IBookletPage page : chapter.getAllPages()){ for(IBookletPage page : chapter.getAllPages()){
pageCount++; pageCount++;
List<ItemStack> items = new ArrayList<ItemStack>(); List<ItemStack> items = new ArrayList<>();
page.getItemStacksForPage(items); page.getItemStacksForPage(items);
List<FluidStack> fluids = new ArrayList<FluidStack>(); List<FluidStack> fluids = new ArrayList<>();
page.getFluidStacksForPage(fluids); page.getFluidStacksForPage(fluids);
if((items != null && !items.isEmpty()) || (fluids != null && !fluids.isEmpty())){ if(items != null && !items.isEmpty() || fluids != null && !fluids.isEmpty()){
if(!ActuallyAdditionsAPI.BOOKLET_PAGES_WITH_ITEM_OR_FLUID_DATA.contains(page)){ if(!ActuallyAdditionsAPI.BOOKLET_PAGES_WITH_ITEM_OR_FLUID_DATA.contains(page)){
ActuallyAdditionsAPI.BOOKLET_PAGES_WITH_ITEM_OR_FLUID_DATA.add(page); ActuallyAdditionsAPI.BOOKLET_PAGES_WITH_ITEM_OR_FLUID_DATA.add(page);
infoCount++; infoCount++;
@ -143,29 +142,20 @@ public final class InitBooklet{
} }
} }
Collections.sort(ActuallyAdditionsAPI.BOOKLET_ENTRIES, new Comparator<IBookletEntry>(){ Collections.sort(ActuallyAdditionsAPI.BOOKLET_ENTRIES, (entry1, entry2) -> {
@Override Integer prio1 = entry1.getSortingPriority();
public int compare(IBookletEntry entry1, IBookletEntry entry2){ Integer prio2 = entry2.getSortingPriority();
Integer prio1 = entry1.getSortingPriority(); return prio2.compareTo(prio1);
Integer prio2 = entry2.getSortingPriority();
return prio2.compareTo(prio1);
}
}); });
Collections.sort(ActuallyAdditionsAPI.ALL_CHAPTERS, new Comparator<IBookletChapter>(){ Collections.sort(ActuallyAdditionsAPI.ALL_CHAPTERS, (chapter1, chapter2) -> {
@Override Integer prio1 = chapter1.getSortingPriority();
public int compare(IBookletChapter chapter1, IBookletChapter chapter2){ Integer prio2 = chapter2.getSortingPriority();
Integer prio1 = chapter1.getSortingPriority(); return prio2.compareTo(prio1);
Integer prio2 = chapter2.getSortingPriority();
return prio2.compareTo(prio1);
}
}); });
Collections.sort(ActuallyAdditionsAPI.BOOKLET_PAGES_WITH_ITEM_OR_FLUID_DATA, new Comparator<IBookletPage>(){ Collections.sort(ActuallyAdditionsAPI.BOOKLET_PAGES_WITH_ITEM_OR_FLUID_DATA, (page1, page2) -> {
@Override Integer prio1 = page1.getSortingPriority();
public int compare(IBookletPage page1, IBookletPage page2){ Integer prio2 = page2.getSortingPriority();
Integer prio1 = page1.getSortingPriority(); return prio2.compareTo(prio1);
Integer prio2 = page2.getSortingPriority();
return prio2.compareTo(prio1);
}
}); });
ActuallyAdditions.LOGGER.info("Registered a total of "+chapCount+" booklet chapters, where "+infoCount+" out of "+pageCount+" booklet pages contain information about items or fluids!"); ActuallyAdditions.LOGGER.info("Registered a total of "+chapCount+" booklet chapters, where "+infoCount+" out of "+pageCount+" booklet pages contain information about items or fluids!");
@ -176,7 +166,7 @@ public final class InitBooklet{
chaptersIntroduction[0] = new BookletChapter("bookTutorial", ActuallyAdditionsAPI.entryGettingStarted, new ItemStack(InitItems.itemBooklet), new PageTextOnly(1), new PageTextOnly(2), new PageTextOnly(3), new PageCrafting(4, ItemCrafting.recipeBook).setNoText()); chaptersIntroduction[0] = new BookletChapter("bookTutorial", ActuallyAdditionsAPI.entryGettingStarted, new ItemStack(InitItems.itemBooklet), new PageTextOnly(1), new PageTextOnly(2), new PageTextOnly(3), new PageCrafting(4, ItemCrafting.recipeBook).setNoText());
chaptersIntroduction[1] = new BookletChapter("videoGuide", ActuallyAdditionsAPI.entryGettingStarted, new ItemStack(InitItems.itemMisc, 1, TheMiscItems.YOUTUBE_ICON.ordinal()), new PageLinkButton(1, "https://www.youtube.com/watch?v=fhjz0Ew56pM"), new PageLinkButton(2, "https://www.youtube.com/playlist?list=PLJeFZ64pT89MrTRZYzD_rtHFajPVlt6cF")).setImportant(); chaptersIntroduction[1] = new BookletChapter("videoGuide", ActuallyAdditionsAPI.entryGettingStarted, new ItemStack(InitItems.itemMisc, 1, TheMiscItems.YOUTUBE_ICON.ordinal()), new PageLinkButton(1, "https://www.youtube.com/watch?v=fhjz0Ew56pM"), new PageLinkButton(2, "https://www.youtube.com/playlist?list=PLJeFZ64pT89MrTRZYzD_rtHFajPVlt6cF")).setImportant();
new BookletChapter("intro", ActuallyAdditionsAPI.entryGettingStarted, new ItemStack(InitItems.itemBooklet), new PageTextOnly(1), new PageTextOnly(2), new PageTextOnly(3)); new BookletChapter("intro", ActuallyAdditionsAPI.entryGettingStarted, new ItemStack(InitItems.itemBooklet), new PageTextOnly(1), new PageTextOnly(2), new PageTextOnly(3));
ArrayList<BookletPage> crystalPages = new ArrayList<BookletPage>(); ArrayList<BookletPage> crystalPages = new ArrayList<>();
crystalPages.addAll(Arrays.asList(new PageTextOnly(1).addTextReplacement("<rf>", TileEntityAtomicReconstructor.ENERGY_USE), new PageTextOnly(2), new PageTextOnly(3), new PagePicture(4, "page_atomic_reconstructor", 0).setNoText(), new PageTextOnly(5), new PageCrafting(6, BlockCrafting.recipeAtomicReconstructor).setWildcard())); crystalPages.addAll(Arrays.asList(new PageTextOnly(1).addTextReplacement("<rf>", TileEntityAtomicReconstructor.ENERGY_USE), new PageTextOnly(2), new PageTextOnly(3), new PagePicture(4, "page_atomic_reconstructor", 0).setNoText(), new PageTextOnly(5), new PageCrafting(6, BlockCrafting.recipeAtomicReconstructor).setWildcard()));
for(int i = 0; i < LensRecipeHandler.MAIN_PAGE_RECIPES.size(); i++){ for(int i = 0; i < LensRecipeHandler.MAIN_PAGE_RECIPES.size(); i++){
crystalPages.add(new PageReconstructor(7+i, LensRecipeHandler.MAIN_PAGE_RECIPES.get(i)).setNoText()); crystalPages.add(new PageReconstructor(7+i, LensRecipeHandler.MAIN_PAGE_RECIPES.get(i)).setNoText());
@ -186,7 +176,7 @@ public final class InitBooklet{
chaptersIntroduction[2] = new BookletChapter("engineerHouse", ActuallyAdditionsAPI.entryGettingStarted, new ItemStack(Items.EMERALD), new PageTextOnly(1), new PagePicture(2, "page_engineer_house", 145)); chaptersIntroduction[2] = new BookletChapter("engineerHouse", ActuallyAdditionsAPI.entryGettingStarted, new ItemStack(Items.EMERALD), new PageTextOnly(1), new PagePicture(2, "page_engineer_house", 145));
chaptersIntroduction[6] = new BookletChapter("crystals", ActuallyAdditionsAPI.entryGettingStarted, new ItemStack(InitBlocks.blockAtomicReconstructor), crystalPages.toArray(new BookletPage[crystalPages.size()])).setSpecial(); chaptersIntroduction[6] = new BookletChapter("crystals", ActuallyAdditionsAPI.entryGettingStarted, new ItemStack(InitBlocks.blockAtomicReconstructor), crystalPages.toArray(new BookletPage[crystalPages.size()])).setSpecial();
chaptersIntroduction[5] = new BookletChapter("coalGen", ActuallyAdditionsAPI.entryGettingStarted, new ItemStack(InitBlocks.blockCoalGenerator), new PageTextOnly(1).addTextReplacement("<rf>", TileEntityCoalGenerator.PRODUCE), new PageCrafting(2, BlockCrafting.recipeCoalGen).setWildcard().setNoText()); chaptersIntroduction[5] = new BookletChapter("coalGen", ActuallyAdditionsAPI.entryGettingStarted, new ItemStack(InitBlocks.blockCoalGenerator), new PageTextOnly(1).addTextReplacement("<rf>", TileEntityCoalGenerator.PRODUCE), new PageCrafting(2, BlockCrafting.recipeCoalGen).setWildcard().setNoText());
ArrayList<BookletPage> empowererPages = new ArrayList<BookletPage>(); ArrayList<BookletPage> empowererPages = new ArrayList<>();
empowererPages.addAll(Arrays.asList(new PageTextOnly(1), new PagePicture(2, "page_empowerer", 137), new PageCrafting(3, BlockCrafting.recipeEmpowerer), new PageCrafting(4, BlockCrafting.recipeDisplayStand))); empowererPages.addAll(Arrays.asList(new PageTextOnly(1), new PagePicture(2, "page_empowerer", 137), new PageCrafting(3, BlockCrafting.recipeEmpowerer), new PageCrafting(4, BlockCrafting.recipeDisplayStand)));
for(int i = 0; i < EmpowererHandler.MAIN_PAGE_RECIPES.size(); i++){ for(int i = 0; i < EmpowererHandler.MAIN_PAGE_RECIPES.size(); i++){
empowererPages.add(new PageEmpowerer(7+i, EmpowererHandler.MAIN_PAGE_RECIPES.get(i)).setNoText()); empowererPages.add(new PageEmpowerer(7+i, EmpowererHandler.MAIN_PAGE_RECIPES.get(i)).setNoText());
@ -206,7 +196,7 @@ public final class InitBooklet{
chaptersIntroduction[3] = new BookletChapter("quartz", ActuallyAdditionsAPI.entryMisc, new ItemStack(InitItems.itemMisc, 1, TheMiscItems.QUARTZ.ordinal()), new PageTextOnly(1).addItemsToPage(new ItemStack(InitBlocks.blockMisc, 1, TheMiscBlocks.ORE_QUARTZ.ordinal())).addTextReplacement("<lowest>", AAWorldGen.QUARTZ_MIN).addTextReplacement("<highest>", AAWorldGen.QUARTZ_MAX), new PageTextOnly(2).addItemsToPage(new ItemStack(InitItems.itemMisc, 1, TheMiscItems.QUARTZ.ordinal())), new PageCrafting(3, BlockCrafting.recipeQuartzBlock).setNoText(), new PageCrafting(4, BlockCrafting.recipeQuartzPillar).setNoText(), new PageCrafting(5, BlockCrafting.recipeQuartzChiseled).setNoText()); chaptersIntroduction[3] = new BookletChapter("quartz", ActuallyAdditionsAPI.entryMisc, new ItemStack(InitItems.itemMisc, 1, TheMiscItems.QUARTZ.ordinal()), new PageTextOnly(1).addItemsToPage(new ItemStack(InitBlocks.blockMisc, 1, TheMiscBlocks.ORE_QUARTZ.ordinal())).addTextReplacement("<lowest>", AAWorldGen.QUARTZ_MIN).addTextReplacement("<highest>", AAWorldGen.QUARTZ_MAX), new PageTextOnly(2).addItemsToPage(new ItemStack(InitItems.itemMisc, 1, TheMiscItems.QUARTZ.ordinal())), new PageCrafting(3, BlockCrafting.recipeQuartzBlock).setNoText(), new PageCrafting(4, BlockCrafting.recipeQuartzPillar).setNoText(), new PageCrafting(5, BlockCrafting.recipeQuartzChiseled).setNoText());
new BookletChapter("cloud", ActuallyAdditionsAPI.entryMisc, new ItemStack(InitBlocks.blockSmileyCloud), new PageTextOnly(1), new PageCrafting(2, BlockCrafting.recipeSmileyCloud).setWildcard()).setSpecial(); new BookletChapter("cloud", ActuallyAdditionsAPI.entryMisc, new ItemStack(InitBlocks.blockSmileyCloud), new PageTextOnly(1), new PageCrafting(2, BlockCrafting.recipeSmileyCloud).setWildcard()).setSpecial();
new BookletChapter("coalStuff", ActuallyAdditionsAPI.entryMisc, new ItemStack(InitItems.itemMisc, 1, TheMiscItems.TINY_COAL.ordinal()), new PageTextOnly(1), new PageCrafting(2, ItemCrafting.recipeTinyCoal).setNoText(), new PageCrafting(3, ItemCrafting.recipeTinyChar).setNoText(), new PageCrafting(4, BlockCrafting.recipeBlockChar).setNoText()); new BookletChapter("coalStuff", ActuallyAdditionsAPI.entryMisc, new ItemStack(InitItems.itemMisc, 1, TheMiscItems.TINY_COAL.ordinal()), new PageTextOnly(1), new PageCrafting(2, ItemCrafting.recipeTinyCoal).setNoText(), new PageCrafting(3, ItemCrafting.recipeTinyChar).setNoText(), new PageCrafting(4, BlockCrafting.recipeBlockChar).setNoText());
ArrayList<BookletPage> lampPages = new ArrayList<BookletPage>(); ArrayList<BookletPage> lampPages = new ArrayList<>();
lampPages.add(new PageTextOnly(lampPages.size()+1)); lampPages.add(new PageTextOnly(lampPages.size()+1));
lampPages.add(new PageTextOnly(lampPages.size()+1)); lampPages.add(new PageTextOnly(lampPages.size()+1));
lampPages.add(new PageCrafting(lampPages.size()+1, BlockCrafting.recipePowerer).setWildcard().setNoText()); lampPages.add(new PageCrafting(lampPages.size()+1, BlockCrafting.recipePowerer).setWildcard().setNoText());
@ -298,7 +288,7 @@ public final class InitBooklet{
new BookletChapter("foods", ActuallyAdditionsAPI.entryItemsNonRF, new ItemStack(InitItems.itemFoods, 1, TheFoods.HAMBURGER.ordinal()), new PageCrafting(1, FoodCrafting.recipeBacon).setNoText(), new PageFurnace(2, new ItemStack(InitItems.itemFoods, 1, TheFoods.RICE_BREAD.ordinal())).setNoText(), new PageCrafting(3, FoodCrafting.recipeHamburger).setNoText(), new PageCrafting(4, FoodCrafting.recipeBigCookie).setNoText(), new PageCrafting(5, FoodCrafting.recipeSubSandwich).setNoText(), new PageCrafting(6, FoodCrafting.recipeFrenchFry).setNoText(), new PageCrafting(7, FoodCrafting.recipeFrenchFries).setNoText(), new PageCrafting(8, FoodCrafting.recipeFishNChips).setNoText(), new PageCrafting(9, FoodCrafting.recipeCheese).setNoText(), new PageCrafting(10, FoodCrafting.recipePumpkinStew).setNoText(), new PageCrafting(11, FoodCrafting.recipeCarrotJuice).setNoText(), new PageCrafting(12, FoodCrafting.recipeSpaghetti).setNoText(), new PageCrafting(13, FoodCrafting.recipeNoodle).setNoText(), new PageCrafting(14, FoodCrafting.recipeChocolate).setNoText(), new PageCrafting(15, FoodCrafting.recipeChocolateCake).setNoText(), new PageCrafting(16, FoodCrafting.recipeToast).setNoText(), new PageFurnace(17, new ItemStack(InitItems.itemFoods, 1, TheFoods.BAGUETTE.ordinal())).setNoText(), new PageCrafting(18, FoodCrafting.recipeChocolateToast).setNoText(), new PageCrafting(1, FoodCrafting.recipePizza).setNoText()); new BookletChapter("foods", ActuallyAdditionsAPI.entryItemsNonRF, new ItemStack(InitItems.itemFoods, 1, TheFoods.HAMBURGER.ordinal()), new PageCrafting(1, FoodCrafting.recipeBacon).setNoText(), new PageFurnace(2, new ItemStack(InitItems.itemFoods, 1, TheFoods.RICE_BREAD.ordinal())).setNoText(), new PageCrafting(3, FoodCrafting.recipeHamburger).setNoText(), new PageCrafting(4, FoodCrafting.recipeBigCookie).setNoText(), new PageCrafting(5, FoodCrafting.recipeSubSandwich).setNoText(), new PageCrafting(6, FoodCrafting.recipeFrenchFry).setNoText(), new PageCrafting(7, FoodCrafting.recipeFrenchFries).setNoText(), new PageCrafting(8, FoodCrafting.recipeFishNChips).setNoText(), new PageCrafting(9, FoodCrafting.recipeCheese).setNoText(), new PageCrafting(10, FoodCrafting.recipePumpkinStew).setNoText(), new PageCrafting(11, FoodCrafting.recipeCarrotJuice).setNoText(), new PageCrafting(12, FoodCrafting.recipeSpaghetti).setNoText(), new PageCrafting(13, FoodCrafting.recipeNoodle).setNoText(), new PageCrafting(14, FoodCrafting.recipeChocolate).setNoText(), new PageCrafting(15, FoodCrafting.recipeChocolateCake).setNoText(), new PageCrafting(16, FoodCrafting.recipeToast).setNoText(), new PageFurnace(17, new ItemStack(InitItems.itemFoods, 1, TheFoods.BAGUETTE.ordinal())).setNoText(), new PageCrafting(18, FoodCrafting.recipeChocolateToast).setNoText(), new PageCrafting(1, FoodCrafting.recipePizza).setNoText());
new BookletChapter("leafBlower", ActuallyAdditionsAPI.entryItemsNonRF, new ItemStack(InitItems.itemLeafBlowerAdvanced), new PageTextOnly(1), new PageCrafting(2, ItemCrafting.recipeLeafBlower).setNoText(), new PageCrafting(3, ItemCrafting.recipeLeafBlowerAdvanced).setNoText()).setImportant(); new BookletChapter("leafBlower", ActuallyAdditionsAPI.entryItemsNonRF, new ItemStack(InitItems.itemLeafBlowerAdvanced), new PageTextOnly(1), new PageCrafting(2, ItemCrafting.recipeLeafBlower).setNoText(), new PageCrafting(3, ItemCrafting.recipeLeafBlowerAdvanced).setNoText()).setImportant();
new BookletChapter("playerProbe", ActuallyAdditionsAPI.entryItemsNonRF, new ItemStack(InitItems.itemPlayerProbe), new PageTextOnly(1), new PageCrafting(2, ItemCrafting.recipePlayerProbe).setNoText()).setSpecial(); new BookletChapter("playerProbe", ActuallyAdditionsAPI.entryItemsNonRF, new ItemStack(InitItems.itemPlayerProbe), new PageTextOnly(1), new PageCrafting(2, ItemCrafting.recipePlayerProbe).setNoText()).setSpecial();
ArrayList<BookletPage> aiotPages = new ArrayList<BookletPage>(); ArrayList<BookletPage> aiotPages = new ArrayList<>();
aiotPages.add(new PageTextOnly(aiotPages.size()+1)); aiotPages.add(new PageTextOnly(aiotPages.size()+1));
for(IRecipe recipe : ToolCrafting.RECIPES_PAXELS){ for(IRecipe recipe : ToolCrafting.RECIPES_PAXELS){
aiotPages.add(new PageCrafting(aiotPages.size()+1, recipe).setWildcard().setNoText()); aiotPages.add(new PageCrafting(aiotPages.size()+1, recipe).setWildcard().setNoText());
@ -307,7 +297,7 @@ public final class InitBooklet{
new BookletChapter("jams", ActuallyAdditionsAPI.entryItemsNonRF, new ItemStack(InitItems.itemJams), new PageTextOnly(1).addItemsToPage(new ItemStack(InitItems.itemJams, 1, Util.WILDCARD)), new PagePicture(2, "page_jam_house", 150), new PageTextOnly(3)); new BookletChapter("jams", ActuallyAdditionsAPI.entryItemsNonRF, new ItemStack(InitItems.itemJams), new PageTextOnly(1).addItemsToPage(new ItemStack(InitItems.itemJams, 1, Util.WILDCARD)), new PagePicture(2, "page_jam_house", 150), new PageTextOnly(3));
ArrayList<BookletPage> potionRingPages = new ArrayList<BookletPage>(); ArrayList<BookletPage> potionRingPages = new ArrayList<>();
potionRingPages.add(new PageTextOnly(potionRingPages.size()+1)); potionRingPages.add(new PageTextOnly(potionRingPages.size()+1));
for(IRecipe recipe : ItemCrafting.RECIPES_POTION_RINGS){ for(IRecipe recipe : ItemCrafting.RECIPES_POTION_RINGS){
potionRingPages.add(new PageCrafting(potionRingPages.size()+1, recipe).setNoText()); potionRingPages.add(new PageCrafting(potionRingPages.size()+1, recipe).setNoText());

View file

@ -91,7 +91,7 @@ public class BookmarkButton extends GuiButton{
public void drawHover(int mouseX, int mouseY){ public void drawHover(int mouseX, int mouseY){
if(this.isMouseOver()){ if(this.isMouseOver()){
List<String> list = new ArrayList<String>(); List<String> list = new ArrayList<>();
if(this.assignedPage != null){ if(this.assignedPage != null){
IBookletChapter chapter = this.assignedPage.getChapter(); IBookletChapter chapter = this.assignedPage.getChapter();

View file

@ -30,7 +30,7 @@ public class BookletChapterCoffee extends BookletChapter{
} }
private static IBookletPage[] getPages(IBookletPage... pages){ private static IBookletPage[] getPages(IBookletPage... pages){
List<IBookletPage> allPages = new ArrayList<IBookletPage>(); List<IBookletPage> allPages = new ArrayList<>();
allPages.addAll(Arrays.asList(pages)); allPages.addAll(Arrays.asList(pages));
for(CoffeeIngredient ingredient : ActuallyAdditionsAPI.COFFEE_MACHINE_INGREDIENTS){ for(CoffeeIngredient ingredient : ActuallyAdditionsAPI.COFFEE_MACHINE_INGREDIENTS){

View file

@ -28,7 +28,7 @@ public class BookletChapterCrusher extends BookletChapter{
} }
private static IBookletPage[] getPages(IBookletPage... pages){ private static IBookletPage[] getPages(IBookletPage... pages){
List<IBookletPage> allPages = new ArrayList<IBookletPage>(); List<IBookletPage> allPages = new ArrayList<>();
allPages.addAll(Arrays.asList(pages)); allPages.addAll(Arrays.asList(pages));
for(CrusherRecipe recipe : CrusherCrafting.MISC_RECIPES){ for(CrusherRecipe recipe : CrusherCrafting.MISC_RECIPES){

View file

@ -33,7 +33,7 @@ public class BookletEntry implements IBookletEntry{
private final String identifier; private final String identifier;
private final int priority; private final int priority;
private final List<IBookletChapter> chapters = new ArrayList<IBookletChapter>(); private final List<IBookletChapter> chapters = new ArrayList<>();
private TextFormatting color; private TextFormatting color;
public BookletEntry(String identifier){ public BookletEntry(String identifier){
@ -52,7 +52,7 @@ public class BookletEntry implements IBookletEntry{
private static boolean fitsFilter(IBookletPage page, String searchBarText){ private static boolean fitsFilter(IBookletPage page, String searchBarText){
Minecraft mc = Minecraft.getMinecraft(); Minecraft mc = Minecraft.getMinecraft();
List<ItemStack> items = new ArrayList<ItemStack>(); List<ItemStack> items = new ArrayList<>();
page.getItemStacksForPage(items); page.getItemStacksForPage(items);
if(!items.isEmpty()){ if(!items.isEmpty()){
for(ItemStack stack : items){ for(ItemStack stack : items){
@ -67,7 +67,7 @@ public class BookletEntry implements IBookletEntry{
} }
} }
List<FluidStack> fluids = new ArrayList<FluidStack>(); List<FluidStack> fluids = new ArrayList<>();
page.getFluidStacksForPage(fluids); page.getFluidStacksForPage(fluids);
if(!fluids.isEmpty()){ if(!fluids.isEmpty()){
for(FluidStack stack : fluids){ for(FluidStack stack : fluids){
@ -116,7 +116,7 @@ public class BookletEntry implements IBookletEntry{
if(searchBarText != null && !searchBarText.isEmpty()){ if(searchBarText != null && !searchBarText.isEmpty()){
String search = searchBarText.toLowerCase(Locale.ROOT); String search = searchBarText.toLowerCase(Locale.ROOT);
List<IBookletChapter> fittingChapters = new ArrayList<IBookletChapter>(); List<IBookletChapter> fittingChapters = new ArrayList<>();
for(IBookletChapter chapter : this.getAllChapters()){ for(IBookletChapter chapter : this.getAllChapters()){
if(chapter.getLocalizedName().toLowerCase(Locale.ROOT).contains(search)){ if(chapter.getLocalizedName().toLowerCase(Locale.ROOT).contains(search)){
fittingChapters.add(chapter); fittingChapters.add(chapter);

View file

@ -81,7 +81,7 @@ public abstract class GuiBooklet extends GuiBookletBase{
} }
} }
else{ else{
return (float)conf/100F; return conf/100F;
} }
} }
@ -330,7 +330,7 @@ public abstract class GuiBooklet extends GuiBookletBase{
@Override @Override
protected void keyTyped(char typedChar, int key) throws IOException{ protected void keyTyped(char typedChar, int key) throws IOException{
if(key == Keyboard.KEY_ESCAPE || (key == this.mc.gameSettings.keyBindInventory.getKeyCode() && (!this.hasSearchBar() || !this.searchField.isFocused()))){ if(key == Keyboard.KEY_ESCAPE || key == this.mc.gameSettings.keyBindInventory.getKeyCode() && (!this.hasSearchBar() || !this.searchField.isFocused())){
this.mc.displayGuiScreen(this.previousScreen); this.mc.displayGuiScreen(this.previousScreen);
} }
else if(this.hasSearchBar() & this.searchField.isFocused()){ else if(this.hasSearchBar() & this.searchField.isFocused()){

View file

@ -87,7 +87,7 @@ public class GuiEntry extends GuiBooklet{
} }
} }
int idOffset = this.entryPage*(BUTTONS_PER_PAGE*2); int idOffset = this.entryPage*BUTTONS_PER_PAGE*2;
for(int x = 0; x < 2; x++){ for(int x = 0; x < 2; x++){
for(int y = 0; y < BUTTONS_PER_PAGE; y++){ for(int y = 0; y < BUTTONS_PER_PAGE; y++){
int id = y+x*BUTTONS_PER_PAGE; int id = y+x*BUTTONS_PER_PAGE;
@ -105,7 +105,7 @@ public class GuiEntry extends GuiBooklet{
@Override @Override
protected void actionPerformed(GuiButton button) throws IOException{ protected void actionPerformed(GuiButton button) throws IOException{
if(button instanceof EntryButton){ if(button instanceof EntryButton){
int actualId = button.id+this.entryPage*(BUTTONS_PER_PAGE*2); int actualId = button.id+this.entryPage*BUTTONS_PER_PAGE*2;
if(this.chapters.size() > actualId){ if(this.chapters.size() > actualId){
IBookletChapter chapter = this.chapters.get(actualId); IBookletChapter chapter = this.chapters.get(actualId);

View file

@ -103,7 +103,7 @@ public class GuiMainPage extends GuiBooklet{
} }
private static List<IBookletEntry> getDisplayedEntries(){ private static List<IBookletEntry> getDisplayedEntries(){
List<IBookletEntry> displayed = new ArrayList<IBookletEntry>(); List<IBookletEntry> displayed = new ArrayList<>();
for(IBookletEntry entry : ActuallyAdditionsAPI.BOOKLET_ENTRIES){ for(IBookletEntry entry : ActuallyAdditionsAPI.BOOKLET_ENTRIES){
if(entry.visibleOnFrontPage()){ if(entry.visibleOnFrontPage()){
@ -196,13 +196,13 @@ public class GuiMainPage extends GuiBooklet{
} }
} }
List<String> configText = new ArrayList<String>(); List<String> configText = new ArrayList<>();
configText.add(TextFormatting.GOLD+StringUtil.localize("booklet."+ActuallyAdditions.MODID+".configButton.name")); configText.add(TextFormatting.GOLD+StringUtil.localize("booklet."+ActuallyAdditions.MODID+".configButton.name"));
configText.addAll(this.fontRenderer.listFormattedStringToWidth(StringUtil.localizeFormatted("booklet."+ActuallyAdditions.MODID+".configButton.desc", ActuallyAdditions.NAME).replaceAll("\\\\n", "\n"), 200)); configText.addAll(this.fontRenderer.listFormattedStringToWidth(StringUtil.localizeFormatted("booklet."+ActuallyAdditions.MODID+".configButton.desc", ActuallyAdditions.NAME).replaceAll("\\\\n", "\n"), 200));
this.configButton = new TexturedButton(RES_LOC_GADGETS, -388, this.guiLeft+16, this.guiTop+this.ySize-30, 188, 14, 16, 16, configText); this.configButton = new TexturedButton(RES_LOC_GADGETS, -388, this.guiLeft+16, this.guiTop+this.ySize-30, 188, 14, 16, 16, configText);
this.buttonList.add(this.configButton); this.buttonList.add(this.configButton);
List<String> achievementText = new ArrayList<String>(); List<String> achievementText = new ArrayList<>();
achievementText.add(TextFormatting.GOLD+StringUtil.localize("booklet."+ActuallyAdditions.MODID+".achievementButton.name")); achievementText.add(TextFormatting.GOLD+StringUtil.localize("booklet."+ActuallyAdditions.MODID+".achievementButton.name"));
achievementText.addAll(this.fontRenderer.listFormattedStringToWidth(StringUtil.localizeFormatted("booklet."+ActuallyAdditions.MODID+".achievementButton.desc", ActuallyAdditions.NAME), 200)); achievementText.addAll(this.fontRenderer.listFormattedStringToWidth(StringUtil.localizeFormatted("booklet."+ActuallyAdditions.MODID+".achievementButton.desc", ActuallyAdditions.NAME), 200));
//this.achievementButton = new TexturedButton(RES_LOC_GADGETS, -389, this.guiLeft+36, this.guiTop+this.ySize-30, 204, 14, 16, 16, achievementText); //this.achievementButton = new TexturedButton(RES_LOC_GADGETS, -389, this.guiLeft+36, this.guiTop+this.ySize-30, 204, 14, 16, 16, achievementText);
@ -242,7 +242,7 @@ public class GuiMainPage extends GuiBooklet{
} }
} }
} }
/*else if(button == this.achievementButton){ /*else if(button == this.achievementButton){
GuiScreen achievements = new GuiAAAchievements(this, this.mc.player.getStatFileWriter()); GuiScreen achievements = new GuiAAAchievements(this, this.mc.player.getStatFileWriter());
this.mc.displayGuiScreen(achievements); this.mc.displayGuiScreen(achievements);
}*/ }*/
@ -293,7 +293,7 @@ public class GuiMainPage extends GuiBooklet{
int quoteSize = this.quote.size(); int quoteSize = this.quote.size();
for(int i = 0; i < quoteSize; i++){ for(int i = 0; i < quoteSize; i++){
this.renderScaledAsciiString(TextFormatting.ITALIC+this.quote.get(i), this.guiLeft+25, this.guiTop+90+(i*8), 0, false, this.getMediumFontSize()); this.renderScaledAsciiString(TextFormatting.ITALIC+this.quote.get(i), this.guiLeft+25, this.guiTop+90+i*8, 0, false, this.getMediumFontSize());
} }
this.renderScaledAsciiString("- "+this.quoteGuy, this.guiLeft+60, this.guiTop+93+quoteSize*8, 0, false, this.getLargeFontSize()); this.renderScaledAsciiString("- "+this.quoteGuy, this.guiLeft+60, this.guiTop+93+quoteSize*8, 0, false, this.getLargeFontSize());
} }

View file

@ -37,7 +37,7 @@ import java.util.List;
public class GuiPage extends GuiBooklet{ public class GuiPage extends GuiBooklet{
public final IBookletPage[] pages = new IBookletPage[2]; public final IBookletPage[] pages = new IBookletPage[2];
private final List<ItemDisplay> itemDisplays = new ArrayList<ItemDisplay>(); private final List<ItemDisplay> itemDisplays = new ArrayList<>();
private int pageTimer; private int pageTimer;
private GuiButton buttonViewOnline; private GuiButton buttonViewOnline;
@ -132,7 +132,7 @@ public class GuiPage extends GuiBooklet{
} }
private List<String> getWebLinks(){ private List<String> getWebLinks(){
List<String> links = new ArrayList<String>(); List<String> links = new ArrayList<>();
for(IBookletPage page : this.pages){ for(IBookletPage page : this.pages){
if(page != null){ if(page != null){

View file

@ -62,4 +62,4 @@ public class GuiAAAchievements extends GuiAchievements{
} }
} }
} }
*/ */

View file

@ -28,11 +28,11 @@ import java.util.*;
public class BookletPage implements IBookletPage{ public class BookletPage implements IBookletPage{
protected final HashMap<String, String> textReplacements = new HashMap<String, String>(); protected final HashMap<String, String> textReplacements = new HashMap<>();
protected final int localizationKey; protected final int localizationKey;
private final int priority; private final int priority;
private final List<ItemStack> itemsForPage = new ArrayList<ItemStack>(); private final List<ItemStack> itemsForPage = new ArrayList<>();
private final List<FluidStack> fluidsForPage = new ArrayList<FluidStack>(); private final List<FluidStack> fluidsForPage = new ArrayList<>();
protected IBookletChapter chapter; protected IBookletChapter chapter;
protected boolean hasNoText; protected boolean hasNoText;

View file

@ -53,7 +53,7 @@ public class PageCoffeeMachine extends BookletPage{
PageTextOnly.renderTextToPage(gui, this, startX+6, startY+90); PageTextOnly.renderTextToPage(gui, this, startX+6, startY+90);
if(counter++ % 50 == 0) gui.addOrModifyItemRenderer(stacks[rotate++ % stacks.length], startX+5+82, startY+10+1, 1F, true); if(this.counter++ % 50 == 0) gui.addOrModifyItemRenderer(this.stacks[this.rotate++ % this.stacks.length], startX+5+82, startY+10+1, 1F, true);
} }
@Override @Override
@ -61,7 +61,7 @@ public class PageCoffeeMachine extends BookletPage{
public void initGui(GuiBookletBase gui, int startX, int startY){ public void initGui(GuiBookletBase gui, int startX, int startY){
super.initGui(gui, startX, startY); super.initGui(gui, startX, startY);
gui.addOrModifyItemRenderer(stacks[0], startX+5+82, startY+10+1, 1F, true); gui.addOrModifyItemRenderer(this.stacks[0], startX+5+82, startY+10+1, 1F, true);
gui.addOrModifyItemRenderer(this.outcome, startX+5+36, startY+10+42, 1F, false); gui.addOrModifyItemRenderer(this.outcome, startX+5+36, startY+10+42, 1F, false);
gui.addOrModifyItemRenderer(new ItemStack(InitItems.itemMisc, 1, TheMiscItems.CUP.ordinal()), startX+5+37, startY+10+1, 1F, true); gui.addOrModifyItemRenderer(new ItemStack(InitItems.itemMisc, 1, TheMiscItems.CUP.ordinal()), startX+5+37, startY+10+1, 1F, true);

View file

@ -33,7 +33,7 @@ public class PageCrusherRecipe extends BookletPage{
public PageCrusherRecipe(int localizationKey, CrusherRecipe recipe){ public PageCrusherRecipe(int localizationKey, CrusherRecipe recipe){
super(localizationKey); super(localizationKey);
this.recipe = recipe; this.recipe = recipe;
stacks = recipe.getInput().getMatchingStacks(); this.stacks = recipe.getInput().getMatchingStacks();
} }
@Override @Override
@ -48,7 +48,7 @@ public class PageCrusherRecipe extends BookletPage{
PageTextOnly.renderTextToPage(gui, this, startX+6, startY+100); PageTextOnly.renderTextToPage(gui, this, startX+6, startY+100);
if(counter++ % 50 == 0) gui.addOrModifyItemRenderer(stacks[rotate++ % stacks.length], startX+38+18, startY+6+1, 1F, true); if(this.counter++ % 50 == 0) gui.addOrModifyItemRenderer(this.stacks[this.rotate++ % this.stacks.length], startX+38+18, startY+6+1, 1F, true);
} }
@Override @Override
@ -57,7 +57,7 @@ public class PageCrusherRecipe extends BookletPage{
super.initGui(gui, startX, startY); super.initGui(gui, startX, startY);
if(this.recipe != null){ if(this.recipe != null){
gui.addOrModifyItemRenderer(stacks[rotate++ % stacks.length], startX+38+18, startY+6+1, 1F, true); gui.addOrModifyItemRenderer(this.stacks[this.rotate++ % this.stacks.length], startX+38+18, startY+6+1, 1F, true);
gui.addOrModifyItemRenderer(this.recipe.getOutputOne(), startX+38+4, startY+6+53, 1F, false); gui.addOrModifyItemRenderer(this.recipe.getOutputOne(), startX+38+4, startY+6+53, 1F, false);
if(StackUtil.isValid(this.recipe.getOutputTwo())){ if(StackUtil.isValid(this.recipe.getOutputTwo())){

View file

@ -56,7 +56,7 @@ public class PageEmpowerer extends BookletPage{
gui.renderScaledAsciiString("("+StringUtil.localize("booklet."+ActuallyAdditions.MODID+".empowererRecipe")+")", startX+6, startY+85, 0, false, gui.getMediumFontSize()); gui.renderScaledAsciiString("("+StringUtil.localize("booklet."+ActuallyAdditions.MODID+".empowererRecipe")+")", startX+6, startY+85, 0, false, gui.getMediumFontSize());
PageTextOnly.renderTextToPage(gui, this, startX+6, startY+100); PageTextOnly.renderTextToPage(gui, this, startX+6, startY+100);
if(recipe != null) updateInputs(gui, startX, startY); if(this.recipe != null) this.updateInputs(gui, startX, startY);
} }
@Override @Override
@ -65,25 +65,25 @@ public class PageEmpowerer extends BookletPage{
super.initGui(gui, startX, startY); super.initGui(gui, startX, startY);
if(this.recipe != null){ if(this.recipe != null){
gui.addOrModifyItemRenderer(stand1[0], startX+5+26, startY+10+1, 1F, true); gui.addOrModifyItemRenderer(this.stand1[0], startX+5+26, startY+10+1, 1F, true);
gui.addOrModifyItemRenderer(stand2[0], startX+5+1, startY+10+26, 1F, true); gui.addOrModifyItemRenderer(this.stand2[0], startX+5+1, startY+10+26, 1F, true);
gui.addOrModifyItemRenderer(stand3[0], startX+5+51, startY+10+26, 1F, true); gui.addOrModifyItemRenderer(this.stand3[0], startX+5+51, startY+10+26, 1F, true);
gui.addOrModifyItemRenderer(stand4[0], startX+5+26, startY+10+51, 1F, true); gui.addOrModifyItemRenderer(this.stand4[0], startX+5+26, startY+10+51, 1F, true);
gui.addOrModifyItemRenderer(inputs[0], startX+5+26, startY+10+26, 1F, true); gui.addOrModifyItemRenderer(this.inputs[0], startX+5+26, startY+10+26, 1F, true);
gui.addOrModifyItemRenderer(this.recipe.getOutput(), startX+5+96, startY+10+26, 1F, false); gui.addOrModifyItemRenderer(this.recipe.getOutput(), startX+5+96, startY+10+26, 1F, false);
} }
} }
private void updateInputs(GuiBookletBase gui, int startX, int startY) { private void updateInputs(GuiBookletBase gui, int startX, int startY) {
if(counter++ % 50 == 0) { if(this.counter++ % 50 == 0) {
rotate++; this.rotate++;
gui.addOrModifyItemRenderer(stand1[rotate % stand1.length], startX+5+26, startY+10+1, 1F, true); gui.addOrModifyItemRenderer(this.stand1[this.rotate % this.stand1.length], startX+5+26, startY+10+1, 1F, true);
gui.addOrModifyItemRenderer(stand2[rotate % stand2.length], startX+5+1, startY+10+26, 1F, true); gui.addOrModifyItemRenderer(this.stand2[this.rotate % this.stand2.length], startX+5+1, startY+10+26, 1F, true);
gui.addOrModifyItemRenderer(stand3[rotate % stand3.length], startX+5+51, startY+10+26, 1F, true); gui.addOrModifyItemRenderer(this.stand3[this.rotate % this.stand3.length], startX+5+51, startY+10+26, 1F, true);
gui.addOrModifyItemRenderer(stand4[rotate % stand4.length], startX+5+26, startY+10+51, 1F, true); gui.addOrModifyItemRenderer(this.stand4[this.rotate % this.stand4.length], startX+5+26, startY+10+51, 1F, true);
gui.addOrModifyItemRenderer(inputs[rotate % inputs.length], startX+5+26, startY+10+26, 1F, true); gui.addOrModifyItemRenderer(this.inputs[this.rotate % this.inputs.length], startX+5+26, startY+10+26, 1F, true);
} }
} }

View file

@ -50,7 +50,7 @@ public class PageReconstructor extends BookletPage{
PageTextOnly.renderTextToPage(gui, this, startX+6, startY+88); PageTextOnly.renderTextToPage(gui, this, startX+6, startY+88);
if(this.recipe != null){ if(this.recipe != null){
if(counter++ % 50 == 0) gui.addOrModifyItemRenderer(stacks[rotate++ % stacks.length], startX+30+1, startY+10+13, 1F, true); if(this.counter++ % 50 == 0) gui.addOrModifyItemRenderer(this.stacks[this.rotate++ % this.stacks.length], startX+30+1, startY+10+13, 1F, true);
} }
} }
@ -60,7 +60,7 @@ public class PageReconstructor extends BookletPage{
super.initGui(gui, startX, startY); super.initGui(gui, startX, startY);
if(this.recipe != null){ if(this.recipe != null){
gui.addOrModifyItemRenderer(stacks[0], startX+30+1, startY+10+13, 1F, true); gui.addOrModifyItemRenderer(this.stacks[0], startX+30+1, startY+10+13, 1F, true);
gui.addOrModifyItemRenderer(this.recipe.getOutput(), startX+30+47, startY+10+13, 1F, false); gui.addOrModifyItemRenderer(this.recipe.getOutput(), startX+30+47, startY+10+13, 1F, false);
} }
} }

View file

@ -27,7 +27,7 @@ public class GuiConfiguration extends GuiConfig{
} }
private static List<IConfigElement> getConfigElements(){ private static List<IConfigElement> getConfigElements(){
List<IConfigElement> list = new ArrayList<IConfigElement>(); List<IConfigElement> list = new ArrayList<>();
for(int i = 0; i < ConfigCategories.values().length; i++){ for(int i = 0; i < ConfigCategories.values().length; i++){
ConfigCategories cat = ConfigCategories.values()[i]; ConfigCategories cat = ConfigCategories.values()[i];
ConfigurationHandler.config.setCategoryComment(cat.name, cat.comment); ConfigurationHandler.config.setCategoryComment(cat.name, cat.comment);

View file

@ -30,9 +30,9 @@ public enum ConfigIntValues{
FONT_SIZE_LARGE("Booklet Large Font Size", ConfigCategories.OTHER, 0, 0, 500, "The size of the booklet's large font in percent. Set to 0 to use defaults from the lang file."), FONT_SIZE_LARGE("Booklet Large Font Size", ConfigCategories.OTHER, 0, 0, 500, "The size of the booklet's large font in percent. Set to 0 to use defaults from the lang file."),
ELEVEN("What is 11", ConfigCategories.OTHER, 11, 0, 12, "11?"), ELEVEN("What is 11", ConfigCategories.OTHER, 11, 0, 12, "11?"),
FUR_CHANCE("Fur Drop Chance", ConfigCategories.OTHER, 5000, 1, Integer.MAX_VALUE, "The 1/n drop chance, per tick, for a fur ball to be dropped."), FUR_CHANCE("Fur Drop Chance", ConfigCategories.OTHER, 5000, 1, Integer.MAX_VALUE, "The 1/n drop chance, per tick, for a fur ball to be dropped."),
RECONSTRUCTOR_POWER("Atomic Reconstructor Power", ConfigCategories.MACHINE_VALUES, 300000, 300000, Integer.MAX_VALUE, "The amount of power the atomic reconstructor can store."), RECONSTRUCTOR_POWER("Atomic Reconstructor Power", ConfigCategories.MACHINE_VALUES, 300000, 300000, Integer.MAX_VALUE, "The amount of power the atomic reconstructor can store."),
FARMER_AREA("Farmer Area", ConfigCategories.MACHINE_VALUES, 9, 1, Integer.MAX_VALUE, "The size of the farmer's farming area. Default is 9x9, must be an odd number."); FARMER_AREA("Farmer Area", ConfigCategories.MACHINE_VALUES, 9, 1, Integer.MAX_VALUE, "The size of the farmer's farming area. Default is 9x9, must be an odd number.");
public final String name; public final String name;
public final String category; public final String category;

View file

@ -100,28 +100,28 @@ public final class BlockCrafting{
public static IRecipe recipeFarmer; public static IRecipe recipeFarmer;
public static IRecipe recipeBatteryBox; public static IRecipe recipeBatteryBox;
private static class FireworkIngredient extends Ingredient { private static class FireworkIngredient extends Ingredient {
ItemStack firework = new ItemStack(Items.FIREWORKS); ItemStack firework = new ItemStack(Items.FIREWORKS);
ItemStack[] fireworks = new ItemStack[] {firework}; ItemStack[] fireworks = new ItemStack[] {this.firework};
@Override @Override
public ItemStack[] getMatchingStacks() { public ItemStack[] getMatchingStacks() {
return fireworks; return this.fireworks;
} }
@Override @Override
public boolean apply(ItemStack stack) { public boolean apply(ItemStack stack) {
return stack.getItem() == Items.FIREWORKS; return stack.getItem() == Items.FIREWORKS;
} }
} }
public static void init(){ public static void init(){
Block[] removeNBTBlocks = new Block[] { InitBlocks.blockOilGenerator, InitBlocks.blockFluidPlacer, InitBlocks.blockFluidCollector, InitBlocks.blockCanolaPress, InitBlocks.blockFermentingBarrel }; Block[] removeNBTBlocks = new Block[] { InitBlocks.blockOilGenerator, InitBlocks.blockFluidPlacer, InitBlocks.blockFluidCollector, InitBlocks.blockCanolaPress, InitBlocks.blockFermentingBarrel };
for(Block b : removeNBTBlocks) for(Block b : removeNBTBlocks)
RecipeHandler.addShapelessOreDictRecipe(new ItemStack(b), new ItemStack(b)); RecipeHandler.addShapelessOreDictRecipe(new ItemStack(b), new ItemStack(b));
//Battery Box //Battery Box
RecipeHandler.addShapelessOreDictRecipe(new ItemStack(InitBlocks.blockBatteryBox), RecipeHandler.addShapelessOreDictRecipe(new ItemStack(InitBlocks.blockBatteryBox),
@ -371,8 +371,8 @@ public final class BlockCrafting{
RecipeHandler.addOreDictRecipe(new ItemStack(InitBlocks.blockMisc, 1, TheMiscBlocks.ENDER_CASING.ordinal()), RecipeHandler.addOreDictRecipe(new ItemStack(InitBlocks.blockMisc, 1, TheMiscBlocks.ENDER_CASING.ordinal()),
"WSW", "SRS", "WSW", "WSW", "SRS", "WSW",
'W', ConfigBoolValues.SUPER_DUPER_HARD_MODE.isEnabled() ? new ItemStack(InitBlocks.blockMisc, 1, TheMiscBlocks.ENDERPEARL_BLOCK.ordinal()) : new ItemStack(Items.ENDER_PEARL), 'W', ConfigBoolValues.SUPER_DUPER_HARD_MODE.isEnabled() ? new ItemStack(InitBlocks.blockMisc, 1, TheMiscBlocks.ENDERPEARL_BLOCK.ordinal()) : new ItemStack(Items.ENDER_PEARL),
'R', new ItemStack(InitBlocks.blockMisc, 1, TheMiscBlocks.QUARTZ.ordinal()), 'R', new ItemStack(InitBlocks.blockMisc, 1, TheMiscBlocks.QUARTZ.ordinal()),
'S', ConfigBoolValues.SUPER_DUPER_HARD_MODE.isEnabled() ? new ItemStack(Blocks.DIAMOND_BLOCK) : new ItemStack(InitItems.itemCrystalEmpowered, 1, TheCrystals.DIAMOND.ordinal())); 'S', ConfigBoolValues.SUPER_DUPER_HARD_MODE.isEnabled() ? new ItemStack(Blocks.DIAMOND_BLOCK) : new ItemStack(InitItems.itemCrystalEmpowered, 1, TheCrystals.DIAMOND.ordinal()));
recipeEnderCase = RecipeUtil.lastIRecipe(); recipeEnderCase = RecipeUtil.lastIRecipe();
//Phantom Booster //Phantom Booster

View file

@ -76,22 +76,22 @@ public final class CrusherCrafting {
MISC_RECIPES.add(RecipeUtil.lastCrusherRecipe()); MISC_RECIPES.add(RecipeUtil.lastCrusherRecipe());
if(!CrusherRecipeRegistry.hasException("oreRedstone")) if(!CrusherRecipeRegistry.hasException("oreRedstone"))
ActuallyAdditionsAPI.addCrusherRecipe(new OreIngredient("oreRedstone"), new ItemStack(Items.REDSTONE, 10), StackUtil.getEmpty(), 0); ActuallyAdditionsAPI.addCrusherRecipe(new OreIngredient("oreRedstone"), new ItemStack(Items.REDSTONE, 10), StackUtil.getEmpty(), 0);
if(!CrusherRecipeRegistry.hasException("oreLapis")) if(!CrusherRecipeRegistry.hasException("oreLapis"))
ActuallyAdditionsAPI.addCrusherRecipe(new OreIngredient("oreLapis"), new ItemStack(Items.DYE, 12, 4), StackUtil.getEmpty(), 0); ActuallyAdditionsAPI.addCrusherRecipe(new OreIngredient("oreLapis"), new ItemStack(Items.DYE, 12, 4), StackUtil.getEmpty(), 0);
if(!CrusherRecipeRegistry.hasException("coal")) if(!CrusherRecipeRegistry.hasException("coal"))
ActuallyAdditionsAPI.addCrusherRecipe(new OreIngredient("coal"), new ItemStack(InitItems.itemDust, 1, TheDusts.COAL.ordinal()), StackUtil.getEmpty(), 0); ActuallyAdditionsAPI.addCrusherRecipe(new OreIngredient("coal"), new ItemStack(InitItems.itemDust, 1, TheDusts.COAL.ordinal()), StackUtil.getEmpty(), 0);
if(!CrusherRecipeRegistry.hasException("oreCoal")) if(!CrusherRecipeRegistry.hasException("oreCoal"))
ActuallyAdditionsAPI.addCrusherRecipe(new OreIngredient("oreCoal"), new ItemStack(Items.COAL, 3), StackUtil.getEmpty(), 0); ActuallyAdditionsAPI.addCrusherRecipe(new OreIngredient("oreCoal"), new ItemStack(Items.COAL, 3), StackUtil.getEmpty(), 0);
if(!CrusherRecipeRegistry.hasException("blockCoal")) if(!CrusherRecipeRegistry.hasException("blockCoal"))
ActuallyAdditionsAPI.addCrusherRecipe(new OreIngredient("blockCoal"), new ItemStack(Items.COAL, 9), StackUtil.getEmpty(), 0); ActuallyAdditionsAPI.addCrusherRecipe(new OreIngredient("blockCoal"), new ItemStack(Items.COAL, 9), StackUtil.getEmpty(), 0);
if(!CrusherRecipeRegistry.hasException("oreQuartz")) if(!CrusherRecipeRegistry.hasException("oreQuartz"))
ActuallyAdditionsAPI.addCrusherRecipe(new OreIngredient("oreQuartz"), new ItemStack(Items.QUARTZ, 3), StackUtil.getEmpty(), 0); ActuallyAdditionsAPI.addCrusherRecipe(new OreIngredient("oreQuartz"), new ItemStack(Items.QUARTZ, 3), StackUtil.getEmpty(), 0);
if(!CrusherRecipeRegistry.hasException("cobblestone")) if(!CrusherRecipeRegistry.hasException("cobblestone"))
ActuallyAdditionsAPI.addCrusherRecipe(new OreIngredient("cobblestone"), new ItemStack(Blocks.SAND), StackUtil.getEmpty(), 0); ActuallyAdditionsAPI.addCrusherRecipe(new OreIngredient("cobblestone"), new ItemStack(Blocks.SAND), StackUtil.getEmpty(), 0);
ActuallyAdditionsAPI.addCrusherRecipe(new ItemStack(Blocks.GRAVEL), new ItemStack(Items.FLINT), new ItemStack(Items.FLINT), 50); ActuallyAdditionsAPI.addCrusherRecipe(new ItemStack(Blocks.GRAVEL), new ItemStack(Items.FLINT), new ItemStack(Items.FLINT), 50);
if(!CrusherRecipeRegistry.hasException("stone")) if(!CrusherRecipeRegistry.hasException("stone"))
ActuallyAdditionsAPI.addCrusherRecipes(OreDictionary.getOres("stone", false), OreDictionary.getOres("cobblestone", false), 1, NonNullList.withSize(1, StackUtil.getEmpty()), 0, 0); ActuallyAdditionsAPI.addCrusherRecipes(OreDictionary.getOres("stone", false), OreDictionary.getOres("cobblestone", false), 1, NonNullList.withSize(1, StackUtil.getEmpty()), 0, 0);
ActuallyAdditionsAPI.addCrusherRecipe(new ItemStack(InitItems.itemFoods, 1, TheFoods.RICE.ordinal()), new ItemStack(Items.SUGAR, 2), StackUtil.getEmpty(), 0); ActuallyAdditionsAPI.addCrusherRecipe(new ItemStack(InitItems.itemFoods, 1, TheFoods.RICE.ordinal()), new ItemStack(Items.SUGAR, 2), StackUtil.getEmpty(), 0);
MISC_RECIPES.add(RecipeUtil.lastCrusherRecipe()); MISC_RECIPES.add(RecipeUtil.lastCrusherRecipe());
@ -100,9 +100,9 @@ public final class CrusherCrafting {
MISC_RECIPES.add(RecipeUtil.lastCrusherRecipe()); MISC_RECIPES.add(RecipeUtil.lastCrusherRecipe());
if(!CrusherRecipeRegistry.hasException("oreNickel")) if(!CrusherRecipeRegistry.hasException("oreNickel"))
ActuallyAdditionsAPI.addCrusherRecipes(OreDictionary.getOres("oreNickel", false), OreDictionary.getOres("dustNickel", false), 2, OreDictionary.getOres("dustPlatinum", false), 1, 15); ActuallyAdditionsAPI.addCrusherRecipes(OreDictionary.getOres("oreNickel", false), OreDictionary.getOres("dustNickel", false), 2, OreDictionary.getOres("dustPlatinum", false), 1, 15);
if(!CrusherRecipeRegistry.hasException("oreIron")) if(!CrusherRecipeRegistry.hasException("oreIron"))
ActuallyAdditionsAPI.addCrusherRecipes(OreDictionary.getOres("oreIron", false), OreDictionary.getOres("dustIron", false), 2, OreDictionary.getOres("dustGold", false), 1, 20); ActuallyAdditionsAPI.addCrusherRecipes(OreDictionary.getOres("oreIron", false), OreDictionary.getOres("dustIron", false), 2, OreDictionary.getOres("dustGold", false), 1, 20);
ItemStack temp = getStack("dustIron"); ItemStack temp = getStack("dustIron");
if (!temp.isEmpty()) { if (!temp.isEmpty()) {

View file

@ -37,8 +37,8 @@ import java.util.ArrayList;
public final class ItemCrafting{ public final class ItemCrafting{
public static final ArrayList<IRecipe> RECIPES_POTION_RINGS = new ArrayList<IRecipe>(); public static final ArrayList<IRecipe> RECIPES_POTION_RINGS = new ArrayList<>();
public static final ArrayList<IRecipe> RECIPES_DRILL_COLORING = new ArrayList<IRecipe>(); public static final ArrayList<IRecipe> RECIPES_DRILL_COLORING = new ArrayList<>();
public static IRecipe recipePhantomConnector; public static IRecipe recipePhantomConnector;
public static IRecipe recipeCoil; public static IRecipe recipeCoil;
public static IRecipe recipeCoilAdvanced; public static IRecipe recipeCoilAdvanced;
@ -469,7 +469,7 @@ public final class ItemCrafting{
RecipeHandler.addOreDictRecipe(new ItemStack(InitItems.itemMisc, 1, TheMiscItems.COIL.ordinal()), RecipeHandler.addOreDictRecipe(new ItemStack(InitItems.itemMisc, 1, TheMiscItems.COIL.ordinal()),
" R ", "RIR", " R ", " R ", "RIR", " R ",
'I', ConfigBoolValues.SUPER_DUPER_HARD_MODE.isEnabled() ? new ItemStack(InitItems.itemMisc, 1, TheMiscItems.ENDER_STAR.ordinal()) : new ItemStack(InitItems.itemMisc, 1, TheMiscItems.QUARTZ.ordinal()), 'I', ConfigBoolValues.SUPER_DUPER_HARD_MODE.isEnabled() ? new ItemStack(InitItems.itemMisc, 1, TheMiscItems.ENDER_STAR.ordinal()) : new ItemStack(InitItems.itemMisc, 1, TheMiscItems.QUARTZ.ordinal()),
'R', new ItemStack(InitItems.itemCrystal, 1, TheCrystals.REDSTONE.ordinal())); 'R', new ItemStack(InitItems.itemCrystal, 1, TheCrystals.REDSTONE.ordinal()));
recipeCoil = RecipeUtil.lastIRecipe(); recipeCoil = RecipeUtil.lastIRecipe();
//Cup //Cup

View file

@ -25,7 +25,7 @@ import java.util.ArrayList;
public final class ToolCrafting{ public final class ToolCrafting{
public static final ArrayList<IRecipe> RECIPES_PAXELS = new ArrayList<IRecipe>(); public static final ArrayList<IRecipe> RECIPES_PAXELS = new ArrayList<>();
public static void init(){ public static void init(){

View file

@ -350,7 +350,7 @@ public class CreativeTab extends CreativeTabs{
} }
public void add(Item item){ public void add(Item item){
if(item != null && (!(item instanceof IDisableableItem) || (item instanceof IDisableableItem && !((IDisableableItem) item).isDisabled()))){ if(item != null && (!(item instanceof IDisableableItem) || item instanceof IDisableableItem && !((IDisableableItem) item).isDisabled())){
item.getSubItems(INSTANCE, this.list); item.getSubItems(INSTANCE, this.list);
} }
} }

View file

@ -57,7 +57,7 @@ public final class PlayerData{
public int batWingsFlyTime; public int batWingsFlyTime;
public IBookletPage[] bookmarks = new IBookletPage[12]; public IBookletPage[] bookmarks = new IBookletPage[12];
public List<String> completedTrials = new ArrayList<String>(); public List<String> completedTrials = new ArrayList<>();
@SideOnly(Side.CLIENT) @SideOnly(Side.CLIENT)
public GuiBooklet lastOpenBooklet; public GuiBooklet lastOpenBooklet;

View file

@ -27,8 +27,8 @@ public class WorldData extends WorldSavedData {
public static final String DATA_TAG = ActuallyAdditions.MODID + "data"; public static final String DATA_TAG = ActuallyAdditions.MODID + "data";
private static WorldData data; private static WorldData data;
public final ConcurrentSet<Network> laserRelayNetworks = new ConcurrentSet<Network>(); public final ConcurrentSet<Network> laserRelayNetworks = new ConcurrentSet<>();
public final ConcurrentHashMap<UUID, PlayerSave> playerSaveData = new ConcurrentHashMap<UUID, PlayerSave>(); public final ConcurrentHashMap<UUID, PlayerSave> playerSaveData = new ConcurrentHashMap<>();
public WorldData(String name) { public WorldData(String name) {
super(name); super(name);

View file

@ -87,9 +87,9 @@ public class EntityWorm extends Entity{
if(!isFarmland || state.getValue(BlockFarmland.MOISTURE) < 7){ if(!isFarmland || state.getValue(BlockFarmland.MOISTURE) < 7){
if(isMiddlePose || this.world.rand.nextFloat() >= 0.45F){ if(isMiddlePose || this.world.rand.nextFloat() >= 0.45F){
if(!isFarmland) DefaultFarmerBehavior.useHoeAt(world, pos); if(!isFarmland) DefaultFarmerBehavior.useHoeAt(this.world, pos);
state = this.world.getBlockState(pos); state = this.world.getBlockState(pos);
isFarmland = state.getBlock() instanceof BlockFarmland; isFarmland = state.getBlock() instanceof BlockFarmland;
if(isFarmland) this.world.setBlockState(pos, state.withProperty(BlockFarmland.MOISTURE, 7), 2); if(isFarmland) this.world.setBlockState(pos, state.withProperty(BlockFarmland.MOISTURE, 7), 2);
} }

View file

@ -28,7 +28,7 @@ public class RenderWorm extends Render<EntityWorm>{
private static ItemStack stack = ItemStack.EMPTY; private static ItemStack stack = ItemStack.EMPTY;
public static void fixItemStack(){ public static void fixItemStack(){
stack = new ItemStack(InitItems.itemWorm); stack = new ItemStack(InitItems.itemWorm);
} }
protected RenderWorm(RenderManager renderManager){ protected RenderWorm(RenderManager renderManager){
@ -43,10 +43,10 @@ public class RenderWorm extends Render<EntityWorm>{
@Override @Override
public void doRender(EntityWorm entity, double x, double y, double z, float entityYaw, float partialTicks){ public void doRender(EntityWorm entity, double x, double y, double z, float entityYaw, float partialTicks){
GlStateManager.pushMatrix(); GlStateManager.pushMatrix();
bindEntityTexture(entity); this.bindEntityTexture(entity);
GlStateManager.translate(x, y+0.7F, z); GlStateManager.translate(x, y+0.7F, z);
double boop = Minecraft.getSystemTime()/70D; double boop = Minecraft.getSystemTime()/70D;
GlStateManager.rotate(-(float)((boop%360)), 0, 1, 0); GlStateManager.rotate(-(float)(boop%360), 0, 1, 0);
GlStateManager.translate(0, 0, 0.4); GlStateManager.translate(0, 0, 0.4);
stack.setStackDisplayName(entity.getName()); stack.setStackDisplayName(entity.getName());

View file

@ -68,7 +68,7 @@ public class WorldGenLushCaves{
} }
private void genTreesAndTallGrass(World world, BlockPos center, int radius, int amount, Random rand, StructureBoundingBox box){ private void genTreesAndTallGrass(World world, BlockPos center, int radius, int amount, Random rand, StructureBoundingBox box){
List<BlockPos> possiblePoses = new ArrayList<BlockPos>(); List<BlockPos> possiblePoses = new ArrayList<>();
for(double x = -radius; x < radius; x++){ for(double x = -radius; x < radius; x++){
for(double y = -radius; y < radius; y++){ for(double y = -radius; y < radius; y++){
for(double z = -radius; z < radius; z++){ for(double z = -radius; z < radius; z++){
@ -152,7 +152,7 @@ public class WorldGenLushCaves{
for(double x = -radius; x < radius; x++){ for(double x = -radius; x < radius; x++){
for(double y = -radius; y < radius; y++){ for(double y = -radius; y < radius; y++){
for(double z = -radius; z < radius; z++){ for(double z = -radius; z < radius; z++){
if(Math.sqrt((x*x)+(y*y)+(z*z)) < radius){ if(Math.sqrt(x*x+y*y+z*z) < radius){
BlockPos pos = center.add(x, y, z); BlockPos pos = center.add(x, y, z);
//Note: order matters, checkIndestructable will generate chunks if order is reversed //Note: order matters, checkIndestructable will generate chunks if order is reversed
if(boundingBox.isVecInside(pos) && !this.checkIndestructable(world, pos)){ if(boundingBox.isVecInside(pos) && !this.checkIndestructable(world, pos)){

View file

@ -102,14 +102,14 @@ public class VillageComponentCustomCropField extends StructureVillagePieces.Hous
private IBlockState getRandomCropType(Random rand){ private IBlockState getRandomCropType(Random rand){
int randomMeta = MathHelper.getInt(rand, 1, 7); int randomMeta = MathHelper.getInt(rand, 1, 7);
switch(rand.nextInt(4)){ switch(rand.nextInt(4)){
case 0: case 0:
return InitBlocks.blockFlax.getDefaultState().withProperty(BlockCrops.AGE, randomMeta); return InitBlocks.blockFlax.getDefaultState().withProperty(BlockCrops.AGE, randomMeta);
case 1: case 1:
return InitBlocks.blockCoffee.getDefaultState().withProperty(BlockCrops.AGE, randomMeta); return InitBlocks.blockCoffee.getDefaultState().withProperty(BlockCrops.AGE, randomMeta);
case 2: case 2:
return InitBlocks.blockRice.getDefaultState().withProperty(BlockCrops.AGE, randomMeta); return InitBlocks.blockRice.getDefaultState().withProperty(BlockCrops.AGE, randomMeta);
default: default:
return InitBlocks.blockCanola.getDefaultState().withProperty(BlockCrops.AGE, randomMeta); return InitBlocks.blockCanola.getDefaultState().withProperty(BlockCrops.AGE, randomMeta);
} }
} }
} }

View file

@ -101,7 +101,7 @@ public class VillageComponentJamHouse extends StructureVillagePieces.House1{
} }
@SuppressWarnings("deprecation") @SuppressWarnings("deprecation")
public void spawnActualHouse(World world, Random rand, StructureBoundingBox sbb){ public void spawnActualHouse(World world, Random rand, StructureBoundingBox sbb){
//Base //Base
this.fillWithBlocks(world, sbb, 1, 0, 8, 9, 0, 10, Blocks.GRASS); this.fillWithBlocks(world, sbb, 1, 0, 8, 9, 0, 10, Blocks.GRASS);
this.fillWithBlocks(world, sbb, 0, 0, 0, 1, 0, 7, Blocks.COBBLESTONE); this.fillWithBlocks(world, sbb, 0, 0, 0, 1, 0, 7, Blocks.COBBLESTONE);

View file

@ -209,7 +209,7 @@ public class ContainerBag extends Container implements IButtonReactor {
@Override @Override
public boolean canInteractWith(EntityPlayer player) { public boolean canInteractWith(EntityPlayer player) {
return !sack.isEmpty() && player.getHeldItemMainhand() == sack; return !this.sack.isEmpty() && player.getHeldItemMainhand() == this.sack;
} }
@Override @Override

View file

@ -103,7 +103,7 @@ public class ContainerDropper extends Container{
@Override @Override
public void onContainerClosed(EntityPlayer playerIn) { public void onContainerClosed(EntityPlayer playerIn) {
super.onContainerClosed(playerIn); super.onContainerClosed(playerIn);
if (!player.isSpectator()) dropper.getWorld().notifyNeighborsOfStateChange(dropper.getPos(), InitBlocks.blockDropper, false); if (!this.player.isSpectator()) this.dropper.getWorld().notifyNeighborsOfStateChange(this.dropper.getPos(), InitBlocks.blockDropper, false);
} }
} }

View file

@ -55,7 +55,7 @@ public class ContainerEnergizer extends Container {
for (int k = 0; k < 4; ++k) { for (int k = 0; k < 4; ++k) {
final EntityEquipmentSlot slot = VALID_EQUIPMENT_SLOTS[k]; final EntityEquipmentSlot slot = VALID_EQUIPMENT_SLOTS[k];
this.addSlotToContainer(new Slot(player.inventory, 36 + (3 - k), 102, 19 + k * 18) { this.addSlotToContainer(new Slot(player.inventory, 36 + 3 - k, 102, 19 + k * 18) {
@Override @Override
public int getSlotStackLimit() { public int getSlotStackLimit() {
return 1; return 1;

View file

@ -49,7 +49,7 @@ public class ContainerEnervator extends Container{
for(int k = 0; k < 4; ++k){ for(int k = 0; k < 4; ++k){
final EntityEquipmentSlot slot = ContainerEnergizer.VALID_EQUIPMENT_SLOTS[k]; final EntityEquipmentSlot slot = ContainerEnergizer.VALID_EQUIPMENT_SLOTS[k];
this.addSlotToContainer(new Slot(player.inventory, 36+(3-k), 102, 19+k*18){ this.addSlotToContainer(new Slot(player.inventory, 36+3-k, 102, 19+k*18){
@Override @Override
public int getSlotStackLimit(){ public int getSlotStackLimit(){
return 1; return 1;

View file

@ -35,7 +35,7 @@ public class ContainerFilter extends Container{
for(int i = 0; i < 4; i++){ for(int i = 0; i < 4; i++){
for(int j = 0; j < 6; j++){ for(int j = 0; j < 6; j++){
this.addSlotToContainer(new SlotFilter(this.filterInventory, j+(i*6), 35+j*18, 10+i*18)); this.addSlotToContainer(new SlotFilter(this.filterInventory, j+i*6, 35+j*18, 10+i*18));
} }
} }

View file

@ -31,7 +31,7 @@ public class ContainerGiantChest extends Container{
for(int i = 0; i < 9; i++){ for(int i = 0; i < 9; i++){
for(int j = 0; j < 13; j++){ for(int j = 0; j < 13; j++){
this.addSlotToContainer(new SlotItemHandlerUnconditioned(this.tileChest.inv, (9*13*page)+j+(i*13), 5+j*18, 5+i*18)); this.addSlotToContainer(new SlotItemHandlerUnconditioned(this.tileChest.inv, 9*13*page+j+i*13, 5+j*18, 5+i*18));
} }
} }

View file

@ -65,7 +65,7 @@ public class ContainerGrinder extends Container{
ItemStack currentStack = newStack.copy(); ItemStack currentStack = newStack.copy();
//Slots in Inventory to shift from //Slots in Inventory to shift from
if(slot == TileEntityGrinder.SLOT_OUTPUT_1_1 || slot == TileEntityGrinder.SLOT_OUTPUT_1_2 || (this.isDouble && (slot == TileEntityGrinder.SLOT_OUTPUT_2_1 || slot == TileEntityGrinder.SLOT_OUTPUT_2_2))){ if(slot == TileEntityGrinder.SLOT_OUTPUT_1_1 || slot == TileEntityGrinder.SLOT_OUTPUT_1_2 || this.isDouble && (slot == TileEntityGrinder.SLOT_OUTPUT_2_1 || slot == TileEntityGrinder.SLOT_OUTPUT_2_2)){
if(!this.mergeItemStack(newStack, inventoryStart, hotbarEnd+1, true)){ if(!this.mergeItemStack(newStack, inventoryStart, hotbarEnd+1, true)){
return StackUtil.getEmpty(); return StackUtil.getEmpty();
} }

View file

@ -66,78 +66,78 @@ public class GuiHandler implements IGuiHandler{
tile = (TileEntityBase)world.getTileEntity(new BlockPos(x, y, z)); tile = (TileEntityBase)world.getTileEntity(new BlockPos(x, y, z));
} }
switch(GuiTypes.values()[id]){ switch(GuiTypes.values()[id]){
case FEEDER: case FEEDER:
return new ContainerFeeder(player.inventory, tile); return new ContainerFeeder(player.inventory, tile);
case GIANT_CHEST: case GIANT_CHEST:
return new ContainerGiantChest(player.inventory, tile, 0); return new ContainerGiantChest(player.inventory, tile, 0);
case GIANT_CHEST_PAGE_2: case GIANT_CHEST_PAGE_2:
return new ContainerGiantChest(player.inventory, tile, 1); return new ContainerGiantChest(player.inventory, tile, 1);
case GIANT_CHEST_PAGE_3: case GIANT_CHEST_PAGE_3:
return new ContainerGiantChest(player.inventory, tile, 2); return new ContainerGiantChest(player.inventory, tile, 2);
case CRAFTER: case CRAFTER:
return CompatUtil.getCrafterContainerElement(player, world, x, y, z); return CompatUtil.getCrafterContainerElement(player, world, x, y, z);
case GRINDER: case GRINDER:
return new ContainerGrinder(player.inventory, tile, false); return new ContainerGrinder(player.inventory, tile, false);
case GRINDER_DOUBLE: case GRINDER_DOUBLE:
return new ContainerGrinder(player.inventory, tile, true); return new ContainerGrinder(player.inventory, tile, true);
case FURNACE_DOUBLE: case FURNACE_DOUBLE:
return new ContainerFurnaceDouble(player.inventory, tile); return new ContainerFurnaceDouble(player.inventory, tile);
case INPUTTER: case INPUTTER:
return new ContainerInputter(player.inventory, tile, false); return new ContainerInputter(player.inventory, tile, false);
case INPUTTER_ADVANCED: case INPUTTER_ADVANCED:
return new ContainerInputter(player.inventory, tile, true); return new ContainerInputter(player.inventory, tile, true);
case REPAIRER: case REPAIRER:
return new ContainerRepairer(player.inventory, tile); return new ContainerRepairer(player.inventory, tile);
case BREAKER: case BREAKER:
return new ContainerBreaker(player.inventory, tile); return new ContainerBreaker(player.inventory, tile);
case DROPPER: case DROPPER:
return new ContainerDropper(player, tile); return new ContainerDropper(player, tile);
case CANOLA_PRESS: case CANOLA_PRESS:
return new ContainerCanolaPress(player.inventory, tile); return new ContainerCanolaPress(player.inventory, tile);
case FERMENTING_BARREL: case FERMENTING_BARREL:
return new ContainerFermentingBarrel(player.inventory, tile); return new ContainerFermentingBarrel(player.inventory, tile);
case COAL_GENERATOR: case COAL_GENERATOR:
return new ContainerCoalGenerator(player.inventory, tile); return new ContainerCoalGenerator(player.inventory, tile);
case OIL_GENERATOR: case OIL_GENERATOR:
return new ContainerOilGenerator(player.inventory, tile); return new ContainerOilGenerator(player.inventory, tile);
case PHANTOM_PLACER: case PHANTOM_PLACER:
return new ContainerPhantomPlacer(player.inventory, tile); return new ContainerPhantomPlacer(player.inventory, tile);
case FLUID_COLLECTOR: case FLUID_COLLECTOR:
return new ContainerFluidCollector(player.inventory, tile); return new ContainerFluidCollector(player.inventory, tile);
case COFFEE_MACHINE: case COFFEE_MACHINE:
return new ContainerCoffeeMachine(player.inventory, tile); return new ContainerCoffeeMachine(player.inventory, tile);
case DRILL: case DRILL:
return new ContainerDrill(player.inventory); return new ContainerDrill(player.inventory);
case FILTER: case FILTER:
return new ContainerFilter(player.inventory); return new ContainerFilter(player.inventory);
case ENERGIZER: case ENERGIZER:
return new ContainerEnergizer(player, tile); return new ContainerEnergizer(player, tile);
case ENERVATOR: case ENERVATOR:
return new ContainerEnervator(player, tile); return new ContainerEnervator(player, tile);
case XP_SOLIDIFIER: case XP_SOLIDIFIER:
return new ContainerXPSolidifier(player.inventory, tile); return new ContainerXPSolidifier(player.inventory, tile);
case CLOUD: case CLOUD:
return new ContainerSmileyCloud(); return new ContainerSmileyCloud();
case DIRECTIONAL_BREAKER: case DIRECTIONAL_BREAKER:
return new ContainerDirectionalBreaker(player.inventory, tile); return new ContainerDirectionalBreaker(player.inventory, tile);
case RANGED_COLLECTOR: case RANGED_COLLECTOR:
return new ContainerRangedCollector(player.inventory, tile); return new ContainerRangedCollector(player.inventory, tile);
case MINER: case MINER:
return new ContainerMiner(player.inventory, tile); return new ContainerMiner(player.inventory, tile);
case LASER_RELAY_ITEM_WHITELIST: case LASER_RELAY_ITEM_WHITELIST:
return new ContainerLaserRelayItemWhitelist(player.inventory, tile); return new ContainerLaserRelayItemWhitelist(player.inventory, tile);
case BAG: case BAG:
return new ContainerBag(player.getHeldItemMainhand(), player.inventory, false); return new ContainerBag(player.getHeldItemMainhand(), player.inventory, false);
case VOID_BAG: case VOID_BAG:
return new ContainerBag(player.getHeldItemMainhand(), player.inventory, true); return new ContainerBag(player.getHeldItemMainhand(), player.inventory, true);
case BIO_REACTOR: case BIO_REACTOR:
return new ContainerBioReactor(player.inventory, tile); return new ContainerBioReactor(player.inventory, tile);
case FARMER: case FARMER:
return new ContainerFarmer(player.inventory, tile); return new ContainerFarmer(player.inventory, tile);
case FIREWORK_BOX: case FIREWORK_BOX:
return new ContainerFireworkBox(); return new ContainerFireworkBox();
default: default:
return null; return null;
} }
} }
@ -148,93 +148,93 @@ public class GuiHandler implements IGuiHandler{
tile = (TileEntityBase)world.getTileEntity(new BlockPos(x, y, z)); tile = (TileEntityBase)world.getTileEntity(new BlockPos(x, y, z));
} }
switch(GuiTypes.values()[id]){ switch(GuiTypes.values()[id]){
case FEEDER: case FEEDER:
return new GuiFeeder(player.inventory, tile); return new GuiFeeder(player.inventory, tile);
case GIANT_CHEST: case GIANT_CHEST:
return new GuiGiantChest(player.inventory, tile, 0); return new GuiGiantChest(player.inventory, tile, 0);
case GIANT_CHEST_PAGE_2: case GIANT_CHEST_PAGE_2:
return new GuiGiantChest(player.inventory, tile, 1); return new GuiGiantChest(player.inventory, tile, 1);
case GIANT_CHEST_PAGE_3: case GIANT_CHEST_PAGE_3:
return new GuiGiantChest(player.inventory, tile, 2); return new GuiGiantChest(player.inventory, tile, 2);
case CRAFTER: case CRAFTER:
return CompatUtil.getCrafterGuiElement(player, world, x, y, z); return CompatUtil.getCrafterGuiElement(player, world, x, y, z);
case GRINDER: case GRINDER:
return new GuiGrinder(player.inventory, tile); return new GuiGrinder(player.inventory, tile);
case GRINDER_DOUBLE: case GRINDER_DOUBLE:
return new GuiGrinder.GuiGrinderDouble(player.inventory, tile); return new GuiGrinder.GuiGrinderDouble(player.inventory, tile);
case FURNACE_DOUBLE: case FURNACE_DOUBLE:
return new GuiFurnaceDouble(player.inventory, tile); return new GuiFurnaceDouble(player.inventory, tile);
case INPUTTER: case INPUTTER:
return new GuiInputter(player.inventory, tile, false); return new GuiInputter(player.inventory, tile, false);
case INPUTTER_ADVANCED: case INPUTTER_ADVANCED:
return new GuiInputter(player.inventory, tile, true); return new GuiInputter(player.inventory, tile, true);
case REPAIRER: case REPAIRER:
return new GuiRepairer(player.inventory, tile); return new GuiRepairer(player.inventory, tile);
case BREAKER: case BREAKER:
return new GuiBreaker(player.inventory, tile); return new GuiBreaker(player.inventory, tile);
case DROPPER: case DROPPER:
return new GuiDropper(player, tile); return new GuiDropper(player, tile);
case CANOLA_PRESS: case CANOLA_PRESS:
return new GuiCanolaPress(player.inventory, tile); return new GuiCanolaPress(player.inventory, tile);
case FERMENTING_BARREL: case FERMENTING_BARREL:
return new GuiFermentingBarrel(player.inventory, tile); return new GuiFermentingBarrel(player.inventory, tile);
case COAL_GENERATOR: case COAL_GENERATOR:
return new GuiCoalGenerator(player.inventory, tile); return new GuiCoalGenerator(player.inventory, tile);
case OIL_GENERATOR: case OIL_GENERATOR:
return new GuiOilGenerator(player.inventory, tile); return new GuiOilGenerator(player.inventory, tile);
case PHANTOM_PLACER: case PHANTOM_PLACER:
return new GuiPhantomPlacer(player.inventory, tile); return new GuiPhantomPlacer(player.inventory, tile);
case FLUID_COLLECTOR: case FLUID_COLLECTOR:
return new GuiFluidCollector(player.inventory, tile); return new GuiFluidCollector(player.inventory, tile);
case COFFEE_MACHINE: case COFFEE_MACHINE:
return new GuiCoffeeMachine(player.inventory, tile); return new GuiCoffeeMachine(player.inventory, tile);
case DRILL: case DRILL:
return new GuiDrill(player.inventory); return new GuiDrill(player.inventory);
case FILTER: case FILTER:
return new GuiFilter(player.inventory); return new GuiFilter(player.inventory);
case ENERGIZER: case ENERGIZER:
return new GuiEnergizer(player, tile); return new GuiEnergizer(player, tile);
case ENERVATOR: case ENERVATOR:
return new GuiEnervator(player, tile); return new GuiEnervator(player, tile);
case XP_SOLIDIFIER: case XP_SOLIDIFIER:
return new GuiXPSolidifier(player.inventory, tile); return new GuiXPSolidifier(player.inventory, tile);
case CLOUD: case CLOUD:
return new GuiSmileyCloud(tile, x, y, z, world); return new GuiSmileyCloud(tile, x, y, z, world);
case BOOK: case BOOK:
if(ItemBooklet.forcedPage != null){ if(ItemBooklet.forcedPage != null){
GuiBooklet gui = BookletUtils.createBookletGuiFromPage(null, ItemBooklet.forcedPage); GuiBooklet gui = BookletUtils.createBookletGuiFromPage(null, ItemBooklet.forcedPage);
ItemBooklet.forcedPage = null; ItemBooklet.forcedPage = null;
return gui; return gui;
}
else{
PlayerData.PlayerSave data = PlayerData.getDataFromPlayer(player);
if(data.lastOpenBooklet != null){
return data.lastOpenBooklet;
} }
else{ else{
PlayerData.PlayerSave data = PlayerData.getDataFromPlayer(player); return new GuiMainPage(null);
if(data.lastOpenBooklet != null){
return data.lastOpenBooklet;
}
else{
return new GuiMainPage(null);
}
} }
case DIRECTIONAL_BREAKER: }
return new GuiDirectionalBreaker(player.inventory, tile); case DIRECTIONAL_BREAKER:
case RANGED_COLLECTOR: return new GuiDirectionalBreaker(player.inventory, tile);
return new GuiRangedCollector(player.inventory, tile); case RANGED_COLLECTOR:
case MINER: return new GuiRangedCollector(player.inventory, tile);
return new GuiMiner(player.inventory, tile); case MINER:
case LASER_RELAY_ITEM_WHITELIST: return new GuiMiner(player.inventory, tile);
return new GuiLaserRelayItemWhitelist(player.inventory, tile); case LASER_RELAY_ITEM_WHITELIST:
case BAG: return new GuiLaserRelayItemWhitelist(player.inventory, tile);
return new GuiBag(player.getHeldItemMainhand(), player.inventory, false); case BAG:
case VOID_BAG: return new GuiBag(player.getHeldItemMainhand(), player.inventory, false);
return new GuiBag(player.getHeldItemMainhand(), player.inventory, true); case VOID_BAG:
case BIO_REACTOR: return new GuiBag(player.getHeldItemMainhand(), player.inventory, true);
return new GuiBioReactor(player.inventory, tile); case BIO_REACTOR:
case FARMER: return new GuiBioReactor(player.inventory, tile);
return new GuiFarmer(player.inventory, tile); case FARMER:
case FIREWORK_BOX: return new GuiFarmer(player.inventory, tile);
return new GuiFireworkBox(tile); case FIREWORK_BOX:
default: return new GuiFireworkBox(tile);
return null; default:
return null;
} }
} }

View file

@ -82,7 +82,7 @@ public class EnergyDisplay extends Gui{
if(this.isMouseOver(mouseX, mouseY)){ if(this.isMouseOver(mouseX, mouseY)){
Minecraft mc = Minecraft.getMinecraft(); Minecraft mc = Minecraft.getMinecraft();
List<String> text = new ArrayList<String>(); List<String> text = new ArrayList<>();
text.add(this.getOverlayText()); text.add(this.getOverlayText());
GuiUtils.drawHoveringText(text, mouseX, mouseY, mc.displayWidth, mc.displayHeight, -1, mc.fontRenderer); GuiUtils.drawHoveringText(text, mouseX, mouseY, mc.displayWidth, mc.displayHeight, -1, mc.fontRenderer);
} }

View file

@ -63,14 +63,14 @@ public class FilterSettingsGui extends Gui{
this.metaButton.displayString = (this.theSettings.respectMeta ? TextFormatting.DARK_GREEN : TextFormatting.RED)+"ME"; this.metaButton.displayString = (this.theSettings.respectMeta ? TextFormatting.DARK_GREEN : TextFormatting.RED)+"ME";
this.nbtButton.displayString = (this.theSettings.respectNBT ? TextFormatting.DARK_GREEN : TextFormatting.RED)+"NB"; this.nbtButton.displayString = (this.theSettings.respectNBT ? TextFormatting.DARK_GREEN : TextFormatting.RED)+"NB";
this.modButton.displayString = (this.theSettings.respectMod ? TextFormatting.DARK_GREEN : TextFormatting.RED)+"MO"; this.modButton.displayString = (this.theSettings.respectMod ? TextFormatting.DARK_GREEN : TextFormatting.RED)+"MO";
this.oredictButton.displayString = (this.theSettings.respectOredict == 0 ? TextFormatting.RED : (this.theSettings.respectOredict == 1 ? TextFormatting.GREEN : TextFormatting.DARK_GREEN))+"OR"; this.oredictButton.displayString = (this.theSettings.respectOredict == 0 ? TextFormatting.RED : this.theSettings.respectOredict == 1 ? TextFormatting.GREEN : TextFormatting.DARK_GREEN)+"OR";
} }
public void drawHover(int mouseX, int mouseY){ public void drawHover(int mouseX, int mouseY){
Minecraft mc = Minecraft.getMinecraft(); Minecraft mc = Minecraft.getMinecraft();
if(this.whitelistButton.isMouseOver()){ if(this.whitelistButton.isMouseOver()){
List<String> list = new ArrayList<String>(); List<String> list = new ArrayList<>();
list.add(TextFormatting.BOLD+(this.theSettings.isWhitelist ? StringUtil.localize("info."+ActuallyAdditions.MODID+".gui.whitelist") : StringUtil.localize("info."+ActuallyAdditions.MODID+".gui.blacklist"))); list.add(TextFormatting.BOLD+(this.theSettings.isWhitelist ? StringUtil.localize("info."+ActuallyAdditions.MODID+".gui.whitelist") : StringUtil.localize("info."+ActuallyAdditions.MODID+".gui.blacklist")));
list.addAll(mc.fontRenderer.listFormattedStringToWidth(StringUtil.localizeFormatted("info."+ActuallyAdditions.MODID+".gui.whitelistInfo"), 200)); list.addAll(mc.fontRenderer.listFormattedStringToWidth(StringUtil.localizeFormatted("info."+ActuallyAdditions.MODID+".gui.whitelistInfo"), 200));
GuiUtils.drawHoveringText(list, mouseX, mouseY, mc.displayWidth, mc.displayHeight, -1, mc.fontRenderer); GuiUtils.drawHoveringText(list, mouseX, mouseY, mc.displayWidth, mc.displayHeight, -1, mc.fontRenderer);
@ -82,7 +82,7 @@ public class FilterSettingsGui extends Gui{
GuiUtils.drawHoveringText(Collections.singletonList(TextFormatting.BOLD+(this.theSettings.respectNBT ? StringUtil.localize("info."+ActuallyAdditions.MODID+".gui.respectNBT") : StringUtil.localize("info."+ActuallyAdditions.MODID+".gui.ignoreNBT"))), mouseX, mouseY, mc.displayWidth, mc.displayHeight, -1, mc.fontRenderer); GuiUtils.drawHoveringText(Collections.singletonList(TextFormatting.BOLD+(this.theSettings.respectNBT ? StringUtil.localize("info."+ActuallyAdditions.MODID+".gui.respectNBT") : StringUtil.localize("info."+ActuallyAdditions.MODID+".gui.ignoreNBT"))), mouseX, mouseY, mc.displayWidth, mc.displayHeight, -1, mc.fontRenderer);
} }
else if(this.modButton.isMouseOver()){ else if(this.modButton.isMouseOver()){
List<String> list = new ArrayList<String>(); List<String> list = new ArrayList<>();
list.add(TextFormatting.BOLD+(this.theSettings.respectMod ? StringUtil.localize("info."+ActuallyAdditions.MODID+".gui.respectMod") : StringUtil.localize("info."+ActuallyAdditions.MODID+".gui.ignoreMod"))); list.add(TextFormatting.BOLD+(this.theSettings.respectMod ? StringUtil.localize("info."+ActuallyAdditions.MODID+".gui.respectMod") : StringUtil.localize("info."+ActuallyAdditions.MODID+".gui.ignoreMod")));
list.addAll(mc.fontRenderer.listFormattedStringToWidth(StringUtil.localize("info."+ActuallyAdditions.MODID+".gui.respectModInfo"), 200)); list.addAll(mc.fontRenderer.listFormattedStringToWidth(StringUtil.localize("info."+ActuallyAdditions.MODID+".gui.respectModInfo"), 200));
@ -90,8 +90,8 @@ public class FilterSettingsGui extends Gui{
GuiUtils.drawHoveringText(list, mouseX, mouseY, mc.displayWidth, mc.displayHeight, -1, mc.fontRenderer); GuiUtils.drawHoveringText(list, mouseX, mouseY, mc.displayWidth, mc.displayHeight, -1, mc.fontRenderer);
} }
else if(this.oredictButton.isMouseOver()){ else if(this.oredictButton.isMouseOver()){
List<String> list = new ArrayList<String>(); List<String> list = new ArrayList<>();
list.add(TextFormatting.BOLD+(this.theSettings.respectOredict == 0 ? StringUtil.localize("info."+ActuallyAdditions.MODID+".gui.ignoreOredict") : (this.theSettings.respectOredict == 1 ? StringUtil.localize("info."+ActuallyAdditions.MODID+".gui.respectOredictSoft") : StringUtil.localize("info."+ActuallyAdditions.MODID+".gui.respectOredictHard")))); list.add(TextFormatting.BOLD+(this.theSettings.respectOredict == 0 ? StringUtil.localize("info."+ActuallyAdditions.MODID+".gui.ignoreOredict") : this.theSettings.respectOredict == 1 ? StringUtil.localize("info."+ActuallyAdditions.MODID+".gui.respectOredictSoft") : StringUtil.localize("info."+ActuallyAdditions.MODID+".gui.respectOredictHard")));
String type = null; String type = null;
if(this.theSettings.respectOredict == 1){ if(this.theSettings.respectOredict == 1){

View file

@ -90,7 +90,7 @@ public class FluidDisplay extends Gui{
GlStateManager.disableAlpha(); GlStateManager.disableAlpha();
GlStateManager.tryBlendFuncSeparate(770, 771, 1, 0); GlStateManager.tryBlendFuncSeparate(770, 771, 1, 0);
int i = this.fluidReference.getFluidAmount()*83/this.fluidReference.getCapacity(); int i = this.fluidReference.getFluidAmount()*83/this.fluidReference.getCapacity();
GuiInputter.drawModalRectWithCustomSizedTexture(barX+1, barY+84-i, 36, 172, 16, i, 16, 512); Gui.drawModalRectWithCustomSizedTexture(barX+1, barY+84-i, 36, 172, 16, i, 16, 512);
GlStateManager.disableBlend(); GlStateManager.disableBlend();
GlStateManager.enableAlpha(); GlStateManager.enableAlpha();
GlStateManager.popMatrix(); GlStateManager.popMatrix();

View file

@ -103,7 +103,7 @@ public class GuiBag extends GuiWtfMojang{
this.filter.drawHover(mouseX, mouseY); this.filter.drawHover(mouseX, mouseY);
if(this.buttonAutoInsert.isMouseOver()){ if(this.buttonAutoInsert.isMouseOver()){
List<String> text = new ArrayList<String>(); List<String> text = new ArrayList<>();
text.add(TextFormatting.BOLD+"Auto-Insert "+(this.container.autoInsert ? "On" : "Off")); text.add(TextFormatting.BOLD+"Auto-Insert "+(this.container.autoInsert ? "On" : "Off"));
text.addAll(this.mc.fontRenderer.listFormattedStringToWidth("Turn this on to make items that get picked up automatically go into the bag.", 200)); text.addAll(this.mc.fontRenderer.listFormattedStringToWidth("Turn this on to make items that get picked up automatically go into the bag.", 200));
text.addAll(this.mc.fontRenderer.listFormattedStringToWidth(TextFormatting.GRAY+""+TextFormatting.ITALIC+"Note that this WON'T work when you are holding the bag in your hand.", 200)); text.addAll(this.mc.fontRenderer.listFormattedStringToWidth(TextFormatting.GRAY+""+TextFormatting.ITALIC+"Note that this WON'T work when you are holding the bag in your hand.", 200));

View file

@ -41,7 +41,7 @@ public class GuiFeeder extends GuiWtfMojang{
public void drawScreen(int x, int y, float f){ public void drawScreen(int x, int y, float f){
super.drawScreen(x, y, f); super.drawScreen(x, y, f);
if(x >= this.guiLeft+69 && y >= this.guiTop+30 && x <= this.guiLeft+69+10 && y <= this.guiTop+30+10){ if(x >= this.guiLeft+69 && y >= this.guiTop+30 && x <= this.guiLeft+69+10 && y <= this.guiTop+30+10){
String[] array = new String[]{(this.tileFeeder.currentAnimalAmount+" "+StringUtil.localize("info."+ActuallyAdditions.MODID+".gui.animals")), ((this.tileFeeder.currentAnimalAmount >= 2 && this.tileFeeder.currentAnimalAmount < TileEntityFeeder.THRESHOLD) ? StringUtil.localize("info."+ActuallyAdditions.MODID+".gui.enoughToBreed") : (this.tileFeeder.currentAnimalAmount >= TileEntityFeeder.THRESHOLD ? StringUtil.localize("info."+ActuallyAdditions.MODID+".gui.tooMany") : StringUtil.localize("info."+ActuallyAdditions.MODID+".gui.notEnough")))}; String[] array = new String[]{this.tileFeeder.currentAnimalAmount+" "+StringUtil.localize("info."+ActuallyAdditions.MODID+".gui.animals"), this.tileFeeder.currentAnimalAmount >= 2 && this.tileFeeder.currentAnimalAmount < TileEntityFeeder.THRESHOLD ? StringUtil.localize("info."+ActuallyAdditions.MODID+".gui.enoughToBreed") : this.tileFeeder.currentAnimalAmount >= TileEntityFeeder.THRESHOLD ? StringUtil.localize("info."+ActuallyAdditions.MODID+".gui.tooMany") : StringUtil.localize("info."+ActuallyAdditions.MODID+".gui.notEnough")};
this.drawHoveringText(Arrays.asList(array), x, y); this.drawHoveringText(Arrays.asList(array), x, y);
} }
} }

View file

@ -51,7 +51,7 @@ public class GuiGiantChest extends GuiWtfMojang{
this.buttonList.add(new GuiButton(this.page-1, this.guiLeft+13, this.guiTop+172, 20, 20, "<")); this.buttonList.add(new GuiButton(this.page-1, this.guiLeft+13, this.guiTop+172, 20, 20, "<"));
} }
if((this.page == 0 && this.chest instanceof TileEntityGiantChestMedium) || (this.page <= 1 && this.chest instanceof TileEntityGiantChestLarge)){ if(this.page == 0 && this.chest instanceof TileEntityGiantChestMedium || this.page <= 1 && this.chest instanceof TileEntityGiantChestLarge){
this.buttonList.add(new GuiButton(this.page+1, this.guiLeft+209, this.guiTop+172, 20, 20, ">")); this.buttonList.add(new GuiButton(this.page+1, this.guiLeft+209, this.guiTop+172, 20, 20, ">"));
} }
} }

View file

@ -79,7 +79,7 @@ public class GuiLaserRelayItemWhitelist extends GuiWtfMojang{
super.drawScreen(x, y, f); super.drawScreen(x, y, f);
if(this.buttonSmartWhitelistLeft.isMouseOver() || this.buttonSmartWhitelistRight.isMouseOver()){ if(this.buttonSmartWhitelistLeft.isMouseOver() || this.buttonSmartWhitelistRight.isMouseOver()){
List<String> list = new ArrayList<String>(); List<String> list = new ArrayList<>();
list.add(TextFormatting.BOLD+StringUtil.localize("info."+ActuallyAdditions.MODID+".gui.smart")); list.add(TextFormatting.BOLD+StringUtil.localize("info."+ActuallyAdditions.MODID+".gui.smart"));
list.addAll(this.fontRenderer.listFormattedStringToWidth(StringUtil.localize("info."+ActuallyAdditions.MODID+".gui.smartInfo"), 200)); list.addAll(this.fontRenderer.listFormattedStringToWidth(StringUtil.localize("info."+ActuallyAdditions.MODID+".gui.smartInfo"), 200));
this.drawHoveringText(list, x, y); this.drawHoveringText(list, x, y);

View file

@ -76,7 +76,7 @@ public class GuiOilGenerator extends GuiWtfMojang{
this.drawCenteredString(this.fontRenderer, "for "+ this.generator.maxBurnTime + " t", this.guiLeft + 87, this.guiTop + 75, 0xFFFFFF); this.drawCenteredString(this.fontRenderer, "for "+ this.generator.maxBurnTime + " t", this.guiLeft + 87, this.guiTop + 75, 0xFFFFFF);
GlStateManager.pushMatrix(); GlStateManager.pushMatrix();
GlStateManager.scale(0.75, 0.75, 1); GlStateManager.scale(0.75, 0.75, 1);
float xS = (this.guiLeft + 87) * 1.365F - fontRenderer.getStringWidth("(per 50 mB)") / 2F; float xS = (this.guiLeft + 87) * 1.365F - this.fontRenderer.getStringWidth("(per 50 mB)") / 2F;
StringUtil.renderScaledAsciiString(this.fontRenderer, "(per 50 mB)", xS, (this.guiTop + 85) * 1.345F, 0xFFFFFF, true, 0.75F); StringUtil.renderScaledAsciiString(this.fontRenderer, "(per 50 mB)", xS, (this.guiTop + 85) * 1.345F, 0xFFFFFF, true, 0.75F);
GlStateManager.popMatrix(); GlStateManager.popMatrix();
} }

View file

@ -67,7 +67,7 @@ public class GuiPhantomPlacer extends GuiWtfMojang{
if(!this.placer.isBreaker && this.buttonList.get(0).isMouseOver()){ if(!this.placer.isBreaker && this.buttonList.get(0).isMouseOver()){
String loc = "info."+ActuallyAdditions.MODID+".placer.sides"; String loc = "info."+ActuallyAdditions.MODID+".placer.sides";
List<String> textList = new ArrayList<String>(); List<String> textList = new ArrayList<>();
textList.add(TextFormatting.GOLD+StringUtil.localize(loc+".1")); textList.add(TextFormatting.GOLD+StringUtil.localize(loc+".1"));
textList.addAll(this.fontRenderer.listFormattedStringToWidth(StringUtil.localize(loc+".2"), 200)); textList.addAll(this.fontRenderer.listFormattedStringToWidth(StringUtil.localize(loc+".2"), 200));
this.drawHoveringText(textList, mouseX, mouseY); this.drawHoveringText(textList, mouseX, mouseY);

View file

@ -24,7 +24,7 @@ import java.util.List;
@SideOnly(Side.CLIENT) @SideOnly(Side.CLIENT)
public class TexturedButton extends GuiButton{ public class TexturedButton extends GuiButton{
public final List<String> textList = new ArrayList<String>(); public final List<String> textList = new ArrayList<>();
private final ResourceLocation resLoc; private final ResourceLocation resLoc;
public int texturePosX; public int texturePosX;
public int texturePosY; public int texturePosY;

View file

@ -28,7 +28,7 @@ public class SlotItemHandlerUnconditioned extends SlotItemHandler {
@Override @Override
public boolean isItemValid(ItemStack stack) { public boolean isItemValid(ItemStack stack) {
if (stack.isEmpty() || !inv.canAccept(getSlotIndex(), stack, false)) return false; if (stack.isEmpty() || !this.inv.canAccept(this.getSlotIndex(), stack, false)) return false;
ItemStack currentStack = this.inv.getStackInSlot(this.getSlotIndex()); ItemStack currentStack = this.inv.getStackInSlot(this.getSlotIndex());
this.inv.setStackInSlot(this.getSlotIndex(), ItemStack.EMPTY); this.inv.setStackInSlot(this.getSlotIndex(), ItemStack.EMPTY);

View file

@ -78,16 +78,16 @@ public class ItemAllToolAA extends ItemToolAA implements IColorProvidingItem{
@Override @Override
public boolean canHarvestBlock(IBlockState state, ItemStack stack){ public boolean canHarvestBlock(IBlockState state, ItemStack stack){
return this.hasExtraWhitelist(state.getBlock()) || state.getMaterial().isToolNotRequired() || (state.getBlock() == Blocks.SNOW_LAYER || state.getBlock() == Blocks.SNOW || (state.getBlock() == Blocks.OBSIDIAN ? this.toolMaterial.getHarvestLevel() >= 3 : (state.getBlock() != Blocks.DIAMOND_BLOCK && state.getBlock() != Blocks.DIAMOND_ORE ? (state.getBlock() != Blocks.EMERALD_ORE && state.getBlock() != Blocks.EMERALD_BLOCK ? (state.getBlock() != Blocks.GOLD_BLOCK && state.getBlock() != Blocks.GOLD_ORE ? (state.getBlock() != Blocks.IRON_BLOCK && state.getBlock() != Blocks.IRON_ORE ? (state.getBlock() != Blocks.LAPIS_BLOCK && state.getBlock() != Blocks.LAPIS_ORE ? (state.getBlock() != Blocks.REDSTONE_ORE && state.getBlock() != Blocks.LIT_REDSTONE_ORE ? (state.getMaterial() == Material.ROCK || (state.getMaterial() == Material.IRON || state.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))); return this.hasExtraWhitelist(state.getBlock()) || state.getMaterial().isToolNotRequired() || state.getBlock() == Blocks.SNOW_LAYER || state.getBlock() == Blocks.SNOW || (state.getBlock() == Blocks.OBSIDIAN ? this.toolMaterial.getHarvestLevel() >= 3 : state.getBlock() != Blocks.DIAMOND_BLOCK && state.getBlock() != Blocks.DIAMOND_ORE ? state.getBlock() != Blocks.EMERALD_ORE && state.getBlock() != Blocks.EMERALD_BLOCK ? state.getBlock() != Blocks.GOLD_BLOCK && state.getBlock() != Blocks.GOLD_ORE ? state.getBlock() != Blocks.IRON_BLOCK && state.getBlock() != Blocks.IRON_ORE ? state.getBlock() != Blocks.LAPIS_BLOCK && state.getBlock() != Blocks.LAPIS_ORE ? state.getBlock() != Blocks.REDSTONE_ORE && state.getBlock() != Blocks.LIT_REDSTONE_ORE ? state.getMaterial() == Material.ROCK || state.getMaterial() == Material.IRON || state.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);
} }
private boolean hasExtraWhitelist(Block block){ private boolean hasExtraWhitelist(Block block){
String name = block.getRegistryName().toString(); String name = block.getRegistryName().toString();
for(String list : ConfigStringListValues.PAXEL_EXTRA_MINING_WHITELIST.getValue()){ for(String list : ConfigStringListValues.PAXEL_EXTRA_MINING_WHITELIST.getValue()){
if(list.equals(name)){ if(list.equals(name)){
return true; return true;
}
} }
}
return false; return false;
} }
@ -110,16 +110,11 @@ public class ItemAllToolAA extends ItemToolAA implements IColorProvidingItem{
@SideOnly(Side.CLIENT) @SideOnly(Side.CLIENT)
@Override @Override
public IItemColor getItemColor(){ public IItemColor getItemColor(){
return new IItemColor(){ return (stack, pass) -> pass > 0 ? ItemAllToolAA.this.color : 0xFFFFFF;
@Override
public int colorMultiplier(ItemStack stack, int pass){
return pass > 0 ? ItemAllToolAA.this.color : 0xFFFFFF;
}
};
} }
@Override @Override
public boolean canApplyAtEnchantingTable(ItemStack stack, Enchantment enchantment) { public boolean canApplyAtEnchantingTable(ItemStack stack, Enchantment enchantment) {
return super.canApplyAtEnchantingTable(stack, enchantment) || enchantment.type.canEnchantItem(Items.DIAMOND_SWORD); return super.canApplyAtEnchantingTable(stack, enchantment) || enchantment.type.canEnchantItem(Items.DIAMOND_SWORD);
} }
} }

View file

@ -75,7 +75,7 @@ public class ItemBattery extends ItemEnergy{
public ActionResult<ItemStack> onItemRightClick(World worldIn, EntityPlayer player, EnumHand hand){ public ActionResult<ItemStack> onItemRightClick(World worldIn, EntityPlayer player, EnumHand hand){
if(!worldIn.isRemote && player.isSneaking()){ if(!worldIn.isRemote && player.isSneaking()){
ItemUtil.changeEnabled(player, hand); ItemUtil.changeEnabled(player, hand);
return new ActionResult<ItemStack>(EnumActionResult.SUCCESS, player.getHeldItem(hand)); return new ActionResult<>(EnumActionResult.SUCCESS, player.getHeldItem(hand));
} }
return super.onItemRightClick(worldIn, player, hand); return super.onItemRightClick(worldIn, player, hand);
} }

View file

@ -80,7 +80,7 @@ public class ItemBooklet extends ItemBase implements IHudDisplay{
//TheAchievements.OPEN_BOOKLET.get(player); //TheAchievements.OPEN_BOOKLET.get(player);
//TheAchievements.OPEN_BOOKLET_MILESTONE.get(player); //TheAchievements.OPEN_BOOKLET_MILESTONE.get(player);
} }
return new ActionResult<ItemStack>(EnumActionResult.SUCCESS, player.getHeldItem(hand)); return new ActionResult<>(EnumActionResult.SUCCESS, player.getHeldItem(hand));
} }
@Override @Override

View file

@ -44,7 +44,7 @@ public class ItemChestToCrateUpgrade extends ItemBase{
ItemStack heldStack = player.getHeldItem(hand); ItemStack heldStack = player.getHeldItem(hand);
if(player.isSneaking()){ if(player.isSneaking()){
TileEntity tileHit = world.getTileEntity(pos); TileEntity tileHit = world.getTileEntity(pos);
if(tileHit != null && start.isInstance(tileHit)){ if(tileHit != null && this.start.isInstance(tileHit)){
if(!world.isRemote){ if(!world.isRemote){
//Copy Slots //Copy Slots
@ -60,7 +60,7 @@ public class ItemChestToCrateUpgrade extends ItemBase{
ItemStack[] stacks = new ItemStack[chest.getSlots()]; ItemStack[] stacks = new ItemStack[chest.getSlots()];
for(int i = 0; i < stacks.length; i++){ for(int i = 0; i < stacks.length; i++){
ItemStack aStack = chest.getStackInSlot(i); ItemStack aStack = chest.getStackInSlot(i);
stacks[i] = aStack.copy(); stacks[i] = aStack.copy();
} }
//Set New Block //Set New Block

View file

@ -140,7 +140,7 @@ public class ItemCoffee extends ItemFoodBase{
@Override @Override
public boolean effect(ItemStack stack){ public boolean effect(ItemStack stack){
PotionEffect[] effects = ActuallyAdditionsAPI.methodHandler.getEffectsFromStack(stack); PotionEffect[] effects = ActuallyAdditionsAPI.methodHandler.getEffectsFromStack(stack);
ArrayList<PotionEffect> effectsNew = new ArrayList<PotionEffect>(); ArrayList<PotionEffect> effectsNew = new ArrayList<>();
if(effects != null && effects.length > 0){ if(effects != null && effects.length > 0){
for(PotionEffect effect : effects){ for(PotionEffect effect : effects){
if(effect.getAmplifier() > 0){ if(effect.getAmplifier() > 0){

View file

@ -34,7 +34,7 @@ public class ItemCrafterOnAStick extends ItemBase{
if(!world.isRemote){ if(!world.isRemote){
player.openGui(ActuallyAdditions.INSTANCE, GuiHandler.GuiTypes.CRAFTER.ordinal(), world, (int)player.posX, (int)player.posY, (int)player.posZ); player.openGui(ActuallyAdditions.INSTANCE, GuiHandler.GuiTypes.CRAFTER.ordinal(), world, (int)player.posX, (int)player.posY, (int)player.posZ);
} }
return new ActionResult<ItemStack>(EnumActionResult.SUCCESS, player.getHeldItem(hand)); return new ActionResult<>(EnumActionResult.SUCCESS, player.getHeldItem(hand));
} }

View file

@ -67,16 +67,13 @@ public class ItemCrystalShard extends ItemBase implements IColorProvidingItem{
@Override @Override
@SideOnly(Side.CLIENT) @SideOnly(Side.CLIENT)
public IItemColor getItemColor(){ public IItemColor getItemColor(){
return new IItemColor(){ return (stack, tintIndex) -> {
@Override int damage = stack.getItemDamage();
public int colorMultiplier(ItemStack stack, int tintIndex){ if(damage >= 0 && damage < BlockCrystal.ALL_CRYSTALS.length){
int damage = stack.getItemDamage(); return BlockCrystal.ALL_CRYSTALS[damage].clusterColor;
if(damage >= 0 && damage < BlockCrystal.ALL_CRYSTALS.length){ }
return BlockCrystal.ALL_CRYSTALS[damage].clusterColor; else{
} return 0;
else{
return 0;
}
} }
}; };
} }

View file

@ -167,7 +167,7 @@ public class ItemDrill extends ItemEnergy{
if(!world.isRemote && player.isSneaking() && hand == EnumHand.MAIN_HAND){ if(!world.isRemote && player.isSneaking() && hand == EnumHand.MAIN_HAND){
player.openGui(ActuallyAdditions.INSTANCE, GuiHandler.GuiTypes.DRILL.ordinal(), world, (int)player.posX, (int)player.posY, (int)player.posZ); player.openGui(ActuallyAdditions.INSTANCE, GuiHandler.GuiTypes.DRILL.ordinal(), world, (int)player.posX, (int)player.posY, (int)player.posZ);
} }
return new ActionResult<ItemStack>(EnumActionResult.PASS, player.getHeldItem(hand)); return new ActionResult<>(EnumActionResult.PASS, player.getHeldItem(hand));
} }
@Override @Override
@ -205,7 +205,7 @@ public class ItemDrill extends ItemEnergy{
@Override @Override
public float getDestroySpeed(ItemStack stack, IBlockState state){ public float getDestroySpeed(ItemStack stack, IBlockState state){
return this.getEnergyStored(stack) >= this.getEnergyUsePerBlock(stack) ? (this.hasExtraWhitelist(state.getBlock()) || state.getBlock().getHarvestTool(state) == null || state.getBlock().getHarvestTool(state).isEmpty() || this.getToolClasses(stack).contains(state.getBlock().getHarvestTool(state)) ? this.getEfficiencyFromUpgrade(stack) : 1.0F) : 0.1F; return this.getEnergyStored(stack) >= this.getEnergyUsePerBlock(stack) ? this.hasExtraWhitelist(state.getBlock()) || state.getBlock().getHarvestTool(state) == null || state.getBlock().getHarvestTool(state).isEmpty() || this.getToolClasses(stack).contains(state.getBlock().getHarvestTool(state)) ? this.getEfficiencyFromUpgrade(stack) : 1.0F : 0.1F;
} }
@Override @Override
@ -251,12 +251,12 @@ public class ItemDrill extends ItemEnergy{
@Override @Override
public boolean canHarvestBlock(IBlockState state, ItemStack stack){ public boolean canHarvestBlock(IBlockState state, ItemStack stack){
Block block = state.getBlock(); Block block = state.getBlock();
return this.getEnergyStored(stack) >= this.getEnergyUsePerBlock(stack) && (this.hasExtraWhitelist(block) || state.getMaterial().isToolNotRequired() || (block == Blocks.SNOW_LAYER || block == Blocks.SNOW || (block == Blocks.OBSIDIAN ? HARVEST_LEVEL >= 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 ? (state.getMaterial() == Material.ROCK || (state.getMaterial() == Material.IRON || state.getMaterial() == Material.ANVIL)) : HARVEST_LEVEL >= 2) : HARVEST_LEVEL >= 1) : HARVEST_LEVEL >= 1) : HARVEST_LEVEL >= 2) : HARVEST_LEVEL >= 2) : HARVEST_LEVEL >= 2)))); return this.getEnergyStored(stack) >= this.getEnergyUsePerBlock(stack) && (this.hasExtraWhitelist(block) || state.getMaterial().isToolNotRequired() || block == Blocks.SNOW_LAYER || block == Blocks.SNOW || (block == Blocks.OBSIDIAN ? HARVEST_LEVEL >= 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 ? state.getMaterial() == Material.ROCK || state.getMaterial() == Material.IRON || state.getMaterial() == Material.ANVIL : HARVEST_LEVEL >= 2 : HARVEST_LEVEL >= 1 : HARVEST_LEVEL >= 1 : HARVEST_LEVEL >= 2 : HARVEST_LEVEL >= 2 : HARVEST_LEVEL >= 2));
} }
@Override @Override
public Set<String> getToolClasses(ItemStack stack){ public Set<String> getToolClasses(ItemStack stack){
HashSet<String> hashSet = new HashSet<String>(); HashSet<String> hashSet = new HashSet<>();
hashSet.add("pickaxe"); hashSet.add("pickaxe");
hashSet.add("shovel"); hashSet.add("shovel");
return hashSet; return hashSet;
@ -420,11 +420,11 @@ public class ItemDrill extends ItemEnergy{
} }
if(radius == 2 && side.getAxis() != Axis.Y) { if(radius == 2 && side.getAxis() != Axis.Y) {
aPos = aPos.up(); aPos = aPos.up();
IBlockState theState = world.getBlockState(aPos); IBlockState theState = world.getBlockState(aPos);
if(theState.getBlockHardness(world, aPos) <= mainHardness+5.0F){ if(theState.getBlockHardness(world, aPos) <= mainHardness+5.0F){
this.tryHarvestBlock(world, aPos, true, stack, player, use); this.tryHarvestBlock(world, aPos, true, stack, player, use);
} }
} }
//Break Blocks around //Break Blocks around
@ -468,7 +468,7 @@ public class ItemDrill extends ItemEnergy{
Block block = state.getBlock(); Block block = state.getBlock();
float hardness = state.getBlockHardness(world, pos); float hardness = state.getBlockHardness(world, pos);
boolean canHarvest = (ForgeHooks.canHarvestBlock(block, player, world, pos) || this.canHarvestBlock(state, stack)) && (!isExtra || this.getDestroySpeed(stack, world.getBlockState(pos)) > 1.0F); boolean canHarvest = (ForgeHooks.canHarvestBlock(block, player, world, pos) || this.canHarvestBlock(state, stack)) && (!isExtra || this.getDestroySpeed(stack, world.getBlockState(pos)) > 1.0F);
if(hardness >= 0.0F && (!isExtra || (canHarvest && !block.hasTileEntity(world.getBlockState(pos))))){ if(hardness >= 0.0F && (!isExtra || canHarvest && !block.hasTileEntity(world.getBlockState(pos)))){
if(!player.capabilities.isCreativeMode){ if(!player.capabilities.isCreativeMode){
this.extractEnergyInternal(stack, use, false); this.extractEnergyInternal(stack, use, false);
} }
@ -497,6 +497,6 @@ public class ItemDrill extends ItemEnergy{
@Override @Override
public boolean shouldCauseBlockBreakReset(ItemStack oldStack, ItemStack newStack) { public boolean shouldCauseBlockBreakReset(ItemStack oldStack, ItemStack newStack) {
return !(newStack.isItemEqual(oldStack)); return !newStack.isItemEqual(oldStack);
} }
} }

View file

@ -43,9 +43,9 @@ public class ItemDrillUpgrade extends ItemBase{
ItemStack stack = player.getHeldItem(hand); ItemStack stack = player.getHeldItem(hand);
if(!world.isRemote && this.type == UpgradeType.PLACER){ if(!world.isRemote && this.type == UpgradeType.PLACER){
this.setSlotToPlaceFrom(stack, player.inventory.currentItem); this.setSlotToPlaceFrom(stack, player.inventory.currentItem);
return new ActionResult<ItemStack>(EnumActionResult.SUCCESS, stack); return new ActionResult<>(EnumActionResult.SUCCESS, stack);
} }
return new ActionResult<ItemStack>(EnumActionResult.FAIL, stack); return new ActionResult<>(EnumActionResult.FAIL, stack);
} }
public void setSlotToPlaceFrom(ItemStack stack, int slot){ public void setSlotToPlaceFrom(ItemStack stack, int slot){

View file

@ -69,17 +69,12 @@ public class ItemDust extends ItemBase implements IColorProvidingItem{
@SideOnly(Side.CLIENT) @SideOnly(Side.CLIENT)
@Override @Override
public IItemColor getItemColor(){ public IItemColor getItemColor(){
return new IItemColor(){ return (stack, pass) -> stack.getItemDamage() >= ALL_DUSTS.length ? 0xFFFFFF : ALL_DUSTS[stack.getItemDamage()].color;
@Override
public int colorMultiplier(ItemStack stack, int pass){
return stack.getItemDamage() >= ALL_DUSTS.length ? 0xFFFFFF : ALL_DUSTS[stack.getItemDamage()].color;
}
};
} }
@Override @Override
public int getItemBurnTime(ItemStack stack) { public int getItemBurnTime(ItemStack stack) {
if(stack.getMetadata() == 6) return 1200; if(stack.getMetadata() == 6) return 1200;
return super.getItemBurnTime(stack); return super.getItemBurnTime(stack);
} }
} }

View file

@ -32,7 +32,7 @@ import java.util.Set;
public class ItemEngineerGoggles extends ItemArmorAA implements IGoggles{ public class ItemEngineerGoggles extends ItemArmorAA implements IGoggles{
private final Set<Entity> cachedGlowingEntities = new ConcurrentSet<Entity>(); private final Set<Entity> cachedGlowingEntities = new ConcurrentSet<>();
private final boolean displayMobs; private final boolean displayMobs;

View file

@ -44,7 +44,7 @@ public class ItemFilter extends ItemBase{
if(!world.isRemote && hand == EnumHand.MAIN_HAND){ if(!world.isRemote && hand == EnumHand.MAIN_HAND){
player.openGui(ActuallyAdditions.INSTANCE, GuiHandler.GuiTypes.FILTER.ordinal(), world, (int)player.posX, (int)player.posY, (int)player.posZ); player.openGui(ActuallyAdditions.INSTANCE, GuiHandler.GuiTypes.FILTER.ordinal(), world, (int)player.posX, (int)player.posY, (int)player.posZ);
} }
return new ActionResult<ItemStack>(EnumActionResult.PASS, player.getHeldItem(hand)); return new ActionResult<>(EnumActionResult.PASS, player.getHeldItem(hand));
} }
@Override @Override

Some files were not shown because too many files have changed in this diff Show more