Fix everything (#825)

* Fix everything

* json
This commit is contained in:
Brennan Ward 2017-06-29 12:30:02 -04:00 committed by Ellpeck
parent 107a9c1091
commit d9b6838df9
151 changed files with 768 additions and 566 deletions

7
.gitignore vendored
View file

@ -10,3 +10,10 @@
/*.iws /*.iws
/lib /lib
/classes /classes
/bin/
*.classpath
*.project
.settings/org.eclipse.buildship.core.prefs
*.launch
.settings/org.eclipse.jdt.core.prefs

View file

@ -26,7 +26,7 @@ minecraft {
version = "1.12-14.21.1.2387" version = "1.12-14.21.1.2387"
runDir = "idea" runDir = "idea"
mappings = "snapshot_20161220" mappings = "snapshot_20170628"
makeObfSourceJar = false makeObfSourceJar = false
//useDepAts = true //useDepAts = true
@ -49,7 +49,7 @@ repositories {
dependencies { dependencies {
compile "net.darkhax.tesla:Tesla-1.12:1.0.59" compile "net.darkhax.tesla:Tesla-1.12:1.0.59"
deobfCompile "mezz.jei:jei_1.12:4.7.0.68" deobfCompile "mezz.jei:jei_1.12:4.7.0.68"
deobfCompile "org.cyclops.commoncapabilities:CommonCapabilities:1.11.2-1.3.3-115" compileOnly "org.cyclops.commoncapabilities:CommonCapabilities:1.11.2-1.3.3-115"
} }
processResources { processResources {

View file

@ -10,6 +10,8 @@
package de.ellpeck.actuallyadditions.api.booklet; package de.ellpeck.actuallyadditions.api.booklet;
import java.util.List;
import de.ellpeck.actuallyadditions.api.booklet.internal.GuiBookletBase; import de.ellpeck.actuallyadditions.api.booklet.internal.GuiBookletBase;
import net.minecraft.client.gui.GuiButton; import net.minecraft.client.gui.GuiButton;
import net.minecraft.item.ItemStack; import net.minecraft.item.ItemStack;
@ -17,8 +19,6 @@ import net.minecraftforge.fluids.FluidStack;
import net.minecraftforge.fml.relauncher.Side; import net.minecraftforge.fml.relauncher.Side;
import net.minecraftforge.fml.relauncher.SideOnly; import net.minecraftforge.fml.relauncher.SideOnly;
import java.util.List;
public interface IBookletPage{ public interface IBookletPage{
void getItemStacksForPage(List<ItemStack> list); void getItemStacksForPage(List<ItemStack> list);

View file

@ -14,7 +14,6 @@ import de.ellpeck.actuallyadditions.api.ActuallyAdditionsAPI;
import de.ellpeck.actuallyadditions.mod.booklet.InitBooklet; import de.ellpeck.actuallyadditions.mod.booklet.InitBooklet;
import de.ellpeck.actuallyadditions.mod.config.ConfigurationHandler; import de.ellpeck.actuallyadditions.mod.config.ConfigurationHandler;
import de.ellpeck.actuallyadditions.mod.crafting.CrusherCrafting; import de.ellpeck.actuallyadditions.mod.crafting.CrusherCrafting;
import de.ellpeck.actuallyadditions.mod.crafting.InitCrafting;
import de.ellpeck.actuallyadditions.mod.data.WorldData; import de.ellpeck.actuallyadditions.mod.data.WorldData;
import de.ellpeck.actuallyadditions.mod.entity.InitEntities; import de.ellpeck.actuallyadditions.mod.entity.InitEntities;
import de.ellpeck.actuallyadditions.mod.event.CommonEvents; import de.ellpeck.actuallyadditions.mod.event.CommonEvents;
@ -28,11 +27,9 @@ import de.ellpeck.actuallyadditions.mod.items.lens.Lenses;
import de.ellpeck.actuallyadditions.mod.material.InitArmorMaterials; import de.ellpeck.actuallyadditions.mod.material.InitArmorMaterials;
import de.ellpeck.actuallyadditions.mod.material.InitToolMaterials; import de.ellpeck.actuallyadditions.mod.material.InitToolMaterials;
import de.ellpeck.actuallyadditions.mod.misc.BannerHelper; import de.ellpeck.actuallyadditions.mod.misc.BannerHelper;
import de.ellpeck.actuallyadditions.mod.misc.SoundHandler;
import de.ellpeck.actuallyadditions.mod.misc.apiimpl.LaserRelayConnectionHandler; import de.ellpeck.actuallyadditions.mod.misc.apiimpl.LaserRelayConnectionHandler;
import de.ellpeck.actuallyadditions.mod.misc.apiimpl.MethodHandler; import de.ellpeck.actuallyadditions.mod.misc.apiimpl.MethodHandler;
import de.ellpeck.actuallyadditions.mod.network.PacketHandler; import de.ellpeck.actuallyadditions.mod.network.PacketHandler;
import de.ellpeck.actuallyadditions.mod.ore.InitOreDict;
import de.ellpeck.actuallyadditions.mod.proxy.IProxy; import de.ellpeck.actuallyadditions.mod.proxy.IProxy;
import de.ellpeck.actuallyadditions.mod.recipe.EmpowererHandler; import de.ellpeck.actuallyadditions.mod.recipe.EmpowererHandler;
import de.ellpeck.actuallyadditions.mod.recipe.FuelHandler; import de.ellpeck.actuallyadditions.mod.recipe.FuelHandler;
@ -52,7 +49,11 @@ import net.minecraftforge.fml.common.Mod;
import net.minecraftforge.fml.common.Mod.EventHandler; import net.minecraftforge.fml.common.Mod.EventHandler;
import net.minecraftforge.fml.common.Mod.Instance; import net.minecraftforge.fml.common.Mod.Instance;
import net.minecraftforge.fml.common.SidedProxy; import net.minecraftforge.fml.common.SidedProxy;
import net.minecraftforge.fml.common.event.*; import net.minecraftforge.fml.common.event.FMLInitializationEvent;
import net.minecraftforge.fml.common.event.FMLPostInitializationEvent;
import net.minecraftforge.fml.common.event.FMLPreInitializationEvent;
import net.minecraftforge.fml.common.event.FMLServerStartedEvent;
import net.minecraftforge.fml.common.event.FMLServerStoppedEvent;
@Mod(modid = ModUtil.MOD_ID, name = ModUtil.NAME, version = ModUtil.VERSION, guiFactory = "de.ellpeck.actuallyadditions.mod.config.GuiFactory") @Mod(modid = ModUtil.MOD_ID, name = ModUtil.NAME, version = ModUtil.VERSION, guiFactory = "de.ellpeck.actuallyadditions.mod.config.GuiFactory")
public class ActuallyAdditions{ public class ActuallyAdditions{
@ -112,6 +113,8 @@ public class ActuallyAdditions{
proxy.init(event); proxy.init(event);
RegistryHandler.BLOCKS_TO_REGISTER.clear();
ModUtil.LOGGER.info("Initialization Finished."); ModUtil.LOGGER.info("Initialization Finished.");
} }

View file

@ -1,5 +1,6 @@
package de.ellpeck.actuallyadditions.mod; package de.ellpeck.actuallyadditions.mod;
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;
@ -20,6 +21,10 @@ public class ClientRegistryHandler{
@SubscribeEvent @SubscribeEvent
public void onModelRegistry(ModelRegistryEvent event){ public void onModelRegistry(ModelRegistryEvent event){
for(Block block : RegistryHandler.BLOCKS_TO_REGISTER){
if(block instanceof IHasModel) ((IHasModel) block).registerRendering();
}
for(Map.Entry<ItemStack, ModelResourceLocation> entry : MODEL_LOCATIONS_FOR_REGISTERING.entrySet()){ for(Map.Entry<ItemStack, ModelResourceLocation> entry : MODEL_LOCATIONS_FOR_REGISTERING.entrySet()){
ModelLoader.setCustomModelResourceLocation(entry.getKey().getItem(), entry.getKey().getItemDamage(), entry.getValue()); ModelLoader.setCustomModelResourceLocation(entry.getKey().getItem(), entry.getKey().getItemDamage(), entry.getValue());
} }

View file

@ -1,5 +1,8 @@
package de.ellpeck.actuallyadditions.mod; package de.ellpeck.actuallyadditions.mod;
import java.util.ArrayList;
import java.util.List;
import de.ellpeck.actuallyadditions.mod.blocks.InitBlocks; import de.ellpeck.actuallyadditions.mod.blocks.InitBlocks;
import de.ellpeck.actuallyadditions.mod.crafting.InitCrafting; import de.ellpeck.actuallyadditions.mod.crafting.InitCrafting;
import de.ellpeck.actuallyadditions.mod.gen.village.InitVillager; import de.ellpeck.actuallyadditions.mod.gen.village.InitVillager;
@ -14,9 +17,6 @@ import net.minecraftforge.event.RegistryEvent.Register;
import net.minecraftforge.fml.common.eventhandler.SubscribeEvent; import net.minecraftforge.fml.common.eventhandler.SubscribeEvent;
import net.minecraftforge.fml.common.registry.VillagerRegistry.VillagerProfession; import net.minecraftforge.fml.common.registry.VillagerRegistry.VillagerProfession;
import java.util.ArrayList;
import java.util.List;
//Class to wrap around the trainwreck that is the new registry system //Class to wrap around the trainwreck that is the new registry system
public class RegistryHandler{ public class RegistryHandler{
@ -32,7 +32,6 @@ public class RegistryHandler{
for(Block block : BLOCKS_TO_REGISTER){ for(Block block : BLOCKS_TO_REGISTER){
event.getRegistry().register(block); event.getRegistry().register(block);
} }
BLOCKS_TO_REGISTER.clear();
} }
@SubscribeEvent @SubscribeEvent

View file

@ -121,7 +121,7 @@ public class BlockAtomicReconstructor extends BlockContainerBase implements IHud
AssetUtil.renderStackToGui(slot, resolution.getScaledWidth()/2+15, resolution.getScaledHeight()/2-19, 1F); AssetUtil.renderStackToGui(slot, resolution.getScaledWidth()/2+15, resolution.getScaledHeight()/2-19, 1F);
} }
minecraft.fontRendererObj.drawStringWithShadow(TextFormatting.YELLOW+""+TextFormatting.ITALIC+strg, resolution.getScaledWidth()/2+35, resolution.getScaledHeight()/2-15, StringUtil.DECIMAL_COLOR_WHITE); minecraft.fontRenderer.drawStringWithShadow(TextFormatting.YELLOW+""+TextFormatting.ITALIC+strg, resolution.getScaledWidth()/2+35, resolution.getScaledHeight()/2-15, StringUtil.DECIMAL_COLOR_WHITE);
} }
} }

View file

@ -11,6 +11,8 @@
package de.ellpeck.actuallyadditions.mod.blocks; package de.ellpeck.actuallyadditions.mod.blocks;
import java.util.Random;
import de.ellpeck.actuallyadditions.mod.ActuallyAdditions; import de.ellpeck.actuallyadditions.mod.ActuallyAdditions;
import de.ellpeck.actuallyadditions.mod.blocks.base.BlockContainerBase; import de.ellpeck.actuallyadditions.mod.blocks.base.BlockContainerBase;
import de.ellpeck.actuallyadditions.mod.inventory.GuiHandler; import de.ellpeck.actuallyadditions.mod.inventory.GuiHandler;
@ -25,14 +27,16 @@ import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.item.EnumRarity; import net.minecraft.item.EnumRarity;
import net.minecraft.item.ItemStack; import net.minecraft.item.ItemStack;
import net.minecraft.tileentity.TileEntity; import net.minecraft.tileentity.TileEntity;
import net.minecraft.util.*; import net.minecraft.util.EnumFacing;
import net.minecraft.util.EnumHand;
import net.minecraft.util.EnumParticleTypes;
import net.minecraft.util.Mirror;
import net.minecraft.util.Rotation;
import net.minecraft.util.math.BlockPos; import net.minecraft.util.math.BlockPos;
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;
import java.util.Random;
public class BlockCoalGenerator extends BlockContainerBase{ public class BlockCoalGenerator extends BlockContainerBase{
public BlockCoalGenerator(String name){ public BlockCoalGenerator(String name){

View file

@ -119,7 +119,7 @@ public class BlockColoredLamp extends BlockBase{
} }
@Override @Override
protected void registerRendering(){ public void registerRendering(){
for(int i = 0; i < ALL_LAMP_TYPES.length; i++){ for(int i = 0; i < ALL_LAMP_TYPES.length; i++){
ActuallyAdditions.proxy.addRenderRegister(new ItemStack(this, 1, i), this.getRegistryName(), TYPE.getName()+"="+ALL_LAMP_TYPES[i].regName); ActuallyAdditions.proxy.addRenderRegister(new ItemStack(this, 1, i), this.getRegistryName(), TYPE.getName()+"="+ALL_LAMP_TYPES[i].regName);
} }

View file

@ -166,7 +166,7 @@ public class BlockCompost extends BlockContainerBase implements IHudDisplay{
AssetUtil.renderStackToGui(slot, resolution.getScaledWidth()/2+15, resolution.getScaledHeight()/2-29, 1F); AssetUtil.renderStackToGui(slot, resolution.getScaledWidth()/2+15, resolution.getScaledHeight()/2-29, 1F);
} }
minecraft.fontRendererObj.drawStringWithShadow(TextFormatting.YELLOW+""+TextFormatting.ITALIC+strg, resolution.getScaledWidth()/2+35, resolution.getScaledHeight()/2-25, StringUtil.DECIMAL_COLOR_WHITE); minecraft.fontRenderer.drawStringWithShadow(TextFormatting.YELLOW+""+TextFormatting.ITALIC+strg, resolution.getScaledWidth()/2+35, resolution.getScaledHeight()/2-25, StringUtil.DECIMAL_COLOR_WHITE);
} }
} }
} }

View file

@ -61,7 +61,7 @@ public class BlockCrystal extends BlockBase{
} }
@Override @Override
protected void registerRendering(){ public void registerRendering(){
for(int i = 0; i < ALL_CRYSTALS.length; i++){ for(int i = 0; i < ALL_CRYSTALS.length; i++){
ActuallyAdditions.proxy.addRenderRegister(new ItemStack(this, 1, i), this.getRegistryName(), TYPE.getName()+"="+ALL_CRYSTALS[i].name); ActuallyAdditions.proxy.addRenderRegister(new ItemStack(this, 1, i), this.getRegistryName(), TYPE.getName()+"="+ALL_CRYSTALS[i].name);
} }

View file

@ -10,6 +10,9 @@
package de.ellpeck.actuallyadditions.mod.blocks; package de.ellpeck.actuallyadditions.mod.blocks;
import java.util.List;
import java.util.Random;
import de.ellpeck.actuallyadditions.mod.ActuallyAdditions; import de.ellpeck.actuallyadditions.mod.ActuallyAdditions;
import de.ellpeck.actuallyadditions.mod.blocks.base.BlockContainerBase; import de.ellpeck.actuallyadditions.mod.blocks.base.BlockContainerBase;
import de.ellpeck.actuallyadditions.mod.blocks.base.ItemBlockBase; import de.ellpeck.actuallyadditions.mod.blocks.base.ItemBlockBase;
@ -30,7 +33,11 @@ import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.item.EnumRarity; import net.minecraft.item.EnumRarity;
import net.minecraft.item.ItemStack; import net.minecraft.item.ItemStack;
import net.minecraft.tileentity.TileEntity; import net.minecraft.tileentity.TileEntity;
import net.minecraft.util.*; import net.minecraft.util.EnumFacing;
import net.minecraft.util.EnumHand;
import net.minecraft.util.EnumParticleTypes;
import net.minecraft.util.Mirror;
import net.minecraft.util.Rotation;
import net.minecraft.util.math.BlockPos; import net.minecraft.util.math.BlockPos;
import net.minecraft.util.text.TextFormatting; import net.minecraft.util.text.TextFormatting;
import net.minecraft.world.IBlockAccess; import net.minecraft.world.IBlockAccess;
@ -38,9 +45,6 @@ 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;
import java.util.List;
import java.util.Random;
public class BlockFurnaceDouble extends BlockContainerBase{ public class BlockFurnaceDouble extends BlockContainerBase{
public static final PropertyBool IS_ON = PropertyBool.create("on"); public static final PropertyBool IS_ON = PropertyBool.create("on");

View file

@ -10,6 +10,8 @@
package de.ellpeck.actuallyadditions.mod.blocks; package de.ellpeck.actuallyadditions.mod.blocks;
import java.util.Random;
import de.ellpeck.actuallyadditions.mod.ActuallyAdditions; import de.ellpeck.actuallyadditions.mod.ActuallyAdditions;
import de.ellpeck.actuallyadditions.mod.blocks.base.BlockContainerBase; import de.ellpeck.actuallyadditions.mod.blocks.base.BlockContainerBase;
import de.ellpeck.actuallyadditions.mod.inventory.GuiHandler; import de.ellpeck.actuallyadditions.mod.inventory.GuiHandler;
@ -32,8 +34,6 @@ 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;
import java.util.Random;
public class BlockGrinder extends BlockContainerBase{ public class BlockGrinder extends BlockContainerBase{
private final boolean isDouble; private final boolean isDouble;

View file

@ -11,6 +11,8 @@
package de.ellpeck.actuallyadditions.mod.blocks; package de.ellpeck.actuallyadditions.mod.blocks;
import java.util.Random;
import de.ellpeck.actuallyadditions.mod.ActuallyAdditions; import de.ellpeck.actuallyadditions.mod.ActuallyAdditions;
import de.ellpeck.actuallyadditions.mod.blocks.base.BlockContainerBase; import de.ellpeck.actuallyadditions.mod.blocks.base.BlockContainerBase;
import de.ellpeck.actuallyadditions.mod.blocks.base.ItemBlockBase; import de.ellpeck.actuallyadditions.mod.blocks.base.ItemBlockBase;
@ -32,8 +34,6 @@ import net.minecraft.util.EnumHand;
import net.minecraft.util.math.BlockPos; import net.minecraft.util.math.BlockPos;
import net.minecraft.world.World; import net.minecraft.world.World;
import java.util.Random;
public class BlockInputter extends BlockContainerBase{ public class BlockInputter extends BlockContainerBase{
public static final int NAME_FLAVOR_AMOUNTS = 15; public static final int NAME_FLAVOR_AMOUNTS = 15;

View file

@ -76,8 +76,8 @@ public class BlockItemViewerHopping extends BlockItemViewer{
return this.getDefaultState().withProperty(FACING, opp == EnumFacing.UP ? EnumFacing.DOWN : opp); return this.getDefaultState().withProperty(FACING, opp == EnumFacing.UP ? EnumFacing.DOWN : opp);
} }
@Override @Override //was isFullyOpaque, not sure if correct change.
public boolean isFullyOpaque(IBlockState state){ public boolean isNormalCube(IBlockState state){
return true; return true;
} }

View file

@ -257,7 +257,7 @@ public class BlockLaserRelay extends BlockContainerBase implements IHudDisplay{
TileEntityLaserRelay relay = (TileEntityLaserRelay)tile; TileEntityLaserRelay relay = (TileEntityLaserRelay)tile;
String strg = relay.getExtraDisplayString(); String strg = relay.getExtraDisplayString();
minecraft.fontRendererObj.drawStringWithShadow(strg, resolution.getScaledWidth()/2+5, resolution.getScaledHeight()/2+5, StringUtil.DECIMAL_COLOR_WHITE); minecraft.fontRenderer.drawStringWithShadow(strg, resolution.getScaledWidth()/2+5, resolution.getScaledHeight()/2+5, StringUtil.DECIMAL_COLOR_WHITE);
String expl; String expl;
if(compass){ if(compass){
@ -267,7 +267,7 @@ public class BlockLaserRelay extends BlockContainerBase implements IHudDisplay{
expl = TextFormatting.GRAY.toString()+TextFormatting.ITALIC+StringUtil.localizeFormatted("info."+ModUtil.MOD_ID+".laserRelay.mode.noCompasss", StringUtil.localize(ConfigValues.itemCompassConfigurator.getUnlocalizedName()+".name")); expl = TextFormatting.GRAY.toString()+TextFormatting.ITALIC+StringUtil.localizeFormatted("info."+ModUtil.MOD_ID+".laserRelay.mode.noCompasss", StringUtil.localize(ConfigValues.itemCompassConfigurator.getUnlocalizedName()+".name"));
} }
StringUtil.drawSplitString(minecraft.fontRendererObj, expl, resolution.getScaledWidth()/2+5, resolution.getScaledHeight()/2+15, Integer.MAX_VALUE, StringUtil.DECIMAL_COLOR_WHITE, true); StringUtil.drawSplitString(minecraft.fontRenderer, expl, resolution.getScaledWidth()/2+5, resolution.getScaledHeight()/2+15, Integer.MAX_VALUE, StringUtil.DECIMAL_COLOR_WHITE, true);
} }
} }
} }

View file

@ -55,10 +55,10 @@ public class BlockLavaFactoryController extends BlockContainerBase implements IH
if(factory != null){ if(factory != null){
int state = factory.isMultiblock(); int state = factory.isMultiblock();
if(state == TileEntityLavaFactoryController.NOT_MULTI){ if(state == TileEntityLavaFactoryController.NOT_MULTI){
StringUtil.drawSplitString(minecraft.fontRendererObj, StringUtil.localize("tooltip."+ModUtil.MOD_ID+".factory.notPart.desc"), resolution.getScaledWidth()/2+5, resolution.getScaledHeight()/2+5, 200, StringUtil.DECIMAL_COLOR_WHITE, true); StringUtil.drawSplitString(minecraft.fontRenderer, StringUtil.localize("tooltip."+ModUtil.MOD_ID+".factory.notPart.desc"), resolution.getScaledWidth()/2+5, resolution.getScaledHeight()/2+5, 200, StringUtil.DECIMAL_COLOR_WHITE, true);
} }
else if(state == TileEntityLavaFactoryController.HAS_AIR || state == TileEntityLavaFactoryController.HAS_LAVA){ else if(state == TileEntityLavaFactoryController.HAS_AIR || state == TileEntityLavaFactoryController.HAS_LAVA){
StringUtil.drawSplitString(minecraft.fontRendererObj, StringUtil.localize("tooltip."+ModUtil.MOD_ID+".factory.works.desc"), resolution.getScaledWidth()/2+5, resolution.getScaledHeight()/2+5, 200, StringUtil.DECIMAL_COLOR_WHITE, true); StringUtil.drawSplitString(minecraft.fontRenderer, StringUtil.localize("tooltip."+ModUtil.MOD_ID+".factory.works.desc"), resolution.getScaledWidth()/2+5, resolution.getScaledHeight()/2+5, 200, StringUtil.DECIMAL_COLOR_WHITE, true);
} }
} }
} }

View file

@ -77,7 +77,7 @@ public class BlockMiner extends BlockContainerBase implements IHudDisplay{
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.fontRendererObj.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

@ -58,7 +58,7 @@ public class BlockMisc extends BlockBase{
} }
@Override @Override
protected void registerRendering(){ public void registerRendering(){
for(int i = 0; i < ALL_MISC_BLOCKS.length; i++){ for(int i = 0; i < ALL_MISC_BLOCKS.length; i++){
ActuallyAdditions.proxy.addRenderRegister(new ItemStack(this, 1, i), this.getRegistryName(), TYPE.getName()+"="+ALL_MISC_BLOCKS[i].name); ActuallyAdditions.proxy.addRenderRegister(new ItemStack(this, 1, i), this.getRegistryName(), TYPE.getName()+"="+ALL_MISC_BLOCKS[i].name);
} }

View file

@ -128,24 +128,24 @@ public class BlockPhantom extends BlockContainerBase implements IHudDisplay{
if(tile != null){ if(tile != null){
if(tile instanceof IPhantomTile){ if(tile instanceof IPhantomTile){
IPhantomTile phantom = (IPhantomTile)tile; IPhantomTile phantom = (IPhantomTile)tile;
minecraft.fontRendererObj.drawStringWithShadow(TextFormatting.GOLD+StringUtil.localize("tooltip."+ModUtil.MOD_ID+".blockPhantomRange.desc")+": "+phantom.getRange(), resolution.getScaledWidth()/2+5, resolution.getScaledHeight()/2-40, StringUtil.DECIMAL_COLOR_WHITE); minecraft.fontRenderer.drawStringWithShadow(TextFormatting.GOLD+StringUtil.localize("tooltip."+ModUtil.MOD_ID+".blockPhantomRange.desc")+": "+phantom.getRange(), resolution.getScaledWidth()/2+5, resolution.getScaledHeight()/2-40, StringUtil.DECIMAL_COLOR_WHITE);
if(phantom.hasBoundPosition()){ if(phantom.hasBoundPosition()){
int distance = MathHelper.ceil(new Vec3d(posHit.getBlockPos()).distanceTo(new Vec3d(phantom.getBoundPosition()))); int distance = MathHelper.ceil(new Vec3d(posHit.getBlockPos()).distanceTo(new Vec3d(phantom.getBoundPosition())));
IBlockState state = minecraft.world.getBlockState(phantom.getBoundPosition()); IBlockState state = minecraft.world.getBlockState(phantom.getBoundPosition());
Block block = state.getBlock(); Block block = state.getBlock();
Item item = Item.getItemFromBlock(block); Item item = Item.getItemFromBlock(block);
String name = item == null ? "Something Unrecognizable" : item.getItemStackDisplayName(new ItemStack(block, 1, block.getMetaFromState(state))); String name = item == null ? "Something Unrecognizable" : item.getItemStackDisplayName(new ItemStack(block, 1, block.getMetaFromState(state)));
StringUtil.drawSplitString(minecraft.fontRendererObj, StringUtil.localizeFormatted("tooltip."+ModUtil.MOD_ID+".phantom.blockInfo.desc", name, phantom.getBoundPosition().getX(), phantom.getBoundPosition().getY(), phantom.getBoundPosition().getZ(), distance), resolution.getScaledWidth()/2+5, resolution.getScaledHeight()/2-30, 200, StringUtil.DECIMAL_COLOR_WHITE, true); StringUtil.drawSplitString(minecraft.fontRenderer, StringUtil.localizeFormatted("tooltip."+ModUtil.MOD_ID+".phantom.blockInfo.desc", name, phantom.getBoundPosition().getX(), phantom.getBoundPosition().getY(), phantom.getBoundPosition().getZ(), distance), resolution.getScaledWidth()/2+5, resolution.getScaledHeight()/2-30, 200, StringUtil.DECIMAL_COLOR_WHITE, true);
if(phantom.isBoundThingInRange()){ if(phantom.isBoundThingInRange()){
StringUtil.drawSplitString(minecraft.fontRendererObj, TextFormatting.DARK_GREEN+StringUtil.localize("tooltip."+ModUtil.MOD_ID+".phantom.connectedRange.desc"), resolution.getScaledWidth()/2+5, resolution.getScaledHeight()/2+25, 200, StringUtil.DECIMAL_COLOR_WHITE, true); StringUtil.drawSplitString(minecraft.fontRenderer, TextFormatting.DARK_GREEN+StringUtil.localize("tooltip."+ModUtil.MOD_ID+".phantom.connectedRange.desc"), resolution.getScaledWidth()/2+5, resolution.getScaledHeight()/2+25, 200, StringUtil.DECIMAL_COLOR_WHITE, true);
} }
else{ else{
StringUtil.drawSplitString(minecraft.fontRendererObj, TextFormatting.DARK_RED+StringUtil.localize("tooltip."+ModUtil.MOD_ID+".phantom.connectedNoRange.desc"), resolution.getScaledWidth()/2+5, resolution.getScaledHeight()/2+25, 200, StringUtil.DECIMAL_COLOR_WHITE, true); StringUtil.drawSplitString(minecraft.fontRenderer, TextFormatting.DARK_RED+StringUtil.localize("tooltip."+ModUtil.MOD_ID+".phantom.connectedNoRange.desc"), resolution.getScaledWidth()/2+5, resolution.getScaledHeight()/2+25, 200, StringUtil.DECIMAL_COLOR_WHITE, true);
} }
} }
else{ else{
minecraft.fontRendererObj.drawStringWithShadow(TextFormatting.RED+StringUtil.localize("tooltip."+ModUtil.MOD_ID+".phantom.notConnected.desc"), resolution.getScaledWidth()/2+5, resolution.getScaledHeight()/2+25, StringUtil.DECIMAL_COLOR_WHITE); minecraft.fontRenderer.drawStringWithShadow(TextFormatting.RED+StringUtil.localize("tooltip."+ModUtil.MOD_ID+".phantom.notConnected.desc"), resolution.getScaledWidth()/2+5, resolution.getScaledHeight()/2+25, StringUtil.DECIMAL_COLOR_WHITE);
} }
} }
} }

View file

@ -74,8 +74,8 @@ public class BlockPlayerInterface extends BlockContainerBase implements IHudDisp
if(tile instanceof TileEntityPlayerInterface){ if(tile instanceof TileEntityPlayerInterface){
TileEntityPlayerInterface face = (TileEntityPlayerInterface)tile; TileEntityPlayerInterface face = (TileEntityPlayerInterface)tile;
String name = face.playerName == null ? "Unknown" : face.playerName; String name = face.playerName == null ? "Unknown" : face.playerName;
minecraft.fontRendererObj.drawStringWithShadow("Bound to: "+TextFormatting.RED+name, resolution.getScaledWidth()/2+5, resolution.getScaledHeight()/2+5, StringUtil.DECIMAL_COLOR_WHITE); minecraft.fontRenderer.drawStringWithShadow("Bound to: "+TextFormatting.RED+name, resolution.getScaledWidth()/2+5, resolution.getScaledHeight()/2+5, StringUtil.DECIMAL_COLOR_WHITE);
minecraft.fontRendererObj.drawStringWithShadow("UUID: "+TextFormatting.DARK_GREEN+face.connectedPlayer, resolution.getScaledWidth()/2+5, resolution.getScaledHeight()/2+15, StringUtil.DECIMAL_COLOR_WHITE); minecraft.fontRenderer.drawStringWithShadow("UUID: "+TextFormatting.DARK_GREEN+face.connectedPlayer, resolution.getScaledWidth()/2+5, resolution.getScaledHeight()/2+15, StringUtil.DECIMAL_COLOR_WHITE);
} }
} }
} }

View file

@ -10,6 +10,10 @@
package de.ellpeck.actuallyadditions.mod.blocks; package de.ellpeck.actuallyadditions.mod.blocks;
import java.util.Random;
import javax.annotation.Nullable;
import de.ellpeck.actuallyadditions.mod.blocks.base.BlockBase; import de.ellpeck.actuallyadditions.mod.blocks.base.BlockBase;
import net.minecraft.block.Block; import net.minecraft.block.Block;
import net.minecraft.block.BlockTorch; import net.minecraft.block.BlockTorch;
@ -18,7 +22,11 @@ import net.minecraft.block.material.Material;
import net.minecraft.block.state.BlockStateContainer; import net.minecraft.block.state.BlockStateContainer;
import net.minecraft.block.state.IBlockState; import net.minecraft.block.state.IBlockState;
import net.minecraft.entity.EntityLivingBase; import net.minecraft.entity.EntityLivingBase;
import net.minecraft.util.*; import net.minecraft.util.BlockRenderLayer;
import net.minecraft.util.EnumFacing;
import net.minecraft.util.EnumParticleTypes;
import net.minecraft.util.Mirror;
import net.minecraft.util.Rotation;
import net.minecraft.util.math.AxisAlignedBB; import net.minecraft.util.math.AxisAlignedBB;
import net.minecraft.util.math.BlockPos; import net.minecraft.util.math.BlockPos;
import net.minecraft.world.IBlockAccess; import net.minecraft.world.IBlockAccess;
@ -26,9 +34,6 @@ 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;
import javax.annotation.Nullable;
import java.util.Random;
//Copied from BlockTorch. //Copied from BlockTorch.
//I have no idea what all of this means. //I have no idea what all of this means.
public class BlockTinyTorch extends BlockBase{ public class BlockTinyTorch extends BlockBase{

View file

@ -10,6 +10,8 @@
package de.ellpeck.actuallyadditions.mod.blocks; package de.ellpeck.actuallyadditions.mod.blocks;
import java.util.Random;
import de.ellpeck.actuallyadditions.api.ActuallyAdditionsAPI; import de.ellpeck.actuallyadditions.api.ActuallyAdditionsAPI;
import de.ellpeck.actuallyadditions.api.recipe.TreasureChestLoot; import de.ellpeck.actuallyadditions.api.recipe.TreasureChestLoot;
import de.ellpeck.actuallyadditions.mod.blocks.base.BlockBase; import de.ellpeck.actuallyadditions.mod.blocks.base.BlockBase;
@ -27,15 +29,19 @@ import net.minecraft.init.SoundEvents;
import net.minecraft.item.EnumRarity; import net.minecraft.item.EnumRarity;
import net.minecraft.item.Item; import net.minecraft.item.Item;
import net.minecraft.item.ItemStack; import net.minecraft.item.ItemStack;
import net.minecraft.util.*; import net.minecraft.util.EnumFacing;
import net.minecraft.util.EnumHand;
import net.minecraft.util.EnumParticleTypes;
import net.minecraft.util.Mirror;
import net.minecraft.util.Rotation;
import net.minecraft.util.SoundCategory;
import net.minecraft.util.WeightedRandom;
import net.minecraft.util.math.BlockPos; import net.minecraft.util.math.BlockPos;
import net.minecraft.util.math.MathHelper; import net.minecraft.util.math.MathHelper;
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;
import java.util.Random;
public class BlockTreasureChest extends BlockBase{ public class BlockTreasureChest extends BlockBase{
public BlockTreasureChest(String name){ public BlockTreasureChest(String name){

View file

@ -94,7 +94,7 @@ public class BlockWildPlant extends BlockBushBase{
} }
@Override @Override
protected void registerRendering(){ public void registerRendering(){
for(int i = 0; i < ALL_WILD_PLANTS.length; i++){ for(int i = 0; i < ALL_WILD_PLANTS.length; i++){
ActuallyAdditions.proxy.addRenderRegister(new ItemStack(this, 1, i), this.getRegistryName(), TYPE.getName()+"="+ALL_WILD_PLANTS[i].name); ActuallyAdditions.proxy.addRenderRegister(new ItemStack(this, 1, i), this.getRegistryName(), TYPE.getName()+"="+ALL_WILD_PLANTS[i].name);
} }

View file

@ -11,13 +11,14 @@
package de.ellpeck.actuallyadditions.mod.blocks.base; package de.ellpeck.actuallyadditions.mod.blocks.base;
import de.ellpeck.actuallyadditions.mod.ActuallyAdditions; import de.ellpeck.actuallyadditions.mod.ActuallyAdditions;
import de.ellpeck.actuallyadditions.mod.blocks.render.IHasModel;
import de.ellpeck.actuallyadditions.mod.util.ItemUtil; import de.ellpeck.actuallyadditions.mod.util.ItemUtil;
import net.minecraft.block.Block; import net.minecraft.block.Block;
import net.minecraft.block.material.Material; import net.minecraft.block.material.Material;
import net.minecraft.item.EnumRarity; import net.minecraft.item.EnumRarity;
import net.minecraft.item.ItemStack; import net.minecraft.item.ItemStack;
public class BlockBase extends Block implements ItemBlockBase.ICustomRarity{ public class BlockBase extends Block implements ItemBlockBase.ICustomRarity, IHasModel{
private final String name; private final String name;
@ -30,8 +31,6 @@ public class BlockBase extends Block implements ItemBlockBase.ICustomRarity{
private void register(){ private void register(){
ItemUtil.registerBlock(this, this.getItemBlock(), this.getBaseName(), this.shouldAddCreative()); ItemUtil.registerBlock(this, this.getItemBlock(), this.getBaseName(), this.shouldAddCreative());
this.registerRendering();
} }
protected String getBaseName(){ protected String getBaseName(){
@ -46,7 +45,7 @@ public class BlockBase extends Block implements ItemBlockBase.ICustomRarity{
return true; return true;
} }
protected 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

@ -11,13 +11,14 @@
package de.ellpeck.actuallyadditions.mod.blocks.base; package de.ellpeck.actuallyadditions.mod.blocks.base;
import de.ellpeck.actuallyadditions.mod.ActuallyAdditions; import de.ellpeck.actuallyadditions.mod.ActuallyAdditions;
import de.ellpeck.actuallyadditions.mod.blocks.render.IHasModel;
import de.ellpeck.actuallyadditions.mod.util.ItemUtil; import de.ellpeck.actuallyadditions.mod.util.ItemUtil;
import net.minecraft.block.BlockBush; import net.minecraft.block.BlockBush;
import net.minecraft.block.SoundType; import net.minecraft.block.SoundType;
import net.minecraft.item.EnumRarity; import net.minecraft.item.EnumRarity;
import net.minecraft.item.ItemStack; import net.minecraft.item.ItemStack;
public class BlockBushBase extends BlockBush implements ItemBlockBase.ICustomRarity{ public class BlockBushBase extends BlockBush implements ItemBlockBase.ICustomRarity, IHasModel{
private final String name; private final String name;
@ -30,8 +31,6 @@ public class BlockBushBase extends BlockBush implements ItemBlockBase.ICustomRar
private void register(){ private void register(){
ItemUtil.registerBlock(this, this.getItemBlock(), this.getBaseName(), this.shouldAddCreative()); ItemUtil.registerBlock(this, this.getItemBlock(), this.getBaseName(), this.shouldAddCreative());
this.registerRendering();
} }
protected String getBaseName(){ protected String getBaseName(){
@ -46,7 +45,7 @@ public class BlockBushBase extends BlockBush implements ItemBlockBase.ICustomRar
return true; return true;
} }
protected 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

@ -11,6 +11,7 @@
package de.ellpeck.actuallyadditions.mod.blocks.base; package de.ellpeck.actuallyadditions.mod.blocks.base;
import de.ellpeck.actuallyadditions.mod.ActuallyAdditions; import de.ellpeck.actuallyadditions.mod.ActuallyAdditions;
import de.ellpeck.actuallyadditions.mod.blocks.render.IHasModel;
import de.ellpeck.actuallyadditions.mod.config.ConfigValues; import de.ellpeck.actuallyadditions.mod.config.ConfigValues;
import de.ellpeck.actuallyadditions.mod.tile.TileEntityBase; import de.ellpeck.actuallyadditions.mod.tile.TileEntityBase;
import de.ellpeck.actuallyadditions.mod.tile.TileEntityInventoryBase; import de.ellpeck.actuallyadditions.mod.tile.TileEntityInventoryBase;
@ -46,7 +47,7 @@ import java.util.ArrayList;
import java.util.List; import java.util.List;
import java.util.Random; import java.util.Random;
public abstract class BlockContainerBase extends BlockContainer implements ItemBlockBase.ICustomRarity{ public abstract class BlockContainerBase extends BlockContainer implements ItemBlockBase.ICustomRarity, IHasModel{
private final String name; private final String name;
@ -59,8 +60,6 @@ public abstract class BlockContainerBase extends BlockContainer implements ItemB
private void register(){ private void register(){
ItemUtil.registerBlock(this, this.getItemBlock(), this.getBaseName(), this.shouldAddCreative()); ItemUtil.registerBlock(this, this.getItemBlock(), this.getBaseName(), this.shouldAddCreative());
this.registerRendering();
} }
protected String getBaseName(){ protected String getBaseName(){
@ -75,7 +74,7 @@ public abstract class BlockContainerBase extends BlockContainer implements ItemB
return true; return true;
} }
protected 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

@ -11,6 +11,7 @@
package de.ellpeck.actuallyadditions.mod.blocks.base; package de.ellpeck.actuallyadditions.mod.blocks.base;
import de.ellpeck.actuallyadditions.mod.ActuallyAdditions; import de.ellpeck.actuallyadditions.mod.ActuallyAdditions;
import de.ellpeck.actuallyadditions.mod.blocks.render.IHasModel;
import de.ellpeck.actuallyadditions.mod.util.ItemUtil; import de.ellpeck.actuallyadditions.mod.util.ItemUtil;
import de.ellpeck.actuallyadditions.mod.util.StackUtil; import de.ellpeck.actuallyadditions.mod.util.StackUtil;
import net.minecraft.block.BlockCrops; import net.minecraft.block.BlockCrops;
@ -30,7 +31,7 @@ import net.minecraftforge.common.EnumPlantType;
import java.util.List; import java.util.List;
import java.util.Random; import java.util.Random;
public class BlockPlant extends BlockCrops implements ItemBlockBase.ICustomRarity{ public class BlockPlant extends BlockCrops implements ItemBlockBase.ICustomRarity, IHasModel{
private final String name; private final String name;
private final int minDropAmount; private final int minDropAmount;
@ -54,8 +55,6 @@ public class BlockPlant extends BlockCrops implements ItemBlockBase.ICustomRarit
private void register(){ private void register(){
ItemUtil.registerBlock(this, this.getItemBlock(), this.getBaseName(), this.shouldAddCreative()); ItemUtil.registerBlock(this, this.getItemBlock(), this.getBaseName(), this.shouldAddCreative());
this.registerRendering();
} }
protected String getBaseName(){ protected String getBaseName(){
@ -70,7 +69,7 @@ public class BlockPlant extends BlockCrops implements ItemBlockBase.ICustomRarit
return false; return false;
} }
protected 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

@ -12,13 +12,14 @@ package de.ellpeck.actuallyadditions.mod.blocks.base;
import de.ellpeck.actuallyadditions.mod.ActuallyAdditions; import de.ellpeck.actuallyadditions.mod.ActuallyAdditions;
import de.ellpeck.actuallyadditions.mod.blocks.render.IHasModel;
import de.ellpeck.actuallyadditions.mod.util.ItemUtil; import de.ellpeck.actuallyadditions.mod.util.ItemUtil;
import net.minecraft.block.Block; import net.minecraft.block.Block;
import net.minecraft.block.BlockStairs; import net.minecraft.block.BlockStairs;
import net.minecraft.item.EnumRarity; import net.minecraft.item.EnumRarity;
import net.minecraft.item.ItemStack; import net.minecraft.item.ItemStack;
public class BlockStair extends BlockStairs implements ItemBlockBase.ICustomRarity{ public class BlockStair extends BlockStairs implements ItemBlockBase.ICustomRarity, IHasModel{
private final String name; private final String name;
@ -36,8 +37,6 @@ public class BlockStair extends BlockStairs implements ItemBlockBase.ICustomRari
private void register(){ private void register(){
ItemUtil.registerBlock(this, this.getItemBlock(), this.getBaseName(), this.shouldAddCreative()); ItemUtil.registerBlock(this, this.getItemBlock(), this.getBaseName(), this.shouldAddCreative());
this.registerRendering();
} }
protected String getBaseName(){ protected String getBaseName(){
@ -52,7 +51,7 @@ public class BlockStair extends BlockStairs implements ItemBlockBase.ICustomRari
return true; return true;
} }
protected 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

@ -0,0 +1,7 @@
package de.ellpeck.actuallyadditions.mod.blocks.render;
public interface IHasModel {
public void registerRendering();
}

View file

@ -10,6 +10,8 @@
package de.ellpeck.actuallyadditions.mod.blocks.render; package de.ellpeck.actuallyadditions.mod.blocks.render;
import java.text.NumberFormat;
import de.ellpeck.actuallyadditions.mod.items.ItemBattery; import de.ellpeck.actuallyadditions.mod.items.ItemBattery;
import de.ellpeck.actuallyadditions.mod.tile.TileEntityBatteryBox; import de.ellpeck.actuallyadditions.mod.tile.TileEntityBatteryBox;
import de.ellpeck.actuallyadditions.mod.util.AssetUtil; import de.ellpeck.actuallyadditions.mod.util.AssetUtil;
@ -27,13 +29,11 @@ import net.minecraftforge.energy.IEnergyStorage;
import net.minecraftforge.fml.relauncher.Side; import net.minecraftforge.fml.relauncher.Side;
import net.minecraftforge.fml.relauncher.SideOnly; import net.minecraftforge.fml.relauncher.SideOnly;
import java.text.NumberFormat;
@SideOnly(Side.CLIENT) @SideOnly(Side.CLIENT)
public class RenderBatteryBox extends TileEntitySpecialRenderer{ public class RenderBatteryBox extends TileEntitySpecialRenderer{
@Override @Override
public void func_192841_a(TileEntity tile, double x, double y, double z, float par5, int par6, float f){ public void render(TileEntity tile, double x, double y, double z, float par5, int par6, float f){
if(!(tile instanceof TileEntityBatteryBox)){ if(!(tile instanceof TileEntityBatteryBox)){
return; return;
} }
@ -52,7 +52,7 @@ public class RenderBatteryBox extends TileEntitySpecialRenderer{
if(stack.hasCapability(CapabilityEnergy.ENERGY, null)){ if(stack.hasCapability(CapabilityEnergy.ENERGY, null)){
IEnergyStorage cap = stack.getCapability(CapabilityEnergy.ENERGY, null); IEnergyStorage cap = stack.getCapability(CapabilityEnergy.ENERGY, null);
NumberFormat format = NumberFormat.getInstance(); NumberFormat format = NumberFormat.getInstance();
FontRenderer font = Minecraft.getMinecraft().fontRendererObj; FontRenderer font = Minecraft.getMinecraft().fontRenderer;
String s = format.format(cap.getEnergyStored())+"/"+format.format(cap.getMaxEnergyStored()); String s = format.format(cap.getEnergyStored())+"/"+format.format(cap.getMaxEnergyStored());
float lengthS = -font.getStringWidth(s)/2F; float lengthS = -font.getStringWidth(s)/2F;

View file

@ -28,7 +28,7 @@ import net.minecraftforge.fml.relauncher.SideOnly;
public class RenderCompost extends TileEntitySpecialRenderer{ public class RenderCompost extends TileEntitySpecialRenderer{
@Override @Override
public void func_192841_a(TileEntity te, double x, double y, double z, float partialTicks, int destroyStage, float f){ public void render(TileEntity te, double x, double y, double z, float partialTicks, int destroyStage, float f){
if(te instanceof TileEntityCompost){ if(te instanceof TileEntityCompost){
TileEntityCompost compost = (TileEntityCompost)te; TileEntityCompost compost = (TileEntityCompost)te;
ItemStack slot = compost.slots.getStackInSlot(0); ItemStack slot = compost.slots.getStackInSlot(0);

View file

@ -27,7 +27,7 @@ import net.minecraftforge.fml.relauncher.SideOnly;
public class RenderDisplayStand extends TileEntitySpecialRenderer{ public class RenderDisplayStand extends TileEntitySpecialRenderer{
@Override @Override
public void func_192841_a(TileEntity tile, double x, double y, double z, float par5, int par6, float f){ public void render(TileEntity tile, double x, double y, double z, float par5, int par6, float f){
if(!(tile instanceof TileEntityDisplayStand)){ if(!(tile instanceof TileEntityDisplayStand)){
return; return;
} }

View file

@ -31,7 +31,7 @@ import net.minecraftforge.fml.relauncher.SideOnly;
public class RenderEmpowerer extends TileEntitySpecialRenderer{ public class RenderEmpowerer extends TileEntitySpecialRenderer{
@Override @Override
public void func_192841_a(TileEntity tile, double x, double y, double z, float par5, int par6, float f){ public void render(TileEntity tile, double x, double y, double z, float par5, int par6, float f){
if(!(tile instanceof TileEntityEmpowerer)){ if(!(tile instanceof TileEntityEmpowerer)){
return; return;
} }

View file

@ -41,7 +41,7 @@ public class RenderLaserRelay extends TileEntitySpecialRenderer{
private static final float[] COLOR_INFRARED = new float[]{209F/255F, 179F/255F, 239F/255F}; private static final float[] COLOR_INFRARED = new float[]{209F/255F, 179F/255F, 239F/255F};
@Override @Override
public void func_192841_a(TileEntity tile, double x, double y, double z, float par5, int par6, float f){ public void render(TileEntity 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 = (TileEntityLaserRelay)tile;
boolean hasInvis = false; boolean hasInvis = false;

View file

@ -27,7 +27,7 @@ import net.minecraftforge.fml.relauncher.SideOnly;
public class RenderReconstructorLens extends TileEntitySpecialRenderer{ public class RenderReconstructorLens extends TileEntitySpecialRenderer{
@Override @Override
public void func_192841_a(TileEntity tile, double x, double y, double z, float par5, int par6, float f){ public void render(TileEntity tile, double x, double y, double z, float par5, int par6, float f){
if(!(tile instanceof TileEntityAtomicReconstructor)){ if(!(tile instanceof TileEntityAtomicReconstructor)){
return; return;
} }

View file

@ -32,7 +32,7 @@ import java.util.Locale;
public class RenderSmileyCloud extends TileEntitySpecialRenderer{ public class RenderSmileyCloud extends TileEntitySpecialRenderer{
@Override @Override
public void func_192841_a(TileEntity tile, double x, double y, double z, float par5, int partial, float f){ public void render(TileEntity tile, double x, double y, double z, float par5, int partial, float f){
if(tile instanceof TileEntitySmileyCloud){ if(tile instanceof TileEntitySmileyCloud){
TileEntitySmileyCloud theCloud = (TileEntitySmileyCloud)tile; TileEntitySmileyCloud theCloud = (TileEntitySmileyCloud)tile;

View file

@ -10,6 +10,12 @@
package de.ellpeck.actuallyadditions.mod.booklet; package de.ellpeck.actuallyadditions.mod.booklet;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.Collections;
import java.util.Comparator;
import java.util.List;
import de.ellpeck.actuallyadditions.api.ActuallyAdditionsAPI; import de.ellpeck.actuallyadditions.api.ActuallyAdditionsAPI;
import de.ellpeck.actuallyadditions.api.booklet.IBookletChapter; import de.ellpeck.actuallyadditions.api.booklet.IBookletChapter;
import de.ellpeck.actuallyadditions.api.booklet.IBookletEntry; import de.ellpeck.actuallyadditions.api.booklet.IBookletEntry;
@ -24,8 +30,21 @@ import de.ellpeck.actuallyadditions.mod.booklet.chapter.BookletChapterTrials;
import de.ellpeck.actuallyadditions.mod.booklet.entry.BookletEntry; import de.ellpeck.actuallyadditions.mod.booklet.entry.BookletEntry;
import de.ellpeck.actuallyadditions.mod.booklet.entry.BookletEntryAllItems; import de.ellpeck.actuallyadditions.mod.booklet.entry.BookletEntryAllItems;
import de.ellpeck.actuallyadditions.mod.booklet.entry.BookletEntryTrials; import de.ellpeck.actuallyadditions.mod.booklet.entry.BookletEntryTrials;
import de.ellpeck.actuallyadditions.mod.booklet.page.*; import de.ellpeck.actuallyadditions.mod.booklet.page.BookletPage;
import de.ellpeck.actuallyadditions.mod.crafting.*; import de.ellpeck.actuallyadditions.mod.booklet.page.PageCrafting;
import de.ellpeck.actuallyadditions.mod.booklet.page.PageCrusherRecipe;
import de.ellpeck.actuallyadditions.mod.booklet.page.PageEmpowerer;
import de.ellpeck.actuallyadditions.mod.booklet.page.PageFurnace;
import de.ellpeck.actuallyadditions.mod.booklet.page.PageLinkButton;
import de.ellpeck.actuallyadditions.mod.booklet.page.PagePicture;
import de.ellpeck.actuallyadditions.mod.booklet.page.PageReconstructor;
import de.ellpeck.actuallyadditions.mod.booklet.page.PageTextOnly;
import de.ellpeck.actuallyadditions.mod.crafting.BlockCrafting;
import de.ellpeck.actuallyadditions.mod.crafting.CrusherCrafting;
import de.ellpeck.actuallyadditions.mod.crafting.FoodCrafting;
import de.ellpeck.actuallyadditions.mod.crafting.ItemCrafting;
import de.ellpeck.actuallyadditions.mod.crafting.MiscCrafting;
import de.ellpeck.actuallyadditions.mod.crafting.ToolCrafting;
import de.ellpeck.actuallyadditions.mod.fluids.InitFluids; import de.ellpeck.actuallyadditions.mod.fluids.InitFluids;
import de.ellpeck.actuallyadditions.mod.gen.OreGen; import de.ellpeck.actuallyadditions.mod.gen.OreGen;
import de.ellpeck.actuallyadditions.mod.gen.WorldGenLushCaves; import de.ellpeck.actuallyadditions.mod.gen.WorldGenLushCaves;
@ -38,7 +57,28 @@ import de.ellpeck.actuallyadditions.mod.items.metalists.TheCrystals;
import de.ellpeck.actuallyadditions.mod.items.metalists.TheFoods; import de.ellpeck.actuallyadditions.mod.items.metalists.TheFoods;
import de.ellpeck.actuallyadditions.mod.items.metalists.TheMiscItems; import de.ellpeck.actuallyadditions.mod.items.metalists.TheMiscItems;
import de.ellpeck.actuallyadditions.mod.recipe.EmpowererHandler; import de.ellpeck.actuallyadditions.mod.recipe.EmpowererHandler;
import de.ellpeck.actuallyadditions.mod.tile.*; import de.ellpeck.actuallyadditions.mod.tile.TileEntityAtomicReconstructor;
import de.ellpeck.actuallyadditions.mod.tile.TileEntityCoalGenerator;
import de.ellpeck.actuallyadditions.mod.tile.TileEntityCoffeeMachine;
import de.ellpeck.actuallyadditions.mod.tile.TileEntityDirectionalBreaker;
import de.ellpeck.actuallyadditions.mod.tile.TileEntityFireworkBox;
import de.ellpeck.actuallyadditions.mod.tile.TileEntityFurnaceDouble;
import de.ellpeck.actuallyadditions.mod.tile.TileEntityFurnaceSolar;
import de.ellpeck.actuallyadditions.mod.tile.TileEntityGrinder;
import de.ellpeck.actuallyadditions.mod.tile.TileEntityHeatCollector;
import de.ellpeck.actuallyadditions.mod.tile.TileEntityItemRepairer;
import de.ellpeck.actuallyadditions.mod.tile.TileEntityLaserRelay;
import de.ellpeck.actuallyadditions.mod.tile.TileEntityLaserRelayEnergy;
import de.ellpeck.actuallyadditions.mod.tile.TileEntityLaserRelayEnergyAdvanced;
import de.ellpeck.actuallyadditions.mod.tile.TileEntityLaserRelayEnergyExtreme;
import de.ellpeck.actuallyadditions.mod.tile.TileEntityLavaFactoryController;
import de.ellpeck.actuallyadditions.mod.tile.TileEntityLeafGenerator;
import de.ellpeck.actuallyadditions.mod.tile.TileEntityMiner;
import de.ellpeck.actuallyadditions.mod.tile.TileEntityPhantomPlacer;
import de.ellpeck.actuallyadditions.mod.tile.TileEntityPhantomface;
import de.ellpeck.actuallyadditions.mod.tile.TileEntityPlayerInterface;
import de.ellpeck.actuallyadditions.mod.tile.TileEntityRangedCollector;
import de.ellpeck.actuallyadditions.mod.tile.TileEntityShockSuppressor;
import de.ellpeck.actuallyadditions.mod.update.UpdateChecker; import de.ellpeck.actuallyadditions.mod.update.UpdateChecker;
import de.ellpeck.actuallyadditions.mod.util.ModUtil; import de.ellpeck.actuallyadditions.mod.util.ModUtil;
import de.ellpeck.actuallyadditions.mod.util.Util; import de.ellpeck.actuallyadditions.mod.util.Util;
@ -50,8 +90,6 @@ import net.minecraftforge.common.ForgeModContainer;
import net.minecraftforge.fluids.FluidStack; import net.minecraftforge.fluids.FluidStack;
import net.minecraftforge.fluids.UniversalBucket; import net.minecraftforge.fluids.UniversalBucket;
import java.util.*;
public final class InitBooklet{ public final class InitBooklet{
public static BookletChapter[] chaptersIntroduction = new BookletChapter[11]; public static BookletChapter[] chaptersIntroduction = new BookletChapter[11];

View file

@ -61,11 +61,11 @@ public class BookmarkButton extends GuiButton{
} }
@Override @Override
public void func_191745_a(Minecraft minecraft, int x, int y, float f){ public void drawButton(Minecraft minecraft, int x, int y, float f){
if(this.visible){ if(this.visible){
minecraft.getTextureManager().bindTexture(GuiBooklet.RES_LOC_GADGETS); minecraft.getTextureManager().bindTexture(GuiBooklet.RES_LOC_GADGETS);
GlStateManager.color(1.0F, 1.0F, 1.0F, 1.0F); GlStateManager.color(1.0F, 1.0F, 1.0F, 1.0F);
this.hovered = x >= this.xPosition && y >= this.yPosition && x < this.xPosition+this.width && y < this.yPosition+this.height; this.hovered = x >= this.x && y >= this.y && x < this.x+this.width && y < this.y+this.height;
int k = this.getHoverState(this.hovered); int k = this.getHoverState(this.hovered);
if(k == 0){ if(k == 0){
k = 1; k = 1;
@ -75,14 +75,14 @@ public class BookmarkButton extends GuiButton{
GlStateManager.tryBlendFuncSeparate(770, 771, 1, 0); GlStateManager.tryBlendFuncSeparate(770, 771, 1, 0);
GlStateManager.blendFunc(770, 771); GlStateManager.blendFunc(770, 771);
int renderHeight = 25; int renderHeight = 25;
this.drawTexturedModalRect(this.xPosition, this.yPosition, 224+(this.assignedPage == null ? 0 : 16), 14-renderHeight+k*renderHeight, this.width, renderHeight); this.drawTexturedModalRect(this.x, this.y, 224+(this.assignedPage == null ? 0 : 16), 14-renderHeight+k*renderHeight, this.width, renderHeight);
this.mouseDragged(minecraft, x, y); this.mouseDragged(minecraft, x, y);
if(this.assignedPage != null){ if(this.assignedPage != null){
ItemStack display = this.assignedPage.getChapter().getDisplayItemStack(); ItemStack display = this.assignedPage.getChapter().getDisplayItemStack();
if(StackUtil.isValid(display)){ if(StackUtil.isValid(display)){
GlStateManager.pushMatrix(); GlStateManager.pushMatrix();
AssetUtil.renderStackToGui(display, this.xPosition+2, this.yPosition+1, 0.725F); AssetUtil.renderStackToGui(display, this.x+2, this.y+1, 0.725F);
GlStateManager.popMatrix(); GlStateManager.popMatrix();
} }
} }
@ -112,7 +112,7 @@ public class BookmarkButton extends GuiButton{
} }
Minecraft mc = Minecraft.getMinecraft(); Minecraft mc = Minecraft.getMinecraft();
GuiUtils.drawHoveringText(list, mouseX, mouseY, mc.displayWidth, mc.displayHeight, -1, mc.fontRendererObj); GuiUtils.drawHoveringText(list, mouseX, mouseY, mc.displayWidth, mc.displayHeight, -1, mc.fontRenderer);
} }
} }
} }

View file

@ -34,10 +34,10 @@ public class EntryButton extends GuiButton{
} }
@Override @Override
public void func_191745_a(Minecraft minecraft, int mouseX, int mouseY, float f){ public void drawButton(Minecraft minecraft, int mouseX, int mouseY, float f){
if(this.visible){ if(this.visible){
GlStateManager.color(1.0F, 1.0F, 1.0F, 1.0F); GlStateManager.color(1.0F, 1.0F, 1.0F, 1.0F);
this.hovered = mouseX >= this.xPosition && mouseY >= this.yPosition && mouseX < this.xPosition+this.width && mouseY < this.yPosition+this.height; this.hovered = mouseX >= this.x && mouseY >= this.y && mouseX < this.x+this.width && mouseY < this.y+this.height;
GlStateManager.enableBlend(); GlStateManager.enableBlend();
GlStateManager.tryBlendFuncSeparate(770, 771, 1, 0); GlStateManager.tryBlendFuncSeparate(770, 771, 1, 0);
GlStateManager.blendFunc(770, 771); GlStateManager.blendFunc(770, 771);
@ -46,7 +46,7 @@ public class EntryButton extends GuiButton{
int textOffsetX = 0; int textOffsetX = 0;
if(StackUtil.isValid(this.stackToRender)){ if(StackUtil.isValid(this.stackToRender)){
GlStateManager.pushMatrix(); GlStateManager.pushMatrix();
AssetUtil.renderStackToGui(this.stackToRender, this.xPosition-4, this.yPosition, 0.725F); AssetUtil.renderStackToGui(this.stackToRender, this.x-4, this.y, 0.725F);
GlStateManager.popMatrix(); GlStateManager.popMatrix();
textOffsetX = 10; textOffsetX = 10;
} }
@ -55,11 +55,11 @@ public class EntryButton extends GuiButton{
if(this.hovered){ if(this.hovered){
GlStateManager.pushMatrix(); GlStateManager.pushMatrix();
AssetUtil.drawHorizontalGradientRect(this.xPosition+textOffsetX-1, this.yPosition+this.height-1, this.xPosition+(int)(minecraft.fontRendererObj.getStringWidth(this.displayString)*scale)+textOffsetX+1, this.yPosition+this.height, 0x80 << 24 | 22271, 22271, this.zLevel); AssetUtil.drawHorizontalGradientRect(this.x+textOffsetX-1, this.y+this.height-1, this.x+(int)(minecraft.fontRenderer.getStringWidth(this.displayString)*scale)+textOffsetX+1, this.y+this.height, 0x80 << 24 | 22271, 22271, this.zLevel);
GlStateManager.popMatrix(); GlStateManager.popMatrix();
} }
StringUtil.renderScaledAsciiString(minecraft.fontRendererObj, this.displayString, this.xPosition+textOffsetX, this.yPosition+2+(this.height-8)/2, 0, false, scale); StringUtil.renderScaledAsciiString(minecraft.fontRenderer, this.displayString, this.x+textOffsetX, this.y+2+(this.height-8)/2, 0, false, scale);
} }
} }
} }

View file

@ -27,12 +27,12 @@ public class TrialsButton extends TexturedButton{
} }
@Override @Override
public void func_191745_a(Minecraft minecraft, int x, int y, float f){ public void drawButton(Minecraft minecraft, int x, int y, float f){
super.func_191745_a(minecraft, x, y, f); super.drawButton(minecraft, x, y, f);
if(this.visible){ if(this.visible){
if(this.hovered || this.isTrials){ if(this.hovered || this.isTrials){
this.drawCenteredString(minecraft.fontRendererObj, StringUtil.localize("booklet."+ModUtil.MOD_ID+".trialsButton.name"), this.xPosition+(this.width-8)/2, this.yPosition+(this.height-8)/2, 14737632); this.drawCenteredString(minecraft.fontRenderer, StringUtil.localize("booklet."+ModUtil.MOD_ID+".trialsButton.name"), this.x+(this.width-8)/2, this.y+(this.height-8)/2, 14737632);
} }
} }
} }

View file

@ -10,6 +10,14 @@
package de.ellpeck.actuallyadditions.mod.booklet.gui; package de.ellpeck.actuallyadditions.mod.booklet.gui;
import java.io.IOException;
import java.util.Arrays;
import java.util.List;
import org.apache.commons.lang3.ArrayUtils;
import org.lwjgl.input.Keyboard;
import org.lwjgl.input.Mouse;
import de.ellpeck.actuallyadditions.api.ActuallyAdditionsAPI; import de.ellpeck.actuallyadditions.api.ActuallyAdditionsAPI;
import de.ellpeck.actuallyadditions.api.booklet.internal.GuiBookletBase; import de.ellpeck.actuallyadditions.api.booklet.internal.GuiBookletBase;
import de.ellpeck.actuallyadditions.mod.booklet.button.BookmarkButton; import de.ellpeck.actuallyadditions.mod.booklet.button.BookmarkButton;
@ -30,13 +38,6 @@ import net.minecraft.util.ResourceLocation;
import net.minecraft.util.text.TextFormatting; import net.minecraft.util.text.TextFormatting;
import net.minecraftforge.fml.relauncher.Side; import net.minecraftforge.fml.relauncher.Side;
import net.minecraftforge.fml.relauncher.SideOnly; import net.minecraftforge.fml.relauncher.SideOnly;
import org.apache.commons.lang3.ArrayUtils;
import org.lwjgl.input.Keyboard;
import org.lwjgl.input.Mouse;
import java.io.IOException;
import java.util.Arrays;
import java.util.List;
@SideOnly(Side.CLIENT) @SideOnly(Side.CLIENT)
public abstract class GuiBooklet extends GuiBookletBase{ public abstract class GuiBooklet extends GuiBookletBase{
@ -115,7 +116,7 @@ public abstract class GuiBooklet extends GuiBookletBase{
} }
if(this.hasSearchBar()){ if(this.hasSearchBar()){
this.searchField = new GuiTextField(-420, this.fontRendererObj, this.guiLeft+this.xSize+2, this.guiTop+this.ySize-40+2, 64, 12); this.searchField = new GuiTextField(-420, this.fontRenderer, this.guiLeft+this.xSize+2, this.guiTop+this.ySize-40+2, 64, 12);
this.searchField.setMaxStringLength(50); this.searchField.setMaxStringLength(50);
this.searchField.setEnableBackgroundDrawing(false); this.searchField.setEnableBackgroundDrawing(false);
} }
@ -177,16 +178,16 @@ public abstract class GuiBooklet extends GuiBookletBase{
this.mc.getTextureManager().bindTexture(RES_LOC_GADGETS); this.mc.getTextureManager().bindTexture(RES_LOC_GADGETS);
this.drawTexturedModalRect(this.guiLeft+this.xSize, this.guiTop+this.ySize-40, 188, 0, 68, 14); this.drawTexturedModalRect(this.guiLeft+this.xSize, this.guiTop+this.ySize-40, 188, 0, 68, 14);
boolean unicodeBefore = this.fontRendererObj.getUnicodeFlag(); boolean unicodeBefore = this.fontRenderer.getUnicodeFlag();
this.fontRendererObj.setUnicodeFlag(true); this.fontRenderer.setUnicodeFlag(true);
if(!this.searchField.isFocused() && (this.searchField.getText() == null || this.searchField.getText().isEmpty())){ if(!this.searchField.isFocused() && (this.searchField.getText() == null || this.searchField.getText().isEmpty())){
this.fontRendererObj.drawString(TextFormatting.ITALIC+StringUtil.localize("info."+ModUtil.MOD_ID+".booklet.searchField"), this.guiLeft+this.xSize+2, this.guiTop+this.ySize-40+2, 0xFFFFFF, false); this.fontRenderer.drawString(TextFormatting.ITALIC+StringUtil.localize("info."+ModUtil.MOD_ID+".booklet.searchField"), this.guiLeft+this.xSize+2, this.guiTop+this.ySize-40+2, 0xFFFFFF, false);
} }
this.searchField.drawTextBox(); this.searchField.drawTextBox();
this.fontRendererObj.setUnicodeFlag(unicodeBefore); this.fontRenderer.setUnicodeFlag(unicodeBefore);
} }
} }
@ -348,12 +349,12 @@ public abstract class GuiBooklet extends GuiBookletBase{
@Override @Override
public void renderScaledAsciiString(String text, int x, int y, int color, boolean shadow, float scale){ public void renderScaledAsciiString(String text, int x, int y, int color, boolean shadow, float scale){
StringUtil.renderScaledAsciiString(this.fontRendererObj, text, x, y, color, shadow, scale); StringUtil.renderScaledAsciiString(this.fontRenderer, text, x, y, color, shadow, scale);
} }
@Override @Override
public void renderSplitScaledAsciiString(String text, int x, int y, int color, boolean shadow, float scale, int length){ public void renderSplitScaledAsciiString(String text, int x, int y, int color, boolean shadow, float scale, int length){
StringUtil.renderSplitScaledAsciiString(this.fontRendererObj, text, x, y, color, shadow, scale, length); StringUtil.renderSplitScaledAsciiString(this.fontRenderer, text, x, y, color, shadow, scale, length);
} }
@Override @Override

View file

@ -68,7 +68,7 @@ public class GuiEntry extends GuiBooklet{
super.drawScreenPre(mouseX, mouseY, partialTicks); super.drawScreenPre(mouseX, mouseY, partialTicks);
String name = this.entry.getLocalizedName(); String name = this.entry.getLocalizedName();
this.fontRendererObj.drawString(name, this.guiLeft+this.xSize/2-this.fontRendererObj.getStringWidth(name)/2, this.guiTop-1, 0xFFFFFF, true); this.fontRenderer.drawString(name, this.guiLeft+this.xSize/2-this.fontRenderer.getStringWidth(name)/2, this.guiTop-1, 0xFFFFFF, true);
for(int i = 0; i < 2; i++){ for(int i = 0; i < 2; i++){
String pageStrg = "Page "+(this.entryPage*2+i+1)+"/"+this.pageAmount*2; String pageStrg = "Page "+(this.entryPage*2+i+1)+"/"+this.pageAmount*2;

View file

@ -127,7 +127,7 @@ public class GuiMainPage extends GuiBooklet{
String usedQuote = QUOTES[this.mc.world.rand.nextInt(QUOTES.length)]; String usedQuote = QUOTES[this.mc.world.rand.nextInt(QUOTES.length)];
String[] quoteSplit = usedQuote.split("@"); String[] quoteSplit = usedQuote.split("@");
if(quoteSplit.length == 2){ if(quoteSplit.length == 2){
this.quote = this.fontRendererObj.listFormattedStringToWidth(quoteSplit[0], 120); this.quote = this.fontRenderer.listFormattedStringToWidth(quoteSplit[0], 120);
this.quoteGuy = quoteSplit[1]; this.quoteGuy = quoteSplit[1];
} }
@ -198,13 +198,13 @@ public class GuiMainPage extends GuiBooklet{
List<String> configText = new ArrayList<String>(); List<String> configText = new ArrayList<String>();
configText.add(TextFormatting.GOLD+StringUtil.localize("booklet."+ModUtil.MOD_ID+".configButton.name")); configText.add(TextFormatting.GOLD+StringUtil.localize("booklet."+ModUtil.MOD_ID+".configButton.name"));
configText.addAll(this.fontRendererObj.listFormattedStringToWidth(StringUtil.localizeFormatted("booklet."+ModUtil.MOD_ID+".configButton.desc", ModUtil.NAME).replaceAll("\\\\n", "\n"), 200)); configText.addAll(this.fontRenderer.listFormattedStringToWidth(StringUtil.localizeFormatted("booklet."+ModUtil.MOD_ID+".configButton.desc", ModUtil.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<String>();
achievementText.add(TextFormatting.GOLD+StringUtil.localize("booklet."+ModUtil.MOD_ID+".achievementButton.name")); achievementText.add(TextFormatting.GOLD+StringUtil.localize("booklet."+ModUtil.MOD_ID+".achievementButton.name"));
achievementText.addAll(this.fontRendererObj.listFormattedStringToWidth(StringUtil.localizeFormatted("booklet."+ModUtil.MOD_ID+".achievementButton.desc", ModUtil.NAME), 200)); achievementText.addAll(this.fontRenderer.listFormattedStringToWidth(StringUtil.localizeFormatted("booklet."+ModUtil.MOD_ID+".achievementButton.desc", ModUtil.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);
//this.buttonList.add(this.achievementButton); //this.buttonList.add(this.achievementButton);
@ -278,12 +278,12 @@ public class GuiMainPage extends GuiBooklet{
super.drawScreenPre(mouseX, mouseY, partialTicks); super.drawScreenPre(mouseX, mouseY, partialTicks);
String strg = TextFormatting.DARK_GREEN+StringUtil.localize(this.bookletName); String strg = TextFormatting.DARK_GREEN+StringUtil.localize(this.bookletName);
this.fontRendererObj.drawString(strg, this.guiLeft+72-this.fontRendererObj.getStringWidth(strg)/2-3, this.guiTop+19, 0); this.fontRenderer.drawString(strg, this.guiLeft+72-this.fontRenderer.getStringWidth(strg)/2-3, this.guiTop+19, 0);
strg = TextFormatting.DARK_GREEN+StringUtil.localize("info."+ModUtil.MOD_ID+".booklet.manualName.2"); strg = TextFormatting.DARK_GREEN+StringUtil.localize("info."+ModUtil.MOD_ID+".booklet.manualName.2");
this.fontRendererObj.drawString(strg, this.guiLeft+72-this.fontRendererObj.getStringWidth(strg)/2-3, this.guiTop+19+this.fontRendererObj.FONT_HEIGHT, 0); this.fontRenderer.drawString(strg, this.guiLeft+72-this.fontRenderer.getStringWidth(strg)/2-3, this.guiTop+19+this.fontRenderer.FONT_HEIGHT, 0);
strg = TextFormatting.GOLD+TextFormatting.ITALIC.toString()+this.bookletEdition; strg = TextFormatting.GOLD+TextFormatting.ITALIC.toString()+this.bookletEdition;
this.fontRendererObj.drawString(strg, this.guiLeft+72-this.fontRendererObj.getStringWidth(strg)/2-3, this.guiTop+40, 0); this.fontRenderer.drawString(strg, this.guiLeft+72-this.fontRenderer.getStringWidth(strg)/2-3, this.guiTop+40, 0);
if(this.showTutorial){ if(this.showTutorial){
String text = TextFormatting.BLUE+"It looks like this is the first time you are using this manual. \nIf you click the button below, some useful bookmarks will be stored at the bottom of the GUI. You should definitely check them out to get started with "+ModUtil.NAME+"! \nIf you don't want this, shift-click the button."; String text = TextFormatting.BLUE+"It looks like this is the first time you are using this manual. \nIf you click the button below, some useful bookmarks will be stored at the bottom of the GUI. You should definitely check them out to get started with "+ModUtil.NAME+"! \nIf you don't want this, shift-click the button.";

View file

@ -10,6 +10,13 @@
package de.ellpeck.actuallyadditions.mod.booklet.gui; package de.ellpeck.actuallyadditions.mod.booklet.gui;
import java.awt.Desktop;
import java.io.IOException;
import java.net.URI;
import java.util.ArrayList;
import java.util.Collections;
import java.util.List;
import de.ellpeck.actuallyadditions.api.booklet.IBookletChapter; import de.ellpeck.actuallyadditions.api.booklet.IBookletChapter;
import de.ellpeck.actuallyadditions.api.booklet.IBookletPage; import de.ellpeck.actuallyadditions.api.booklet.IBookletPage;
import de.ellpeck.actuallyadditions.api.booklet.internal.GuiBookletBase; import de.ellpeck.actuallyadditions.api.booklet.internal.GuiBookletBase;
@ -26,13 +33,6 @@ import net.minecraft.util.text.TextFormatting;
import net.minecraftforge.fml.relauncher.Side; import net.minecraftforge.fml.relauncher.Side;
import net.minecraftforge.fml.relauncher.SideOnly; import net.minecraftforge.fml.relauncher.SideOnly;
import java.awt.*;
import java.io.IOException;
import java.net.URI;
import java.util.ArrayList;
import java.util.Collections;
import java.util.List;
@SideOnly(Side.CLIENT) @SideOnly(Side.CLIENT)
public class GuiPage extends GuiBooklet{ public class GuiPage extends GuiBooklet{
@ -167,7 +167,7 @@ public class GuiPage extends GuiBooklet{
if(this.pages[0] != null){ if(this.pages[0] != null){
IBookletChapter chapter = this.pages[0].getChapter(); IBookletChapter chapter = this.pages[0].getChapter();
String name = chapter.getLocalizedName(); String name = chapter.getLocalizedName();
this.fontRendererObj.drawString(name, this.guiLeft+this.xSize/2-this.fontRendererObj.getStringWidth(name)/2, this.guiTop-1, 0xFFFFFF, true); this.fontRenderer.drawString(name, this.guiLeft+this.xSize/2-this.fontRenderer.getStringWidth(name)/2, this.guiTop-1, 0xFFFFFF, true);
} }
for(int i = 0; i < this.pages.length; i++){ for(int i = 0; i < this.pages.length; i++){

View file

@ -56,8 +56,8 @@ public class ItemDisplay{
public void drawPost(int mouseX, int mouseY){ public void drawPost(int mouseX, int mouseY){
if(this.isHovered(mouseX, mouseY)){ if(this.isHovered(mouseX, mouseY)){
Minecraft mc = this.gui.mc; Minecraft mc = this.gui.mc;
boolean flagBefore = mc.fontRendererObj.getUnicodeFlag(); boolean flagBefore = mc.fontRenderer.getUnicodeFlag();
mc.fontRendererObj.setUnicodeFlag(false); mc.fontRenderer.setUnicodeFlag(false);
List<String> list = this.stack.getTooltip(mc.player, mc.gameSettings.advancedItemTooltips ? TooltipFlags.ADVANCED : TooltipFlags.NORMAL); List<String> list = this.stack.getTooltip(mc.player, mc.gameSettings.advancedItemTooltips ? TooltipFlags.ADVANCED : TooltipFlags.NORMAL);
@ -74,9 +74,9 @@ public class ItemDisplay{
list.add(TextFormatting.GOLD+StringUtil.localize("booklet."+ModUtil.MOD_ID+".clickToSeeRecipe")); list.add(TextFormatting.GOLD+StringUtil.localize("booklet."+ModUtil.MOD_ID+".clickToSeeRecipe"));
} }
GuiUtils.drawHoveringText(list, mouseX, mouseY, mc.displayWidth, mc.displayHeight, -1, mc.fontRendererObj); GuiUtils.drawHoveringText(list, mouseX, mouseY, mc.displayWidth, mc.displayHeight, -1, mc.fontRenderer);
mc.fontRendererObj.setUnicodeFlag(flagBefore); mc.fontRenderer.setUnicodeFlag(flagBefore);
} }
} }

View file

@ -10,6 +10,8 @@
package de.ellpeck.actuallyadditions.mod.booklet.page; package de.ellpeck.actuallyadditions.mod.booklet.page;
import java.util.List;
import de.ellpeck.actuallyadditions.api.ActuallyAdditionsAPI; import de.ellpeck.actuallyadditions.api.ActuallyAdditionsAPI;
import de.ellpeck.actuallyadditions.api.booklet.internal.GuiBookletBase; import de.ellpeck.actuallyadditions.api.booklet.internal.GuiBookletBase;
import de.ellpeck.actuallyadditions.api.recipe.CoffeeIngredient; import de.ellpeck.actuallyadditions.api.recipe.CoffeeIngredient;
@ -21,8 +23,6 @@ import net.minecraftforge.fml.client.config.GuiUtils;
import net.minecraftforge.fml.relauncher.Side; import net.minecraftforge.fml.relauncher.Side;
import net.minecraftforge.fml.relauncher.SideOnly; import net.minecraftforge.fml.relauncher.SideOnly;
import java.util.List;
public class PageCoffeeMachine extends BookletPage{ public class PageCoffeeMachine extends BookletPage{
private final CoffeeIngredient ingredient; private final CoffeeIngredient ingredient;

View file

@ -10,6 +10,9 @@
package de.ellpeck.actuallyadditions.mod.booklet.page; package de.ellpeck.actuallyadditions.mod.booklet.page;
import java.util.Arrays;
import java.util.List;
import de.ellpeck.actuallyadditions.api.booklet.internal.GuiBookletBase; import de.ellpeck.actuallyadditions.api.booklet.internal.GuiBookletBase;
import de.ellpeck.actuallyadditions.mod.booklet.gui.GuiBooklet; import de.ellpeck.actuallyadditions.mod.booklet.gui.GuiBooklet;
import de.ellpeck.actuallyadditions.mod.util.ModUtil; import de.ellpeck.actuallyadditions.mod.util.ModUtil;
@ -28,9 +31,6 @@ import net.minecraftforge.fml.relauncher.SideOnly;
import net.minecraftforge.oredict.ShapedOreRecipe; import net.minecraftforge.oredict.ShapedOreRecipe;
import net.minecraftforge.oredict.ShapelessOreRecipe; import net.minecraftforge.oredict.ShapelessOreRecipe;
import java.util.Arrays;
import java.util.List;
public class PageCrafting extends BookletPage{ public class PageCrafting extends BookletPage{
private final List<IRecipe> recipes; private final List<IRecipe> recipes;
@ -152,15 +152,15 @@ public class PageCrafting extends BookletPage{
catch(Exception e){ catch(Exception e){
ModUtil.LOGGER.error("Something went wrong trying to get the Crafting Recipe in the booklet to display!", e); ModUtil.LOGGER.error("Something went wrong trying to get the Crafting Recipe in the booklet to display!", e);
} }
for(int i = 0; i < shaped.func_192400_c().size(); i++){ for(int i = 0; i < shaped.getIngredients().size(); i++){
ings[i] = shaped.func_192400_c().get(i); ings[i] = shaped.getIngredients().get(i);
} }
this.recipeTypeLocKey = "booklet."+ModUtil.MOD_ID+".shapedOreRecipe"; this.recipeTypeLocKey = "booklet."+ModUtil.MOD_ID+".shapedOreRecipe";
} }
else if(recipe instanceof ShapelessOreRecipe){ else if(recipe instanceof ShapelessOreRecipe){
ShapelessOreRecipe shapeless = (ShapelessOreRecipe)recipe; ShapelessOreRecipe shapeless = (ShapelessOreRecipe)recipe;
for(int i = 0; i < shapeless.func_192400_c().size(); i++){ for(int i = 0; i < shapeless.getIngredients().size(); i++){
ings[i] = shapeless.func_192400_c().get(i); ings[i] = shapeless.getIngredients().get(i);
} }
this.recipeTypeLocKey = "booklet."+ModUtil.MOD_ID+".shapelessOreRecipe"; this.recipeTypeLocKey = "booklet."+ModUtil.MOD_ID+".shapelessOreRecipe";
} }
@ -169,7 +169,7 @@ public class PageCrafting extends BookletPage{
for(int y = 0; y < height; y++){ for(int y = 0; y < height; y++){
Ingredient ing = ings[y*width+x]; Ingredient ing = ings[y*width+x];
if(ing != null){ if(ing != null){
ItemStack[] stacks = ing.func_193365_a(); ItemStack[] stacks = ing.getMatchingStacks();
if(stacks != null && stacks.length > 0){ if(stacks != null && stacks.length > 0){
ItemStack stack = stacks[0]; ItemStack stack = stacks[0];
if(StackUtil.isValid(stack)){ if(StackUtil.isValid(stack)){

View file

@ -10,15 +10,15 @@
package de.ellpeck.actuallyadditions.mod.config; package de.ellpeck.actuallyadditions.mod.config;
import java.util.ArrayList;
import java.util.List;
import de.ellpeck.actuallyadditions.mod.util.ModUtil; import de.ellpeck.actuallyadditions.mod.util.ModUtil;
import net.minecraft.client.gui.GuiScreen; import net.minecraft.client.gui.GuiScreen;
import net.minecraftforge.common.config.ConfigElement; import net.minecraftforge.common.config.ConfigElement;
import net.minecraftforge.fml.client.config.GuiConfig; import net.minecraftforge.fml.client.config.GuiConfig;
import net.minecraftforge.fml.client.config.IConfigElement; import net.minecraftforge.fml.client.config.IConfigElement;
import java.util.ArrayList;
import java.util.List;
public class GuiConfiguration extends GuiConfig{ public class GuiConfiguration extends GuiConfig{
public GuiConfiguration(GuiScreen parentScreen){ public GuiConfiguration(GuiScreen parentScreen){

View file

@ -569,7 +569,6 @@ public final class BlockCrafting{
'D', new ItemStack(InitItems.itemCrystal, 1, TheCrystals.IRON.ordinal()), 'D', new ItemStack(InitItems.itemCrystal, 1, TheCrystals.IRON.ordinal()),
'R', new ItemStack(Items.REPEATER), 'R', new ItemStack(Items.REPEATER),
'Q', new ItemStack(InitBlocks.blockMisc, 1, TheMiscBlocks.IRON_CASING.ordinal()), 'Q', new ItemStack(InitBlocks.blockMisc, 1, TheMiscBlocks.IRON_CASING.ordinal()),
'L', new ItemStack(Items.LAVA_BUCKET),
'C', new ItemStack(InitItems.itemMisc, 1, TheMiscItems.COIL_ADVANCED.ordinal()), 'C', new ItemStack(InitItems.itemMisc, 1, TheMiscItems.COIL_ADVANCED.ordinal()),
'B', new ItemStack(Blocks.IRON_BARS)); 'B', new ItemStack(Blocks.IRON_BARS));
recipeHeatCollector = RecipeUtil.lastIRecipe(); recipeHeatCollector = RecipeUtil.lastIRecipe();
@ -608,7 +607,6 @@ public final class BlockCrafting{
'C', "cobblestone", 'C', "cobblestone",
'D', new ItemStack(InitItems.itemMisc, 1, TheMiscItems.COIL.ordinal()), 'D', new ItemStack(InitItems.itemMisc, 1, TheMiscItems.COIL.ordinal()),
'Q', new ItemStack(InitBlocks.blockMisc, 1, TheMiscBlocks.IRON_CASING.ordinal()), 'Q', new ItemStack(InitBlocks.blockMisc, 1, TheMiscBlocks.IRON_CASING.ordinal()),
'P', new ItemStack(Blocks.PISTON),
'F', new ItemStack(Items.FLINT)); 'F', new ItemStack(Items.FLINT));
recipeCrusher = RecipeUtil.lastIRecipe(); recipeCrusher = RecipeUtil.lastIRecipe();
@ -618,8 +616,7 @@ public final class BlockCrafting{
'C', "cobblestone", 'C', "cobblestone",
'D', new ItemStack(InitItems.itemMisc, 1, TheMiscItems.COIL_ADVANCED.ordinal()), 'D', new ItemStack(InitItems.itemMisc, 1, TheMiscItems.COIL_ADVANCED.ordinal()),
'R', InitBlocks.blockGrinder, 'R', InitBlocks.blockGrinder,
'F', new ItemStack(InitBlocks.blockMisc, 1, TheMiscBlocks.IRON_CASING.ordinal()), 'F', new ItemStack(InitBlocks.blockMisc, 1, TheMiscBlocks.IRON_CASING.ordinal()));
'P', new ItemStack(Blocks.PISTON));
recipeDoubleCrusher = RecipeUtil.lastIRecipe(); recipeDoubleCrusher = RecipeUtil.lastIRecipe();
//Double Furnace //Double Furnace

View file

@ -15,7 +15,11 @@ import de.ellpeck.actuallyadditions.mod.config.values.ConfigIntListValues;
import de.ellpeck.actuallyadditions.mod.fluids.InitFluids; import de.ellpeck.actuallyadditions.mod.fluids.InitFluids;
import de.ellpeck.actuallyadditions.mod.items.InitItems; import de.ellpeck.actuallyadditions.mod.items.InitItems;
import de.ellpeck.actuallyadditions.mod.items.metalists.TheMiscItems; import de.ellpeck.actuallyadditions.mod.items.metalists.TheMiscItems;
import de.ellpeck.actuallyadditions.mod.misc.apiimpl.farmer.*; import de.ellpeck.actuallyadditions.mod.misc.apiimpl.farmer.CactusFarmerBehavior;
import de.ellpeck.actuallyadditions.mod.misc.apiimpl.farmer.DefaultFarmerBehavior;
import de.ellpeck.actuallyadditions.mod.misc.apiimpl.farmer.MelonPumpkinFarmerBehavior;
import de.ellpeck.actuallyadditions.mod.misc.apiimpl.farmer.NetherWartFarmerBehavior;
import de.ellpeck.actuallyadditions.mod.misc.apiimpl.farmer.ReedFarmerBehavior;
import de.ellpeck.actuallyadditions.mod.misc.apiimpl.farmer.exu.EnderlillyFarmerBehavior; import de.ellpeck.actuallyadditions.mod.misc.apiimpl.farmer.exu.EnderlillyFarmerBehavior;
import de.ellpeck.actuallyadditions.mod.misc.apiimpl.farmer.exu.RedOrchidFarmerBehavior; import de.ellpeck.actuallyadditions.mod.misc.apiimpl.farmer.exu.RedOrchidFarmerBehavior;
import de.ellpeck.actuallyadditions.mod.util.ModUtil; import de.ellpeck.actuallyadditions.mod.util.ModUtil;

View file

@ -14,7 +14,7 @@ import de.ellpeck.actuallyadditions.mod.items.InitItems;
import de.ellpeck.actuallyadditions.mod.items.ItemKnife; import de.ellpeck.actuallyadditions.mod.items.ItemKnife;
import de.ellpeck.actuallyadditions.mod.items.metalists.TheMiscItems; import de.ellpeck.actuallyadditions.mod.items.metalists.TheMiscItems;
import de.ellpeck.actuallyadditions.mod.util.StackUtil; import de.ellpeck.actuallyadditions.mod.util.StackUtil;
import de.ellpeck.actuallyadditions.mod.util.crafting.RecipeHandler; import de.ellpeck.actuallyadditions.mod.util.crafting.RecipeHelper;
import net.minecraft.inventory.InventoryCrafting; import net.minecraft.inventory.InventoryCrafting;
import net.minecraft.item.ItemFood; import net.minecraft.item.ItemFood;
import net.minecraft.item.ItemStack; import net.minecraft.item.ItemStack;
@ -29,7 +29,7 @@ import net.minecraftforge.registries.IForgeRegistryEntry;
public class RecipeBioMash extends IForgeRegistryEntry.Impl<IRecipe> implements IRecipe{ public class RecipeBioMash extends IForgeRegistryEntry.Impl<IRecipe> implements IRecipe{
public RecipeBioMash(ResourceLocation location){ public RecipeBioMash(ResourceLocation location){
RecipeHandler.addRecipe(location, this); RecipeHelper.addRecipe(location.getResourcePath(), this);
} }
@Override @Override
@ -86,8 +86,8 @@ public class RecipeBioMash extends IForgeRegistryEntry.Impl<IRecipe> implements
} }
@Override @Override
public boolean func_194133_a(int p_194133_1_, int p_194133_2_){ public boolean canFit(int width, int height){
return false; return width*height>5;
} }
@Override @Override

View file

@ -13,6 +13,7 @@ package de.ellpeck.actuallyadditions.mod.crafting;
import de.ellpeck.actuallyadditions.mod.util.ItemUtil; import de.ellpeck.actuallyadditions.mod.util.ItemUtil;
import de.ellpeck.actuallyadditions.mod.util.StackUtil; import de.ellpeck.actuallyadditions.mod.util.StackUtil;
import de.ellpeck.actuallyadditions.mod.util.crafting.RecipeHandler; import de.ellpeck.actuallyadditions.mod.util.crafting.RecipeHandler;
import de.ellpeck.actuallyadditions.mod.util.crafting.RecipeHelper;
import net.minecraft.inventory.InventoryCrafting; import net.minecraft.inventory.InventoryCrafting;
import net.minecraft.item.ItemStack; import net.minecraft.item.ItemStack;
import net.minecraft.util.ResourceLocation; import net.minecraft.util.ResourceLocation;
@ -26,7 +27,7 @@ public class RecipeKeepDataShaped extends ShapedOreRecipe{
super(group, result, recipe); super(group, result, recipe);
this.nbtCopyStack = nbtCopyStack; this.nbtCopyStack = nbtCopyStack;
RecipeHandler.addRecipe(group, this); RecipeHelper.addRecipe(group.getResourcePath(), this);
} }
@Override @Override

View file

@ -13,6 +13,7 @@ package de.ellpeck.actuallyadditions.mod.crafting;
import de.ellpeck.actuallyadditions.mod.util.ItemUtil; import de.ellpeck.actuallyadditions.mod.util.ItemUtil;
import de.ellpeck.actuallyadditions.mod.util.StackUtil; import de.ellpeck.actuallyadditions.mod.util.StackUtil;
import de.ellpeck.actuallyadditions.mod.util.crafting.RecipeHandler; import de.ellpeck.actuallyadditions.mod.util.crafting.RecipeHandler;
import de.ellpeck.actuallyadditions.mod.util.crafting.RecipeHelper;
import net.minecraft.inventory.InventoryCrafting; import net.minecraft.inventory.InventoryCrafting;
import net.minecraft.item.ItemStack; import net.minecraft.item.ItemStack;
import net.minecraft.util.ResourceLocation; import net.minecraft.util.ResourceLocation;
@ -26,7 +27,7 @@ public class RecipeKeepDataShapeless extends ShapelessOreRecipe{
super(group, result, recipe); super(group, result, recipe);
this.nbtCopyStack = nbtCopyStack; this.nbtCopyStack = nbtCopyStack;
RecipeHandler.addRecipe(group, this); RecipeHelper.addRecipe(group.getResourcePath(), this);
} }
@Override @Override

View file

@ -13,6 +13,7 @@ package de.ellpeck.actuallyadditions.mod.crafting;
import de.ellpeck.actuallyadditions.mod.items.ItemPotionRing; import de.ellpeck.actuallyadditions.mod.items.ItemPotionRing;
import de.ellpeck.actuallyadditions.mod.util.StackUtil; import de.ellpeck.actuallyadditions.mod.util.StackUtil;
import de.ellpeck.actuallyadditions.mod.util.crafting.RecipeHandler; import de.ellpeck.actuallyadditions.mod.util.crafting.RecipeHandler;
import de.ellpeck.actuallyadditions.mod.util.crafting.RecipeHelper;
import net.minecraft.init.Items; import net.minecraft.init.Items;
import net.minecraft.inventory.InventoryCrafting; import net.minecraft.inventory.InventoryCrafting;
import net.minecraft.item.ItemStack; import net.minecraft.item.ItemStack;
@ -26,7 +27,7 @@ import net.minecraftforge.registries.IForgeRegistryEntry;
public class RecipePotionRingCharging extends IForgeRegistryEntry.Impl<IRecipe> implements IRecipe{ public class RecipePotionRingCharging extends IForgeRegistryEntry.Impl<IRecipe> implements IRecipe{
public RecipePotionRingCharging(ResourceLocation location){ public RecipePotionRingCharging(ResourceLocation location){
RecipeHandler.addRecipe(location, this); RecipeHelper.addRecipe(location.getResourcePath(), this);
} }
@Override @Override
@ -84,8 +85,8 @@ public class RecipePotionRingCharging extends IForgeRegistryEntry.Impl<IRecipe>
} }
@Override @Override
public boolean func_194133_a(int p_194133_1_, int p_194133_2_){ public boolean canFit(int width, int height){
return false; return width*height>3;
} }
@Override @Override

View file

@ -10,6 +10,8 @@
package de.ellpeck.actuallyadditions.mod.crafting; package de.ellpeck.actuallyadditions.mod.crafting;
import java.util.ArrayList;
import de.ellpeck.actuallyadditions.mod.items.InitItems; import de.ellpeck.actuallyadditions.mod.items.InitItems;
import de.ellpeck.actuallyadditions.mod.items.metalists.TheCrystals; import de.ellpeck.actuallyadditions.mod.items.metalists.TheCrystals;
import de.ellpeck.actuallyadditions.mod.items.metalists.TheMiscItems; import de.ellpeck.actuallyadditions.mod.items.metalists.TheMiscItems;
@ -21,8 +23,6 @@ import net.minecraft.item.Item;
import net.minecraft.item.ItemStack; import net.minecraft.item.ItemStack;
import net.minecraft.item.crafting.IRecipe; import net.minecraft.item.crafting.IRecipe;
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<IRecipe>();

View file

@ -10,6 +10,11 @@
package de.ellpeck.actuallyadditions.mod.data; package de.ellpeck.actuallyadditions.mod.data;
import java.util.ArrayList;
import java.util.List;
import java.util.UUID;
import java.util.concurrent.ConcurrentHashMap;
import de.ellpeck.actuallyadditions.api.booklet.IBookletPage; import de.ellpeck.actuallyadditions.api.booklet.IBookletPage;
import de.ellpeck.actuallyadditions.mod.booklet.gui.GuiBooklet; import de.ellpeck.actuallyadditions.mod.booklet.gui.GuiBooklet;
import de.ellpeck.actuallyadditions.mod.booklet.misc.BookletUtils; import de.ellpeck.actuallyadditions.mod.booklet.misc.BookletUtils;
@ -20,11 +25,6 @@ import net.minecraft.nbt.NBTTagString;
import net.minecraftforge.fml.relauncher.Side; import net.minecraftforge.fml.relauncher.Side;
import net.minecraftforge.fml.relauncher.SideOnly; import net.minecraftforge.fml.relauncher.SideOnly;
import java.util.ArrayList;
import java.util.List;
import java.util.UUID;
import java.util.concurrent.ConcurrentHashMap;
public final class PlayerData{ public final class PlayerData{
public static PlayerSave getDataFromPlayer(EntityPlayer player){ public static PlayerSave getDataFromPlayer(EntityPlayer player){

View file

@ -94,7 +94,7 @@ public class ClientEvents{
} }
//Advanced Item Info //Advanced Item Info
if(event.getFlags().func_194127_a() && StackUtil.isValid(event.getItemStack())){ if(event.getFlags().isAdvanced() && StackUtil.isValid(event.getItemStack())){
if(ConfigBoolValues.CTRL_EXTRA_INFO.isEnabled()){ if(ConfigBoolValues.CTRL_EXTRA_INFO.isEnabled()){
if(GuiScreen.isCtrlKeyDown()){ if(GuiScreen.isCtrlKeyDown()){
event.getToolTip().add(TextFormatting.DARK_GRAY+""+TextFormatting.ITALIC+StringUtil.localize("tooltip."+ModUtil.MOD_ID+".extraInfo.desc")+":"); event.getToolTip().add(TextFormatting.DARK_GRAY+""+TextFormatting.ITALIC+StringUtil.localize("tooltip."+ModUtil.MOD_ID+".extraInfo.desc")+":");
@ -177,7 +177,7 @@ public class ClientEvents{
Minecraft minecraft = Minecraft.getMinecraft(); Minecraft minecraft = Minecraft.getMinecraft();
EntityPlayer player = minecraft.player; EntityPlayer player = minecraft.player;
RayTraceResult posHit = minecraft.objectMouseOver; RayTraceResult posHit = minecraft.objectMouseOver;
FontRenderer font = minecraft.fontRendererObj; FontRenderer font = minecraft.fontRenderer;
ItemStack stack = player.getHeldItemMainhand(); ItemStack stack = player.getHeldItemMainhand();
if(StackUtil.isValid(stack)){ if(StackUtil.isValid(stack)){

View file

@ -67,7 +67,7 @@ public class CommonEvents{
EntityPlayer player = event.getEntityPlayer(); EntityPlayer player = event.getEntityPlayer();
EntityItem item = event.getItem(); EntityItem item = event.getItem();
if(item != null && !item.isDead){ if(item != null && !item.isDead){
ItemStack stack = item.getEntityItem(); ItemStack stack = item.getItem();
if(StackUtil.isValid(stack)){ if(StackUtil.isValid(stack)){
for(int i = 0; i < player.inventory.getSizeInventory(); i++){ for(int i = 0; i < player.inventory.getSizeInventory(); i++){
if(i != player.inventory.currentItem){ if(i != player.inventory.currentItem){
@ -130,7 +130,7 @@ public class CommonEvents{
} }
} }
item.setEntityItemStack(stack); item.setItem(stack);
} }
} }
@ -149,7 +149,7 @@ public class CommonEvents{
@SubscribeEvent @SubscribeEvent
public void onEntityDropEvent(LivingDropsEvent event){ public void onEntityDropEvent(LivingDropsEvent event){
if(event.getEntityLiving().world != null && !event.getEntityLiving().world.isRemote && event.getSource().getEntity() instanceof EntityPlayer){ if(event.getEntityLiving().world != null && !event.getEntityLiving().world.isRemote && event.getSource().getTrueSource() instanceof EntityPlayer){
//Drop Cobwebs from Spiders //Drop Cobwebs from Spiders
if(ConfigBoolValues.DO_SPIDER_DROPS.isEnabled() && event.getEntityLiving() instanceof EntitySpider){ if(ConfigBoolValues.DO_SPIDER_DROPS.isEnabled() && event.getEntityLiving() instanceof EntitySpider){
if(event.getEntityLiving().world.rand.nextInt(20) <= event.getLootingLevel()*2){ if(event.getEntityLiving().world.rand.nextInt(20) <= event.getLootingLevel()*2){
@ -198,7 +198,7 @@ public class CommonEvents{
@SubscribeEvent @SubscribeEvent
public void onPickupEvent(EntityItemPickupEvent event){ public void onPickupEvent(EntityItemPickupEvent event){
//checkAchievements(event.getItem().getEntityItem(), event.getEntityPlayer(), InitAchievements.Type.PICK_UP); //checkAchievements(event.getItem().getItem(), event.getEntityPlayer(), InitAchievements.Type.PICK_UP);
} }
@SubscribeEvent @SubscribeEvent

View file

@ -10,6 +10,8 @@
package de.ellpeck.actuallyadditions.mod.fluids; package de.ellpeck.actuallyadditions.mod.fluids;
import java.util.Locale;
import de.ellpeck.actuallyadditions.mod.blocks.base.BlockFluidFlowing; import de.ellpeck.actuallyadditions.mod.blocks.base.BlockFluidFlowing;
import net.minecraft.block.Block; import net.minecraft.block.Block;
import net.minecraft.block.material.Material; import net.minecraft.block.material.Material;
@ -17,8 +19,6 @@ import net.minecraft.item.EnumRarity;
import net.minecraftforge.fluids.Fluid; import net.minecraftforge.fluids.Fluid;
import net.minecraftforge.fluids.FluidRegistry; import net.minecraftforge.fluids.FluidRegistry;
import java.util.Locale;
public final class InitFluids{ public final class InitFluids{
public static Fluid fluidCanolaOil; public static Fluid fluidCanolaOil;

View file

@ -10,15 +10,15 @@
package de.ellpeck.actuallyadditions.mod.gen.village.component.handler; package de.ellpeck.actuallyadditions.mod.gen.village.component.handler;
import java.util.List;
import java.util.Random;
import de.ellpeck.actuallyadditions.mod.gen.village.component.VillageComponentJamHouse; import de.ellpeck.actuallyadditions.mod.gen.village.component.VillageComponentJamHouse;
import net.minecraft.util.EnumFacing; import net.minecraft.util.EnumFacing;
import net.minecraft.world.gen.structure.StructureComponent; import net.minecraft.world.gen.structure.StructureComponent;
import net.minecraft.world.gen.structure.StructureVillagePieces; import net.minecraft.world.gen.structure.StructureVillagePieces;
import net.minecraftforge.fml.common.registry.VillagerRegistry; import net.minecraftforge.fml.common.registry.VillagerRegistry;
import java.util.List;
import java.util.Random;
public class VillageJamHouseHandler implements VillagerRegistry.IVillageCreationHandler{ public class VillageJamHouseHandler implements VillagerRegistry.IVillageCreationHandler{
@Override @Override

View file

@ -105,12 +105,12 @@ public class ContainerBag extends Container implements IButtonReactor{
if(this.filter.needsUpdateSend() || this.autoInsert != this.oldAutoInsert){ if(this.filter.needsUpdateSend() || this.autoInsert != this.oldAutoInsert){
for(IContainerListener listener : this.listeners){ for(IContainerListener listener : this.listeners){
listener.sendProgressBarUpdate(this, 0, this.filter.isWhitelist ? 1 : 0); listener.sendWindowProperty(this, 0, this.filter.isWhitelist ? 1 : 0);
listener.sendProgressBarUpdate(this, 1, this.filter.respectMeta ? 1 : 0); listener.sendWindowProperty(this, 1, this.filter.respectMeta ? 1 : 0);
listener.sendProgressBarUpdate(this, 2, this.filter.respectNBT ? 1 : 0); listener.sendWindowProperty(this, 2, this.filter.respectNBT ? 1 : 0);
listener.sendProgressBarUpdate(this, 3, this.filter.respectOredict); listener.sendWindowProperty(this, 3, this.filter.respectOredict);
listener.sendProgressBarUpdate(this, 4, this.autoInsert ? 1 : 0); listener.sendWindowProperty(this, 4, this.autoInsert ? 1 : 0);
listener.sendProgressBarUpdate(this, 5, this.filter.respectMod ? 1 : 0); listener.sendWindowProperty(this, 5, this.filter.respectMod ? 1 : 0);
} }
this.filter.updateLasts(); this.filter.updateLasts();
this.oldAutoInsert = this.autoInsert; this.oldAutoInsert = this.autoInsert;

View file

@ -119,7 +119,7 @@ public class ContainerCrafter extends Container{
@Override @Override
public void onCraftMatrixChanged(IInventory inv){ public void onCraftMatrixChanged(IInventory inv){
this.craftResult.setInventorySlotContents(0, CraftingManager.findMatchingRecipe(this.craftMatrix, this.world)); this.craftResult.setInventorySlotContents(0, CraftingManager.findMatchingRecipe(this.craftMatrix, this.world).getRecipeOutput());
} }
@Override @Override

View file

@ -71,7 +71,7 @@ public class GuiFireworkBox extends GuiContainer implements GuiResponder{
@Override @Override
public void drawGuiContainerForegroundLayer(int x, int y){ public void drawGuiContainerForegroundLayer(int x, int y){
AssetUtil.displayNameString(this.fontRendererObj, this.xSize, -10, this.tile); AssetUtil.displayNameString(this.fontRenderer, this.xSize, -10, this.tile);
} }
@Override @Override

View file

@ -74,7 +74,7 @@ public class EnergyDisplay extends Gui{
} }
if(this.drawTextNextTo){ if(this.drawTextNextTo){
this.drawString(mc.fontRendererObj, this.getOverlayText(), barX+25, barY+78, StringUtil.DECIMAL_COLOR_WHITE); this.drawString(mc.fontRenderer, this.getOverlayText(), barX+25, barY+78, StringUtil.DECIMAL_COLOR_WHITE);
} }
} }
@ -84,7 +84,7 @@ public class EnergyDisplay extends Gui{
List<String> text = new ArrayList<String>(); List<String> text = new ArrayList<String>();
text.add(this.getOverlayText()); text.add(this.getOverlayText());
GuiUtils.drawHoveringText(text, mouseX, mouseY, mc.displayWidth, mc.displayHeight, -1, mc.fontRendererObj); GuiUtils.drawHoveringText(text, mouseX, mouseY, mc.displayWidth, mc.displayHeight, -1, mc.fontRenderer);
} }
} }

View file

@ -72,22 +72,22 @@ public class FilterSettingsGui extends Gui{
if(this.whitelistButton.isMouseOver()){ if(this.whitelistButton.isMouseOver()){
List<String> list = new ArrayList<String>(); List<String> list = new ArrayList<String>();
list.add(TextFormatting.BOLD+(this.theSettings.isWhitelist ? StringUtil.localize("info."+ModUtil.MOD_ID+".gui.whitelist") : StringUtil.localize("info."+ModUtil.MOD_ID+".gui.blacklist"))); list.add(TextFormatting.BOLD+(this.theSettings.isWhitelist ? StringUtil.localize("info."+ModUtil.MOD_ID+".gui.whitelist") : StringUtil.localize("info."+ModUtil.MOD_ID+".gui.blacklist")));
list.addAll(mc.fontRendererObj.listFormattedStringToWidth(StringUtil.localizeFormatted("info."+ModUtil.MOD_ID+".gui.whitelistInfo"), 200)); list.addAll(mc.fontRenderer.listFormattedStringToWidth(StringUtil.localizeFormatted("info."+ModUtil.MOD_ID+".gui.whitelistInfo"), 200));
GuiUtils.drawHoveringText(list, mouseX, mouseY, mc.displayWidth, mc.displayHeight, -1, mc.fontRendererObj); GuiUtils.drawHoveringText(list, mouseX, mouseY, mc.displayWidth, mc.displayHeight, -1, mc.fontRenderer);
} }
else if(this.metaButton.isMouseOver()){ else if(this.metaButton.isMouseOver()){
GuiUtils.drawHoveringText(Collections.singletonList(TextFormatting.BOLD+(this.theSettings.respectMeta ? StringUtil.localize("info."+ModUtil.MOD_ID+".gui.respectMeta") : StringUtil.localize("info."+ModUtil.MOD_ID+".gui.ignoreMeta"))), mouseX, mouseY, mc.displayWidth, mc.displayHeight, -1, mc.fontRendererObj); GuiUtils.drawHoveringText(Collections.singletonList(TextFormatting.BOLD+(this.theSettings.respectMeta ? StringUtil.localize("info."+ModUtil.MOD_ID+".gui.respectMeta") : StringUtil.localize("info."+ModUtil.MOD_ID+".gui.ignoreMeta"))), mouseX, mouseY, mc.displayWidth, mc.displayHeight, -1, mc.fontRenderer);
} }
else if(this.nbtButton.isMouseOver()){ else if(this.nbtButton.isMouseOver()){
GuiUtils.drawHoveringText(Collections.singletonList(TextFormatting.BOLD+(this.theSettings.respectNBT ? StringUtil.localize("info."+ModUtil.MOD_ID+".gui.respectNBT") : StringUtil.localize("info."+ModUtil.MOD_ID+".gui.ignoreNBT"))), mouseX, mouseY, mc.displayWidth, mc.displayHeight, -1, mc.fontRendererObj); GuiUtils.drawHoveringText(Collections.singletonList(TextFormatting.BOLD+(this.theSettings.respectNBT ? StringUtil.localize("info."+ModUtil.MOD_ID+".gui.respectNBT") : StringUtil.localize("info."+ModUtil.MOD_ID+".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<String>();
list.add(TextFormatting.BOLD+(this.theSettings.respectMod ? StringUtil.localize("info."+ModUtil.MOD_ID+".gui.respectMod") : StringUtil.localize("info."+ModUtil.MOD_ID+".gui.ignoreMod"))); list.add(TextFormatting.BOLD+(this.theSettings.respectMod ? StringUtil.localize("info."+ModUtil.MOD_ID+".gui.respectMod") : StringUtil.localize("info."+ModUtil.MOD_ID+".gui.ignoreMod")));
list.addAll(mc.fontRendererObj.listFormattedStringToWidth(StringUtil.localize("info."+ModUtil.MOD_ID+".gui.respectModInfo"), 200)); list.addAll(mc.fontRenderer.listFormattedStringToWidth(StringUtil.localize("info."+ModUtil.MOD_ID+".gui.respectModInfo"), 200));
GuiUtils.drawHoveringText(list, mouseX, mouseY, mc.displayWidth, mc.displayHeight, -1, mc.fontRendererObj); 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<String>();
@ -102,9 +102,9 @@ public class FilterSettingsGui extends Gui{
} }
if(type != null){ if(type != null){
list.addAll(mc.fontRendererObj.listFormattedStringToWidth(StringUtil.localize("info."+ModUtil.MOD_ID+".gui.respectOredictInfo."+type), 200)); list.addAll(mc.fontRenderer.listFormattedStringToWidth(StringUtil.localize("info."+ModUtil.MOD_ID+".gui.respectOredictInfo."+type), 200));
} }
GuiUtils.drawHoveringText(list, mouseX, mouseY, mc.displayWidth, mc.displayHeight, -1, mc.fontRendererObj); GuiUtils.drawHoveringText(list, mouseX, mouseY, mc.displayWidth, mc.displayHeight, -1, mc.fontRenderer);
} }
} }
} }

View file

@ -97,14 +97,14 @@ public class FluidDisplay extends Gui{
} }
if(this.drawTextNextTo){ if(this.drawTextNextTo){
this.drawString(mc.fontRendererObj, this.getOverlayText(), barX+25, barY+78, StringUtil.DECIMAL_COLOR_WHITE); this.drawString(mc.fontRenderer, this.getOverlayText(), barX+25, barY+78, StringUtil.DECIMAL_COLOR_WHITE);
} }
} }
public void drawOverlay(int mouseX, int mouseY){ public void drawOverlay(int mouseX, int mouseY){
if(mouseX >= this.x && mouseY >= this.y && mouseX < this.x+(this.outline ? 26 : 18) && mouseY < this.y+(this.outline ? 93 : 85)){ if(mouseX >= this.x && mouseY >= this.y && mouseX < this.x+(this.outline ? 26 : 18) && mouseY < this.y+(this.outline ? 93 : 85)){
Minecraft mc = Minecraft.getMinecraft(); Minecraft mc = Minecraft.getMinecraft();
GuiUtils.drawHoveringText(Collections.singletonList(this.getOverlayText()), mouseX, mouseY, mc.displayWidth, mc.displayHeight, -1, mc.fontRendererObj); GuiUtils.drawHoveringText(Collections.singletonList(this.getOverlayText()), mouseX, mouseY, mc.displayWidth, mc.displayHeight, -1, mc.fontRenderer);
} }
} }

View file

@ -82,7 +82,7 @@ public class GuiBag extends GuiWtfMojang{
@Override @Override
public void drawGuiContainerForegroundLayer(int x, int y){ public void drawGuiContainerForegroundLayer(int x, int y){
AssetUtil.displayNameString(this.fontRendererObj, this.xSize, -10, StringUtil.localize("container."+ModUtil.MOD_ID+"."+(this.isVoid ? "voidBag" : "bag")+".name")); AssetUtil.displayNameString(this.fontRenderer, this.xSize, -10, StringUtil.localize("container."+ModUtil.MOD_ID+"."+(this.isVoid ? "voidBag" : "bag")+".name"));
} }
@Override @Override
@ -104,8 +104,8 @@ public class GuiBag extends GuiWtfMojang{
if(this.buttonAutoInsert.isMouseOver()){ if(this.buttonAutoInsert.isMouseOver()){
List<String> text = new ArrayList<String>(); List<String> text = new ArrayList<String>();
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.fontRendererObj.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.fontRendererObj.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));
this.drawHoveringText(text, mouseX, mouseY); this.drawHoveringText(text, mouseX, mouseY);
} }
} }

View file

@ -45,7 +45,7 @@ public class GuiBioReactor extends GuiWtfMojang{
@Override @Override
public void drawGuiContainerForegroundLayer(int x, int y){ public void drawGuiContainerForegroundLayer(int x, int y){
AssetUtil.displayNameString(this.fontRendererObj, this.xSize, -10, this.tile); AssetUtil.displayNameString(this.fontRenderer, this.xSize, -10, this.tile);
} }
@Override @Override
@ -64,7 +64,7 @@ public class GuiBioReactor extends GuiWtfMojang{
} }
if(this.tile.producePerTick > 0){ if(this.tile.producePerTick > 0){
this.drawCenteredString(this.fontRendererObj, this.tile.producePerTick+" CF/t", this.guiLeft+87, this.guiTop+86, 0xFFFFFF); this.drawCenteredString(this.fontRenderer, this.tile.producePerTick+" CF/t", this.guiLeft+87, this.guiTop+86, 0xFFFFFF);
} }
this.energy.draw(); this.energy.draw();

View file

@ -35,7 +35,7 @@ public class GuiBreaker extends GuiWtfMojang{
@Override @Override
public void drawGuiContainerForegroundLayer(int x, int y){ public void drawGuiContainerForegroundLayer(int x, int y){
AssetUtil.displayNameString(this.fontRendererObj, this.xSize, -10, this.breaker); AssetUtil.displayNameString(this.fontRenderer, this.xSize, -10, this.breaker);
} }
@Override @Override

View file

@ -52,7 +52,7 @@ public class GuiCanolaPress extends GuiWtfMojang{
@Override @Override
public void drawGuiContainerForegroundLayer(int x, int y){ public void drawGuiContainerForegroundLayer(int x, int y){
AssetUtil.displayNameString(this.fontRendererObj, this.xSize, -10, this.press); AssetUtil.displayNameString(this.fontRenderer, this.xSize, -10, this.press);
} }
@Override @Override

View file

@ -48,7 +48,7 @@ public class GuiCoalGenerator extends GuiWtfMojang{
@Override @Override
public void drawGuiContainerForegroundLayer(int x, int y){ public void drawGuiContainerForegroundLayer(int x, int y){
AssetUtil.displayNameString(this.fontRendererObj, this.xSize, -10, this.generator); AssetUtil.displayNameString(this.fontRenderer, this.xSize, -10, this.generator);
} }
@Override @Override

View file

@ -68,7 +68,7 @@ public class GuiCoffeeMachine extends GuiWtfMojang{
@Override @Override
public void drawGuiContainerForegroundLayer(int x, int y){ public void drawGuiContainerForegroundLayer(int x, int y){
AssetUtil.displayNameString(this.fontRendererObj, this.xSize, -10, this.machine); AssetUtil.displayNameString(this.fontRenderer, this.xSize, -10, this.machine);
} }
@Override @Override

View file

@ -34,7 +34,7 @@ public class GuiCrafter extends GuiWtfMojang{
@Override @Override
public void drawGuiContainerForegroundLayer(int x, int y){ public void drawGuiContainerForegroundLayer(int x, int y){
AssetUtil.displayNameString(this.fontRendererObj, this.xSize, -10, StringUtil.localize("container."+ModUtil.MOD_ID+".crafting.name")); AssetUtil.displayNameString(this.fontRenderer, this.xSize, -10, StringUtil.localize("container."+ModUtil.MOD_ID+".crafting.name"));
} }
@Override @Override

View file

@ -49,7 +49,7 @@ public class GuiDirectionalBreaker extends GuiWtfMojang{
@Override @Override
public void drawGuiContainerForegroundLayer(int x, int y){ public void drawGuiContainerForegroundLayer(int x, int y){
AssetUtil.displayNameString(this.fontRendererObj, this.xSize, -10, this.breaker); AssetUtil.displayNameString(this.fontRenderer, this.xSize, -10, this.breaker);
} }
@Override @Override

View file

@ -33,7 +33,7 @@ public class GuiDrill extends GuiWtfMojang{
@Override @Override
public void drawGuiContainerForegroundLayer(int x, int y){ public void drawGuiContainerForegroundLayer(int x, int y){
AssetUtil.displayNameString(this.fontRendererObj, this.xSize, -10, StringUtil.localize("container."+ModUtil.MOD_ID+".drill.name")); AssetUtil.displayNameString(this.fontRenderer, this.xSize, -10, StringUtil.localize("container."+ModUtil.MOD_ID+".drill.name"));
} }
@Override @Override

View file

@ -35,7 +35,7 @@ public class GuiDropper extends GuiWtfMojang{
@Override @Override
public void drawGuiContainerForegroundLayer(int x, int y){ public void drawGuiContainerForegroundLayer(int x, int y){
AssetUtil.displayNameString(this.fontRendererObj, this.xSize, -10, this.dropper); AssetUtil.displayNameString(this.fontRenderer, this.xSize, -10, this.dropper);
} }
@Override @Override

View file

@ -48,7 +48,7 @@ public class GuiEnergizer extends GuiWtfMojang{
@Override @Override
public void drawGuiContainerForegroundLayer(int x, int y){ public void drawGuiContainerForegroundLayer(int x, int y){
AssetUtil.displayNameString(this.fontRendererObj, this.xSize, -10, this.energizer); AssetUtil.displayNameString(this.fontRenderer, this.xSize, -10, this.energizer);
} }
@Override @Override

View file

@ -48,7 +48,7 @@ public class GuiEnervator extends GuiWtfMojang{
@Override @Override
public void drawGuiContainerForegroundLayer(int x, int y){ public void drawGuiContainerForegroundLayer(int x, int y){
AssetUtil.displayNameString(this.fontRendererObj, this.xSize, -10, this.enervator); AssetUtil.displayNameString(this.fontRenderer, this.xSize, -10, this.enervator);
} }
@Override @Override

View file

@ -44,7 +44,7 @@ public class GuiFarmer extends GuiWtfMojang{
@Override @Override
public void drawGuiContainerForegroundLayer(int x, int y){ public void drawGuiContainerForegroundLayer(int x, int y){
AssetUtil.displayNameString(this.fontRendererObj, this.xSize, -10, this.farmer); AssetUtil.displayNameString(this.fontRenderer, this.xSize, -10, this.farmer);
} }
@Override @Override

View file

@ -48,7 +48,7 @@ public class GuiFeeder extends GuiWtfMojang{
@Override @Override
public void drawGuiContainerForegroundLayer(int x, int y){ public void drawGuiContainerForegroundLayer(int x, int y){
AssetUtil.displayNameString(this.fontRendererObj, this.xSize, -10, this.tileFeeder); AssetUtil.displayNameString(this.fontRenderer, this.xSize, -10, this.tileFeeder);
} }
@Override @Override

View file

@ -51,7 +51,7 @@ public class GuiFermentingBarrel extends GuiWtfMojang{
@Override @Override
public void drawGuiContainerForegroundLayer(int x, int y){ public void drawGuiContainerForegroundLayer(int x, int y){
AssetUtil.displayNameString(this.fontRendererObj, this.xSize, -10, this.press); AssetUtil.displayNameString(this.fontRenderer, this.xSize, -10, this.press);
} }
@Override @Override

View file

@ -33,7 +33,7 @@ public class GuiFilter extends GuiWtfMojang{
@Override @Override
public void drawGuiContainerForegroundLayer(int x, int y){ public void drawGuiContainerForegroundLayer(int x, int y){
AssetUtil.displayNameString(this.fontRendererObj, this.xSize, -10, StringUtil.localize("container."+ModUtil.MOD_ID+".filter.name")); AssetUtil.displayNameString(this.fontRenderer, this.xSize, -10, StringUtil.localize("container."+ModUtil.MOD_ID+".filter.name"));
} }
@Override @Override

View file

@ -49,7 +49,7 @@ public class GuiFluidCollector extends GuiWtfMojang{
@Override @Override
public void drawGuiContainerForegroundLayer(int x, int y){ public void drawGuiContainerForegroundLayer(int x, int y){
AssetUtil.displayNameString(this.fontRendererObj, this.xSize, -10, this.collector); AssetUtil.displayNameString(this.fontRenderer, this.xSize, -10, this.collector);
} }
@Override @Override

View file

@ -79,7 +79,7 @@ public class GuiFurnaceDouble extends GuiWtfMojang{
@Override @Override
public void drawGuiContainerForegroundLayer(int x, int y){ public void drawGuiContainerForegroundLayer(int x, int y){
AssetUtil.displayNameString(this.fontRendererObj, this.xSize, -10, this.tileFurnace); AssetUtil.displayNameString(this.fontRenderer, this.xSize, -10, this.tileFurnace);
} }
@Override @Override

View file

@ -10,6 +10,8 @@
package de.ellpeck.actuallyadditions.mod.inventory.gui; package de.ellpeck.actuallyadditions.mod.inventory.gui;
import java.io.IOException;
import de.ellpeck.actuallyadditions.mod.inventory.ContainerGiantChest; import de.ellpeck.actuallyadditions.mod.inventory.ContainerGiantChest;
import de.ellpeck.actuallyadditions.mod.network.PacketHandlerHelper; import de.ellpeck.actuallyadditions.mod.network.PacketHandlerHelper;
import de.ellpeck.actuallyadditions.mod.tile.TileEntityBase; import de.ellpeck.actuallyadditions.mod.tile.TileEntityBase;
@ -24,8 +26,6 @@ import net.minecraft.util.ResourceLocation;
import net.minecraftforge.fml.relauncher.Side; import net.minecraftforge.fml.relauncher.Side;
import net.minecraftforge.fml.relauncher.SideOnly; import net.minecraftforge.fml.relauncher.SideOnly;
import java.io.IOException;
@SideOnly(Side.CLIENT) @SideOnly(Side.CLIENT)
public class GuiGiantChest extends GuiWtfMojang{ public class GuiGiantChest extends GuiWtfMojang{
@ -65,7 +65,7 @@ public class GuiGiantChest extends GuiWtfMojang{
@Override @Override
public void drawGuiContainerForegroundLayer(int x, int y){ public void drawGuiContainerForegroundLayer(int x, int y){
AssetUtil.displayNameString(this.fontRendererObj, this.xSize, -10, this.chest); AssetUtil.displayNameString(this.fontRenderer, this.xSize, -10, this.chest);
} }
@Override @Override

View file

@ -91,7 +91,7 @@ public class GuiGrinder extends GuiWtfMojang{
@Override @Override
public void drawGuiContainerForegroundLayer(int x, int y){ public void drawGuiContainerForegroundLayer(int x, int y){
AssetUtil.displayNameString(this.fontRendererObj, this.xSize, -10, this.tileGrinder); AssetUtil.displayNameString(this.fontRenderer, this.xSize, -10, this.tileGrinder);
} }
@Override @Override

View file

@ -71,17 +71,17 @@ public class GuiInputter extends GuiContainer{
this.rightFilter = new FilterSettingsGui(this.tileInputter.rightFilter, this.guiLeft+157, this.guiTop+6, this.buttonList); this.rightFilter = new FilterSettingsGui(this.tileInputter.rightFilter, this.guiLeft+157, this.guiTop+6, this.buttonList);
} }
this.fieldPullStart = new GuiTextField(3000, this.fontRendererObj, this.guiLeft+6, this.guiTop+80+(this.isAdvanced ? OFFSET_ADVANCED : 0), 34, 8); this.fieldPullStart = new GuiTextField(3000, this.fontRenderer, this.guiLeft+6, this.guiTop+80+(this.isAdvanced ? OFFSET_ADVANCED : 0), 34, 8);
this.fieldPullStart.setMaxStringLength(5); this.fieldPullStart.setMaxStringLength(5);
this.fieldPullStart.setEnableBackgroundDrawing(false); this.fieldPullStart.setEnableBackgroundDrawing(false);
this.fieldPullEnd = new GuiTextField(3001, this.fontRendererObj, this.guiLeft+50, this.guiTop+80+(this.isAdvanced ? OFFSET_ADVANCED : 0), 34, 8); this.fieldPullEnd = new GuiTextField(3001, this.fontRenderer, this.guiLeft+50, this.guiTop+80+(this.isAdvanced ? OFFSET_ADVANCED : 0), 34, 8);
this.fieldPullEnd.setMaxStringLength(5); this.fieldPullEnd.setMaxStringLength(5);
this.fieldPullEnd.setEnableBackgroundDrawing(false); this.fieldPullEnd.setEnableBackgroundDrawing(false);
this.fieldPutStart = new GuiTextField(3002, this.fontRendererObj, this.guiLeft+91, this.guiTop+80+(this.isAdvanced ? OFFSET_ADVANCED : 0), 34, 8); this.fieldPutStart = new GuiTextField(3002, this.fontRenderer, this.guiLeft+91, this.guiTop+80+(this.isAdvanced ? OFFSET_ADVANCED : 0), 34, 8);
this.fieldPutStart.setMaxStringLength(5); this.fieldPutStart.setMaxStringLength(5);
this.fieldPutStart.setEnableBackgroundDrawing(false); this.fieldPutStart.setEnableBackgroundDrawing(false);
this.fieldPutEnd = new GuiTextField(3004, this.fontRendererObj, this.guiLeft+135, this.guiTop+80+(this.isAdvanced ? OFFSET_ADVANCED : 0), 34, 8); this.fieldPutEnd = new GuiTextField(3004, this.fontRenderer, this.guiLeft+135, this.guiTop+80+(this.isAdvanced ? OFFSET_ADVANCED : 0), 34, 8);
this.fieldPutEnd.setMaxStringLength(5); this.fieldPutEnd.setMaxStringLength(5);
this.fieldPutEnd.setEnableBackgroundDrawing(false); this.fieldPutEnd.setEnableBackgroundDrawing(false);
@ -106,16 +106,16 @@ public class GuiInputter extends GuiContainer{
int newTopOffset = this.guiTop+(this.isAdvanced ? OFFSET_ADVANCED : 0); int newTopOffset = this.guiTop+(this.isAdvanced ? OFFSET_ADVANCED : 0);
//Info Mode on! //Info Mode on!
if(x >= this.guiLeft+4 && y >= newTopOffset+65 && x <= this.guiLeft+4+38 && y <= newTopOffset+65+12){ if(x >= this.guiLeft+4 && y >= newTopOffset+65 && x <= this.guiLeft+4+38 && y <= newTopOffset+65+12){
this.drawHoveringText(this.fontRendererObj.listFormattedStringToWidth(StringUtil.localizeFormatted("info."+ModUtil.MOD_ID+".inputter.info.1").replace("<p>", StringUtil.localize("info."+ModUtil.MOD_ID+".gui.pull")), 200), x, y); this.drawHoveringText(this.fontRenderer.listFormattedStringToWidth(StringUtil.localizeFormatted("info."+ModUtil.MOD_ID+".inputter.info.1").replace("<p>", StringUtil.localize("info."+ModUtil.MOD_ID+".gui.pull")), 200), x, y);
} }
if(x >= this.guiLeft+89 && y >= newTopOffset+65 && x <= this.guiLeft+89+38 && y <= newTopOffset+65+12){ if(x >= this.guiLeft+89 && y >= newTopOffset+65 && x <= this.guiLeft+89+38 && y <= newTopOffset+65+12){
this.drawHoveringText(this.fontRendererObj.listFormattedStringToWidth(StringUtil.localizeFormatted("info."+ModUtil.MOD_ID+".inputter.info.1").replace("<p>", StringUtil.localize("info."+ModUtil.MOD_ID+".gui.put")), 200), x, y); this.drawHoveringText(this.fontRenderer.listFormattedStringToWidth(StringUtil.localizeFormatted("info."+ModUtil.MOD_ID+".inputter.info.1").replace("<p>", StringUtil.localize("info."+ModUtil.MOD_ID+".gui.put")), 200), x, y);
} }
if(x >= this.guiLeft+48 && y >= newTopOffset+65 && x <= this.guiLeft+48+38 && y <= newTopOffset+65+12){ if(x >= this.guiLeft+48 && y >= newTopOffset+65 && x <= this.guiLeft+48+38 && y <= newTopOffset+65+12){
this.drawHoveringText(this.fontRendererObj.listFormattedStringToWidth(StringUtil.localizeFormatted("info."+ModUtil.MOD_ID+".inputter.info.2").replace("<p>", StringUtil.localize("info."+ModUtil.MOD_ID+".gui.pull")), 200), x, y); this.drawHoveringText(this.fontRenderer.listFormattedStringToWidth(StringUtil.localizeFormatted("info."+ModUtil.MOD_ID+".inputter.info.2").replace("<p>", StringUtil.localize("info."+ModUtil.MOD_ID+".gui.pull")), 200), x, y);
} }
if(x >= this.guiLeft+133 && y >= newTopOffset+65 && x <= this.guiLeft+133+38 && y <= newTopOffset+65+12){ if(x >= this.guiLeft+133 && y >= newTopOffset+65 && x <= this.guiLeft+133+38 && y <= newTopOffset+65+12){
this.drawHoveringText(this.fontRendererObj.listFormattedStringToWidth(StringUtil.localizeFormatted("info."+ModUtil.MOD_ID+".inputter.info.2").replace("<p>", StringUtil.localize("info."+ModUtil.MOD_ID+".gui.put")), 200), x, y); this.drawHoveringText(this.fontRenderer.listFormattedStringToWidth(StringUtil.localizeFormatted("info."+ModUtil.MOD_ID+".inputter.info.2").replace("<p>", StringUtil.localize("info."+ModUtil.MOD_ID+".gui.put")), 200), x, y);
} }
if(this.isAdvanced){ if(this.isAdvanced){
@ -126,7 +126,7 @@ public class GuiInputter extends GuiContainer{
@Override @Override
public void drawGuiContainerForegroundLayer(int x, int y){ public void drawGuiContainerForegroundLayer(int x, int y){
AssetUtil.displayNameString(this.fontRendererObj, this.xSize, -10, this.tileInputter); AssetUtil.displayNameString(this.fontRenderer, this.xSize, -10, this.tileInputter);
} }
@Override @Override
@ -139,16 +139,16 @@ public class GuiInputter extends GuiContainer{
this.mc.getTextureManager().bindTexture(this.isAdvanced ? RES_LOC_ADVANCED : RES_LOC); this.mc.getTextureManager().bindTexture(this.isAdvanced ? RES_LOC_ADVANCED : RES_LOC);
this.drawTexturedModalRect(this.guiLeft, this.guiTop, 0, 0, 176, 97+(this.isAdvanced ? OFFSET_ADVANCED : 0)); this.drawTexturedModalRect(this.guiLeft, this.guiTop, 0, 0, 176, 97+(this.isAdvanced ? OFFSET_ADVANCED : 0));
this.fontRendererObj.drawString(StringUtil.localize("info."+ModUtil.MOD_ID+".gui.inbound"), this.guiLeft+23+3, this.guiTop+32+(this.isAdvanced ? OFFSET_ADVANCED : 0), StringUtil.DECIMAL_COLOR_GRAY_TEXT); this.fontRenderer.drawString(StringUtil.localize("info."+ModUtil.MOD_ID+".gui.inbound"), this.guiLeft+23+3, this.guiTop+32+(this.isAdvanced ? OFFSET_ADVANCED : 0), StringUtil.DECIMAL_COLOR_GRAY_TEXT);
this.fontRendererObj.drawString(StringUtil.localize("info."+ModUtil.MOD_ID+".gui.outbound"), this.guiLeft+104+3, this.guiTop+32+(this.isAdvanced ? OFFSET_ADVANCED : 0), StringUtil.DECIMAL_COLOR_GRAY_TEXT); this.fontRenderer.drawString(StringUtil.localize("info."+ModUtil.MOD_ID+".gui.outbound"), this.guiLeft+104+3, this.guiTop+32+(this.isAdvanced ? OFFSET_ADVANCED : 0), StringUtil.DECIMAL_COLOR_GRAY_TEXT);
this.fontRendererObj.drawString(SIDES[this.tileInputter.sideToPull+1], this.guiLeft+24+1, this.guiTop+45+3+(this.isAdvanced ? OFFSET_ADVANCED : 0), StringUtil.DECIMAL_COLOR_GRAY_TEXT); this.fontRenderer.drawString(SIDES[this.tileInputter.sideToPull+1], this.guiLeft+24+1, this.guiTop+45+3+(this.isAdvanced ? OFFSET_ADVANCED : 0), StringUtil.DECIMAL_COLOR_GRAY_TEXT);
this.fontRendererObj.drawString(SIDES[this.tileInputter.sideToPut+1], this.guiLeft+109+1, this.guiTop+45+3+(this.isAdvanced ? OFFSET_ADVANCED : 0), StringUtil.DECIMAL_COLOR_GRAY_TEXT); this.fontRenderer.drawString(SIDES[this.tileInputter.sideToPut+1], this.guiLeft+109+1, this.guiTop+45+3+(this.isAdvanced ? OFFSET_ADVANCED : 0), StringUtil.DECIMAL_COLOR_GRAY_TEXT);
this.fontRendererObj.drawString(Integer.toString(this.tileInputter.slotToPutStart), this.guiLeft+92, this.guiTop+67+(this.isAdvanced ? OFFSET_ADVANCED : 0), StringUtil.DECIMAL_COLOR_WHITE); this.fontRenderer.drawString(Integer.toString(this.tileInputter.slotToPutStart), this.guiLeft+92, this.guiTop+67+(this.isAdvanced ? OFFSET_ADVANCED : 0), StringUtil.DECIMAL_COLOR_WHITE);
this.fontRendererObj.drawString(Integer.toString(this.tileInputter.slotToPutEnd), this.guiLeft+136, this.guiTop+67+(this.isAdvanced ? OFFSET_ADVANCED : 0), StringUtil.DECIMAL_COLOR_WHITE); this.fontRenderer.drawString(Integer.toString(this.tileInputter.slotToPutEnd), this.guiLeft+136, this.guiTop+67+(this.isAdvanced ? OFFSET_ADVANCED : 0), StringUtil.DECIMAL_COLOR_WHITE);
this.fontRendererObj.drawString(Integer.toString(this.tileInputter.slotToPullStart), this.guiLeft+7, this.guiTop+67+(this.isAdvanced ? OFFSET_ADVANCED : 0), StringUtil.DECIMAL_COLOR_WHITE); this.fontRenderer.drawString(Integer.toString(this.tileInputter.slotToPullStart), this.guiLeft+7, this.guiTop+67+(this.isAdvanced ? OFFSET_ADVANCED : 0), StringUtil.DECIMAL_COLOR_WHITE);
this.fontRendererObj.drawString(Integer.toString(this.tileInputter.slotToPullEnd), this.guiLeft+51, this.guiTop+67+(this.isAdvanced ? OFFSET_ADVANCED : 0), StringUtil.DECIMAL_COLOR_WHITE); this.fontRenderer.drawString(Integer.toString(this.tileInputter.slotToPullEnd), this.guiLeft+51, this.guiTop+67+(this.isAdvanced ? OFFSET_ADVANCED : 0), StringUtil.DECIMAL_COLOR_WHITE);
this.fieldPutStart.drawTextBox(); this.fieldPutStart.drawTextBox();
this.fieldPutEnd.drawTextBox(); this.fieldPutEnd.drawTextBox();
@ -257,16 +257,16 @@ public class GuiInputter extends GuiContainer{
} }
@Override @Override
public void func_191745_a(Minecraft mc, int x, int y, float f){ public void drawButton(Minecraft mc, int x, int y, float f){
if(this.visible){ if(this.visible){
mc.getTextureManager().bindTexture(this.resLoc); mc.getTextureManager().bindTexture(this.resLoc);
GlStateManager.color(1.0F, 1.0F, 1.0F, 1.0F); GlStateManager.color(1.0F, 1.0F, 1.0F, 1.0F);
this.hovered = x >= this.xPosition && y >= this.yPosition && x < this.xPosition+this.width && y < this.yPosition+this.height; this.hovered = x >= this.x && y >= this.y && x < this.x+this.width && y < this.y+this.height;
int k = this.getHoverState(this.hovered); int k = this.getHoverState(this.hovered);
GlStateManager.enableBlend(); GlStateManager.enableBlend();
GlStateManager.tryBlendFuncSeparate(770, 771, 1, 0); GlStateManager.tryBlendFuncSeparate(770, 771, 1, 0);
GlStateManager.blendFunc(770, 771); GlStateManager.blendFunc(770, 771);
this.drawTexturedModalRect(this.xPosition, this.yPosition, this.smaller ? 200 : 176, k*this.height, this.width, this.height); this.drawTexturedModalRect(this.x, this.y, this.smaller ? 200 : 176, k*this.height, this.width, this.height);
this.mouseDragged(mc, x, y); this.mouseDragged(mc, x, y);
int color = 14737632; int color = 14737632;
@ -280,7 +280,7 @@ public class GuiInputter extends GuiContainer{
color = 16777120; color = 16777120;
} }
this.drawCenteredString(mc.fontRendererObj, this.displayString, this.xPosition+this.width/2, this.yPosition+(this.height-8)/2, color); this.drawCenteredString(mc.fontRenderer, this.displayString, this.x+this.width/2, this.y+(this.height-8)/2, color);
} }
} }
} }
@ -295,16 +295,16 @@ public class GuiInputter extends GuiContainer{
} }
@Override @Override
public void func_191745_a(Minecraft mc, int x, int y, float f){ public void drawButton(Minecraft mc, int x, int y, float f){
if(this.visible){ if(this.visible){
mc.getTextureManager().bindTexture(this.resLoc); mc.getTextureManager().bindTexture(this.resLoc);
GlStateManager.color(1.0F, 1.0F, 1.0F, 1.0F); GlStateManager.color(1.0F, 1.0F, 1.0F, 1.0F);
this.hovered = x >= this.xPosition && y >= this.yPosition && x < this.xPosition+this.width && y < this.yPosition+this.height; this.hovered = x >= this.x && y >= this.y && x < this.x+this.width && y < this.y+this.height;
int k = this.getHoverState(this.hovered); int k = this.getHoverState(this.hovered);
GlStateManager.enableBlend(); GlStateManager.enableBlend();
GlStateManager.tryBlendFuncSeparate(770, 771, 1, 0); GlStateManager.tryBlendFuncSeparate(770, 771, 1, 0);
GlStateManager.blendFunc(770, 771); GlStateManager.blendFunc(770, 771);
this.drawTexturedModalRect(this.xPosition, this.yPosition, 192, k*8, 8, 8); this.drawTexturedModalRect(this.x, this.y, 192, k*8, 8, 8);
this.mouseDragged(mc, x, y); this.mouseDragged(mc, x, y);
} }
} }

View file

@ -81,7 +81,7 @@ public class GuiLaserRelayItemWhitelist extends GuiWtfMojang{
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<String>();
list.add(TextFormatting.BOLD+StringUtil.localize("info."+ModUtil.MOD_ID+".gui.smart")); list.add(TextFormatting.BOLD+StringUtil.localize("info."+ModUtil.MOD_ID+".gui.smart"));
list.addAll(this.fontRendererObj.listFormattedStringToWidth(StringUtil.localize("info."+ModUtil.MOD_ID+".gui.smartInfo"), 200)); list.addAll(this.fontRenderer.listFormattedStringToWidth(StringUtil.localize("info."+ModUtil.MOD_ID+".gui.smartInfo"), 200));
this.drawHoveringText(list, x, y); this.drawHoveringText(list, x, y);
} }
@ -91,12 +91,12 @@ public class GuiLaserRelayItemWhitelist extends GuiWtfMojang{
@Override @Override
public void drawGuiContainerForegroundLayer(int x, int y){ public void drawGuiContainerForegroundLayer(int x, int y){
AssetUtil.displayNameString(this.fontRendererObj, this.xSize, -10, this.tile); AssetUtil.displayNameString(this.fontRenderer, this.xSize, -10, this.tile);
String s1 = StringUtil.localize("info."+ModUtil.MOD_ID+".gui.inbound"); String s1 = StringUtil.localize("info."+ModUtil.MOD_ID+".gui.inbound");
String s2 = StringUtil.localize("info."+ModUtil.MOD_ID+".gui.outbound"); String s2 = StringUtil.localize("info."+ModUtil.MOD_ID+".gui.outbound");
this.fontRendererObj.drawString(s1, 46-this.fontRendererObj.getStringWidth(s1)/2, 80, StringUtil.DECIMAL_COLOR_GRAY_TEXT); this.fontRenderer.drawString(s1, 46-this.fontRenderer.getStringWidth(s1)/2, 80, StringUtil.DECIMAL_COLOR_GRAY_TEXT);
this.fontRendererObj.drawString(s2, 131-this.fontRendererObj.getStringWidth(s2)/2, 80, StringUtil.DECIMAL_COLOR_GRAY_TEXT); this.fontRenderer.drawString(s2, 131-this.fontRenderer.getStringWidth(s2)/2, 80, StringUtil.DECIMAL_COLOR_GRAY_TEXT);
} }
@Override @Override

View file

@ -49,7 +49,7 @@ public class GuiMiner extends GuiWtfMojang{
@Override @Override
public void drawGuiContainerForegroundLayer(int x, int y){ public void drawGuiContainerForegroundLayer(int x, int y){
AssetUtil.displayNameString(this.fontRendererObj, this.xSize, -10, this.miner); AssetUtil.displayNameString(this.fontRenderer, this.xSize, -10, this.miner);
} }
@Override @Override
@ -63,7 +63,7 @@ public class GuiMiner extends GuiWtfMojang{
this.drawTexturedModalRect(this.guiLeft, this.guiTop, 0, 0, 176, 93); this.drawTexturedModalRect(this.guiLeft, this.guiTop, 0, 0, 176, 93);
String mining = this.miner.onlyMineOres ? "Only Mining Ores" : "Mining Everything"; String mining = this.miner.onlyMineOres ? "Only Mining Ores" : "Mining Everything";
this.fontRendererObj.drawString(mining, this.guiLeft+this.xSize/2-this.fontRendererObj.getStringWidth(mining)/2, this.guiTop+8, StringUtil.DECIMAL_COLOR_GRAY_TEXT); this.fontRenderer.drawString(mining, this.guiLeft+this.xSize/2-this.fontRenderer.getStringWidth(mining)/2, this.guiTop+8, StringUtil.DECIMAL_COLOR_GRAY_TEXT);
} }
@Override @Override

View file

@ -52,7 +52,7 @@ public class GuiOilGenerator extends GuiWtfMojang{
@Override @Override
public void drawGuiContainerForegroundLayer(int x, int y){ public void drawGuiContainerForegroundLayer(int x, int y){
AssetUtil.displayNameString(this.fontRendererObj, this.xSize, -10, this.generator); AssetUtil.displayNameString(this.fontRenderer, this.xSize, -10, this.generator);
} }
@Override @Override
@ -71,8 +71,8 @@ public class GuiOilGenerator extends GuiWtfMojang{
} }
if(this.generator.maxBurnTime > 0 && this.generator.currentEnergyProduce > 0){ if(this.generator.maxBurnTime > 0 && this.generator.currentEnergyProduce > 0){
this.drawCenteredString(this.fontRendererObj, this.generator.currentEnergyProduce+" CF/t", this.guiLeft+87, this.guiTop+65, 0xFFFFFF); this.drawCenteredString(this.fontRenderer, this.generator.currentEnergyProduce+" CF/t", this.guiLeft+87, this.guiTop+65, 0xFFFFFF);
this.drawCenteredString(this.fontRendererObj, "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);
} }
this.energy.draw(); this.energy.draw();

View file

@ -69,7 +69,7 @@ public class GuiPhantomPlacer extends GuiWtfMojang{
List<String> textList = new ArrayList<String>(); List<String> textList = new ArrayList<String>();
textList.add(TextFormatting.GOLD+StringUtil.localize(loc+".1")); textList.add(TextFormatting.GOLD+StringUtil.localize(loc+".1"));
textList.addAll(this.fontRendererObj.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);
} }
} }
@ -87,7 +87,7 @@ public class GuiPhantomPlacer extends GuiWtfMojang{
@Override @Override
public void drawGuiContainerForegroundLayer(int x, int y){ public void drawGuiContainerForegroundLayer(int x, int y){
AssetUtil.displayNameString(this.fontRendererObj, this.xSize, -10, this.placer); AssetUtil.displayNameString(this.fontRenderer, this.xSize, -10, this.placer);
} }
@Override @Override

View file

@ -60,7 +60,7 @@ public class GuiRangedCollector extends GuiWtfMojang{
@Override @Override
public void drawGuiContainerForegroundLayer(int x, int y){ public void drawGuiContainerForegroundLayer(int x, int y){
AssetUtil.displayNameString(this.fontRendererObj, this.xSize, -10, this.collector); AssetUtil.displayNameString(this.fontRenderer, this.xSize, -10, this.collector);
} }
@Override @Override

View file

@ -48,7 +48,7 @@ public class GuiRepairer extends GuiWtfMojang{
@Override @Override
public void drawGuiContainerForegroundLayer(int x, int y){ public void drawGuiContainerForegroundLayer(int x, int y){
AssetUtil.displayNameString(this.fontRendererObj, this.xSize, -10, this.tileRepairer); AssetUtil.displayNameString(this.fontRenderer, this.xSize, -10, this.tileRepairer);
} }
@Override @Override

View file

@ -58,7 +58,7 @@ public class GuiSmileyCloud extends GuiWtfMojang{
public void initGui(){ public void initGui(){
super.initGui(); super.initGui();
this.nameField = new GuiTextField(4000, this.fontRendererObj, this.guiLeft+5, this.guiTop+6, 114, 8); this.nameField = new GuiTextField(4000, this.fontRenderer, this.guiLeft+5, this.guiTop+6, 114, 8);
this.nameField.setMaxStringLength(20); this.nameField.setMaxStringLength(20);
this.nameField.setEnableBackgroundDrawing(false); this.nameField.setEnableBackgroundDrawing(false);
this.nameField.setFocused(true); this.nameField.setFocused(true);
@ -68,7 +68,7 @@ public class GuiSmileyCloud extends GuiWtfMojang{
public void drawGuiContainerForegroundLayer(int x, int y){ public void drawGuiContainerForegroundLayer(int x, int y){
String name = this.cloud.name == null || this.cloud.name.isEmpty() ? "" : TextFormatting.GOLD+this.cloud.name+TextFormatting.RESET+" "+StringUtil.localize("info."+ModUtil.MOD_ID+".gui.the")+" "; String name = this.cloud.name == null || this.cloud.name.isEmpty() ? "" : TextFormatting.GOLD+this.cloud.name+TextFormatting.RESET+" "+StringUtil.localize("info."+ModUtil.MOD_ID+".gui.the")+" ";
String localizedName = name+StringUtil.localize("container."+ModUtil.MOD_ID+".cloud.name"); String localizedName = name+StringUtil.localize("container."+ModUtil.MOD_ID+".cloud.name");
this.fontRendererObj.drawString(localizedName, this.xSize/2-this.fontRendererObj.getStringWidth(localizedName)/2, -10, StringUtil.DECIMAL_COLOR_WHITE); this.fontRenderer.drawString(localizedName, this.xSize/2-this.fontRenderer.getStringWidth(localizedName)/2, -10, StringUtil.DECIMAL_COLOR_WHITE);
} }
@Override @Override

View file

@ -23,6 +23,6 @@ public abstract class GuiWtfMojang extends GuiContainer{
public void drawScreen(int mouseX, int mouseY, float partialTicks){ public void drawScreen(int mouseX, int mouseY, float partialTicks){
this.drawDefaultBackground(); this.drawDefaultBackground();
super.drawScreen(mouseX, mouseY, partialTicks); super.drawScreen(mouseX, mouseY, partialTicks);
this.func_191948_b(mouseX, mouseY); this.renderHoveredToolTip(mouseX, mouseY);
} }
} }

View file

@ -64,7 +64,7 @@ public class GuiXPSolidifier extends GuiWtfMojang{
@Override @Override
public void drawGuiContainerForegroundLayer(int x, int y){ public void drawGuiContainerForegroundLayer(int x, int y){
AssetUtil.displayNameString(this.fontRendererObj, this.xSize, -10, this.solidifier); AssetUtil.displayNameString(this.fontRenderer, this.xSize, -10, this.solidifier);
} }
@Override @Override
@ -77,7 +77,7 @@ public class GuiXPSolidifier extends GuiWtfMojang{
this.mc.getTextureManager().bindTexture(RES_LOC); this.mc.getTextureManager().bindTexture(RES_LOC);
this.drawTexturedModalRect(this.guiLeft, this.guiTop, 0, 0, 176, 93); this.drawTexturedModalRect(this.guiLeft, this.guiTop, 0, 0, 176, 93);
this.drawCenteredString(this.fontRendererObj, Integer.toString(this.solidifier.amount), this.guiLeft+88, this.guiTop+30, StringUtil.DECIMAL_COLOR_WHITE); this.drawCenteredString(this.fontRenderer, Integer.toString(this.solidifier.amount), this.guiLeft+88, this.guiTop+30, StringUtil.DECIMAL_COLOR_WHITE);
} }
@Override @Override

View file

@ -10,6 +10,9 @@
package de.ellpeck.actuallyadditions.mod.inventory.gui; package de.ellpeck.actuallyadditions.mod.inventory.gui;
import java.util.ArrayList;
import java.util.List;
import net.minecraft.client.Minecraft; import net.minecraft.client.Minecraft;
import net.minecraft.client.gui.GuiButton; import net.minecraft.client.gui.GuiButton;
import net.minecraft.client.renderer.GlStateManager; import net.minecraft.client.renderer.GlStateManager;
@ -18,9 +21,6 @@ import net.minecraftforge.fml.client.config.GuiUtils;
import net.minecraftforge.fml.relauncher.Side; import net.minecraftforge.fml.relauncher.Side;
import net.minecraftforge.fml.relauncher.SideOnly; import net.minecraftforge.fml.relauncher.SideOnly;
import java.util.ArrayList;
import java.util.List;
@SideOnly(Side.CLIENT) @SideOnly(Side.CLIENT)
public class TexturedButton extends GuiButton{ public class TexturedButton extends GuiButton{
@ -42,11 +42,11 @@ public class TexturedButton extends GuiButton{
} }
@Override @Override
public void func_191745_a(Minecraft minecraft, int x, int y, float f){ public void drawButton(Minecraft minecraft, int x, int y, float f){
if(this.visible){ if(this.visible){
minecraft.getTextureManager().bindTexture(this.resLoc); minecraft.getTextureManager().bindTexture(this.resLoc);
GlStateManager.color(1.0F, 1.0F, 1.0F, 1.0F); GlStateManager.color(1.0F, 1.0F, 1.0F, 1.0F);
this.hovered = x >= this.xPosition && y >= this.yPosition && x < this.xPosition+this.width && y < this.yPosition+this.height; this.hovered = x >= this.x && y >= this.y && x < this.x+this.width && y < this.y+this.height;
int k = this.getHoverState(this.hovered); int k = this.getHoverState(this.hovered);
if(k == 0){ if(k == 0){
k = 1; k = 1;
@ -55,7 +55,7 @@ public class TexturedButton extends GuiButton{
GlStateManager.enableBlend(); GlStateManager.enableBlend();
GlStateManager.tryBlendFuncSeparate(770, 771, 1, 0); GlStateManager.tryBlendFuncSeparate(770, 771, 1, 0);
GlStateManager.blendFunc(770, 771); GlStateManager.blendFunc(770, 771);
this.drawTexturedModalRect(this.xPosition, this.yPosition, this.texturePosX, this.texturePosY-this.height+k*this.height, this.width, this.height); this.drawTexturedModalRect(this.x, this.y, this.texturePosX, this.texturePosY-this.height+k*this.height, this.width, this.height);
this.mouseDragged(minecraft, x, y); this.mouseDragged(minecraft, x, y);
} }
} }
@ -63,7 +63,7 @@ public class TexturedButton extends GuiButton{
public void drawHover(int x, int y){ public void drawHover(int x, int y){
if(this.isMouseOver()){ if(this.isMouseOver()){
Minecraft mc = Minecraft.getMinecraft(); Minecraft mc = Minecraft.getMinecraft();
GuiUtils.drawHoveringText(this.textList, x, y, mc.displayWidth, mc.displayHeight, -1, mc.fontRendererObj); GuiUtils.drawHoveringText(this.textList, x, y, mc.displayWidth, mc.displayHeight, -1, mc.fontRenderer);
} }
} }
} }

View file

@ -10,7 +10,11 @@
package de.ellpeck.actuallyadditions.mod.items; package de.ellpeck.actuallyadditions.mod.items;
import java.util.Collections;
import java.util.Set;
import com.google.common.collect.Sets; import com.google.common.collect.Sets;
import de.ellpeck.actuallyadditions.mod.items.base.ItemToolAA; import de.ellpeck.actuallyadditions.mod.items.base.ItemToolAA;
import net.minecraft.block.Block; import net.minecraft.block.Block;
import net.minecraft.block.material.Material; import net.minecraft.block.material.Material;
@ -20,9 +24,6 @@ import net.minecraft.item.EnumRarity;
import net.minecraft.item.Item; import net.minecraft.item.Item;
import net.minecraft.item.ItemStack; import net.minecraft.item.ItemStack;
import java.util.Collections;
import java.util.Set;
public class ItemAxeAA extends ItemToolAA{ public class ItemAxeAA extends ItemToolAA{
private static final Set<Block> EFFECTIVE_ON = Sets.newHashSet(Blocks.PLANKS, Blocks.BOOKSHELF, Blocks.LOG, Blocks.LOG2, Blocks.CHEST, Blocks.PUMPKIN, Blocks.LIT_PUMPKIN, Blocks.MELON_BLOCK, Blocks.LADDER, Blocks.WOODEN_BUTTON, Blocks.WOODEN_PRESSURE_PLATE); private static final Set<Block> EFFECTIVE_ON = Sets.newHashSet(Blocks.PLANKS, Blocks.BOOKSHELF, Blocks.LOG, Blocks.LOG2, Blocks.CHEST, Blocks.PUMPKIN, Blocks.LIT_PUMPKIN, Blocks.MELON_BLOCK, Blocks.LADDER, Blocks.WOODEN_BUTTON, Blocks.WOODEN_PRESSURE_PLATE);

View file

@ -10,6 +10,8 @@
package de.ellpeck.actuallyadditions.mod.items; package de.ellpeck.actuallyadditions.mod.items;
import java.util.List;
import de.ellpeck.actuallyadditions.mod.ActuallyAdditions; import de.ellpeck.actuallyadditions.mod.ActuallyAdditions;
import de.ellpeck.actuallyadditions.mod.items.base.ItemEnergy; import de.ellpeck.actuallyadditions.mod.items.base.ItemEnergy;
import de.ellpeck.actuallyadditions.mod.util.ItemUtil; import de.ellpeck.actuallyadditions.mod.util.ItemUtil;
@ -30,8 +32,6 @@ import net.minecraft.world.World;
import net.minecraftforge.energy.CapabilityEnergy; import net.minecraftforge.energy.CapabilityEnergy;
import net.minecraftforge.energy.IEnergyStorage; import net.minecraftforge.energy.IEnergyStorage;
import java.util.List;
public class ItemBattery extends ItemEnergy{ public class ItemBattery extends ItemEnergy{
public ItemBattery(String name, int capacity, int transfer){ public ItemBattery(String name, int capacity, int transfer){

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