Merge pull request #1 from Ellpeck/master

-Update Repo
This commit is contained in:
canitzp 2015-11-05 19:42:00 +01:00
commit 9e25b447f8
358 changed files with 1497 additions and 1527 deletions

View file

@ -2,4 +2,4 @@ ALL RIGHTS RESERVED.
For more Information, check the README.md file.
© 2015 Ellpeck
© 2015 Ellpeck

View file

@ -2,7 +2,7 @@
##It's a Minecraft Mod!
For more information, visit the main Minecraft Forum Thread at http://www.minecraftforum.net/forums/mapping-and-modding/minecraft-mods/wip-mods/2374910-actually-additions-a-bunch-of-awesome-gadgets
For more information, visit the main Minecraft Forum Thread at http://www.minecraftforum.net/forums/mapping-and-modding/minecraft-mods/2551118
If you want to see Information on how you can use my Mod and its InterModComms Feature in your own Mod, see the InterModCommsInfo.md File!
@ -36,6 +36,7 @@ Everything that is not listed below applies to the above.
### NOTES
- The above License only applies for Code I wrote myself, any APIs used (such as the CoFH API) have their own License that is being respected.
- There are some excerpts from other code used (such as the OpenBlocks XP System). Credit to the creators of these parts is always given and their Permission is granted or their License is respected.
- Almost all of the Assets used in this Mod are made by Glenthor and are owned by me. You are not allowed to copy them for any other Project without my Permission.
- Almost all of the Assets used in this Mod are made by Glenthor and are owned by me. You are not allowed to copy them for any other Project.
- Parts of this License, especially restrictive ones, can be ignored with Personal Permission. Said Permission, however, will only be given to people I know or someone who has a very good reason for needing it. If you don't, don't ask.
© 2015 Ellpeck
© 2015 Ellpeck

View file

@ -2,4 +2,4 @@ Textures to be made
--------------------------------------------------------------------------------------------------------------
This file is a reminder to Glenthor for what textures he should make or change.
If you want to give making some of these textures a go, go ahead and make a pull request when you're done.
--------------------------------------------------------------------------------------------------------------
--------------------------------------------------------------------------------------------------------------

View file

@ -18,12 +18,12 @@ buildscript {
apply plugin: 'forge'
apply plugin: 'maven'
version = "1.7.10-0.0.9.4"
version = "1.7.10-r2"
group = "ellpeck.actuallyadditions"
archivesBaseName = "ActuallyAdditions"
minecraft {
version = "1.7.10-10.13.4.1492-1.7.10"
version = "1.7.10-10.13.4.1541-1.7.10"
runDir = "idea"
}

View file

@ -0,0 +1,4 @@
ellpeck=ActuallyAdditions:itemPhantomConnector
dqmhose=minecraft:torch
twoofeight=ActuallyAdditions:blockHeatCollector
larixine=ActuallyAdditions:blockBlackLotus

View file

@ -5,7 +5,7 @@
* http://github.com/Ellpeck/ActuallyAdditions/blob/master/README.md
* View the source code at https://github.com/Ellpeck/ActuallyAdditions
*
* © 2015 Ellpeck
* © 2015 Ellpeck
*/
package ellpeck.actuallyadditions;
@ -45,6 +45,7 @@ import ellpeck.actuallyadditions.tile.TileEntityBase;
import ellpeck.actuallyadditions.update.UpdateChecker;
import ellpeck.actuallyadditions.util.ModUtil;
import ellpeck.actuallyadditions.util.Util;
import ellpeck.actuallyadditions.util.playerdata.PersistentServerData;
import net.minecraft.init.Items;
// So that BuildCraft Oil always gets used
@ -69,7 +70,7 @@ public class ActuallyAdditions{
InitItems.init();
InitVillager.init();
FuelHandler.init();
new UpdateChecker().init();
UpdateChecker.init();
proxy.preInit(event);
ModUtil.LOGGER.info("PreInitialization Finished.");
@ -121,4 +122,10 @@ public class ActuallyAdditions{
WorldData.init(event.getServer());
}
@EventHandler
public void serverStopped(FMLServerStoppedEvent event){
//Clear Data so that it won't be carried over to other worlds
PersistentServerData.playerSaveData.clear();
}
}

View file

@ -5,7 +5,7 @@
* http://github.com/Ellpeck/ActuallyAdditions/blob/master/README.md
* View the source code at https://github.com/Ellpeck/ActuallyAdditions
*
* © 2015 Ellpeck
* © 2015 Ellpeck
*/
package ellpeck.actuallyadditions.achievement;

View file

@ -5,7 +5,7 @@
* http://github.com/Ellpeck/ActuallyAdditions/blob/master/README.md
* View the source code at https://github.com/Ellpeck/ActuallyAdditions
*
* © 2015 Ellpeck
* © 2015 Ellpeck
*/
package ellpeck.actuallyadditions.achievement;

View file

@ -0,0 +1,50 @@
/*
* This file ("BlockFlower.java") is part of the Actually Additions Mod for Minecraft.
* It is created and owned by Ellpeck and distributed
* under the Actually Additions License to be found at
* http://github.com/Ellpeck/ActuallyAdditions/blob/master/README.md
* View the source code at https://github.com/Ellpeck/ActuallyAdditions
*
* © 2015 Ellpeck
*/
package ellpeck.actuallyadditions.blocks;
import cpw.mods.fml.relauncher.Side;
import cpw.mods.fml.relauncher.SideOnly;
import ellpeck.actuallyadditions.util.IActAddItemOrBlock;
import ellpeck.actuallyadditions.util.ModUtil;
import net.minecraft.block.BlockBush;
import net.minecraft.client.renderer.texture.IIconRegister;
import net.minecraft.item.EnumRarity;
import net.minecraft.item.ItemStack;
import net.minecraft.util.IIcon;
public class BlockBlackLotus extends BlockBush implements IActAddItemOrBlock{
public BlockBlackLotus(){
this.setStepSound(soundTypeGrass);
}
@Override
public String getName(){
return "blockBlackLotus";
}
@Override
public EnumRarity getRarity(ItemStack stack){
return EnumRarity.epic;
}
@Override
@SideOnly(Side.CLIENT)
public IIcon getIcon(int side, int meta){
return this.blockIcon;
}
@Override
@SideOnly(Side.CLIENT)
public void registerBlockIcons(IIconRegister iconReg){
this.blockIcon = iconReg.registerIcon(ModUtil.MOD_ID_LOWER+":"+this.getName());
}
}

View file

@ -5,7 +5,7 @@
* http://github.com/Ellpeck/ActuallyAdditions/blob/master/README.md
* View the source code at https://github.com/Ellpeck/ActuallyAdditions
*
* © 2015 Ellpeck
* © 2015 Ellpeck
*/
package ellpeck.actuallyadditions.blocks;
@ -32,7 +32,9 @@ import net.minecraft.world.World;
public class BlockBreaker extends BlockContainerBase implements IActAddItemOrBlock{
@SideOnly(Side.CLIENT)
private IIcon frontIcon;
@SideOnly(Side.CLIENT)
private IIcon topIcon;
private boolean isPlacer;
@ -52,6 +54,7 @@ public class BlockBreaker extends BlockContainerBase implements IActAddItemOrBlo
}
@Override
@SideOnly(Side.CLIENT)
public IIcon getIcon(IBlockAccess world, int x, int y, int z, int side){
int meta = world.getBlockMetadata(x, y, z);
if(side != meta && (side == 0 || side == 1)){
@ -64,6 +67,7 @@ public class BlockBreaker extends BlockContainerBase implements IActAddItemOrBlo
}
@Override
@SideOnly(Side.CLIENT)
public IIcon getIcon(int side, int meta){
if(side == 0 || side == 1){
return this.topIcon;

View file

@ -5,7 +5,7 @@
* http://github.com/Ellpeck/ActuallyAdditions/blob/master/README.md
* View the source code at https://github.com/Ellpeck/ActuallyAdditions
*
* © 2015 Ellpeck
* © 2015 Ellpeck
*/
package ellpeck.actuallyadditions.blocks;
@ -29,6 +29,7 @@ import net.minecraft.world.World;
public class BlockCanolaPress extends BlockContainerBase implements IActAddItemOrBlock{
@SideOnly(Side.CLIENT)
private IIcon topIcon;
public BlockCanolaPress(){
@ -45,6 +46,7 @@ public class BlockCanolaPress extends BlockContainerBase implements IActAddItemO
}
@Override
@SideOnly(Side.CLIENT)
public IIcon getIcon(int side, int meta){
return side == 1 || side == 0 ? this.topIcon : this.blockIcon;
}

View file

@ -5,7 +5,7 @@
* http://github.com/Ellpeck/ActuallyAdditions/blob/master/README.md
* View the source code at https://github.com/Ellpeck/ActuallyAdditions
*
* © 2015 Ellpeck
* © 2015 Ellpeck
*/
package ellpeck.actuallyadditions.blocks;
@ -32,7 +32,9 @@ import java.util.Random;
public class BlockCoalGenerator extends BlockContainerBase implements IActAddItemOrBlock{
@SideOnly(Side.CLIENT)
private IIcon topIcon;
@SideOnly(Side.CLIENT)
private IIcon bottomIcon;
public BlockCoalGenerator(){
@ -50,6 +52,7 @@ public class BlockCoalGenerator extends BlockContainerBase implements IActAddIte
}
@Override
@SideOnly(Side.CLIENT)
public IIcon getIcon(int side, int meta){
return side <= 1 ? (side == 0 ? this.bottomIcon : this.topIcon) : this.blockIcon;
}

View file

@ -5,7 +5,7 @@
* http://github.com/Ellpeck/ActuallyAdditions/blob/master/README.md
* View the source code at https://github.com/Ellpeck/ActuallyAdditions
*
* © 2015 Ellpeck
* © 2015 Ellpeck
*/
package ellpeck.actuallyadditions.blocks;
@ -54,6 +54,7 @@ public class BlockCoffeeMachine extends BlockContainerBase implements IActAddIte
}
@Override
@SideOnly(Side.CLIENT)
public IIcon getIcon(int side, int metadata){
return this.blockIcon;
}

View file

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

View file

@ -5,7 +5,7 @@
* http://github.com/Ellpeck/ActuallyAdditions/blob/master/README.md
* View the source code at https://github.com/Ellpeck/ActuallyAdditions
*
* © 2015 Ellpeck
* © 2015 Ellpeck
*/
package ellpeck.actuallyadditions.blocks;
@ -57,6 +57,7 @@ public class BlockCompost extends BlockContainerBase implements IActAddItemOrBlo
}
@Override
@SideOnly(Side.CLIENT)
public IIcon getIcon(int side, int metadata){
return this.blockIcon;
}

View file

@ -5,7 +5,7 @@
* http://github.com/Ellpeck/ActuallyAdditions/blob/master/README.md
* View the source code at https://github.com/Ellpeck/ActuallyAdditions
*
* © 2015 Ellpeck
* © 2015 Ellpeck
*/
package ellpeck.actuallyadditions.blocks;

View file

@ -5,7 +5,7 @@
* http://github.com/Ellpeck/ActuallyAdditions/blob/master/README.md
* View the source code at https://github.com/Ellpeck/ActuallyAdditions
*
* © 2015 Ellpeck
* © 2015 Ellpeck
*/
package ellpeck.actuallyadditions.blocks;
@ -32,7 +32,9 @@ import net.minecraft.world.World;
public class BlockDirectionalBreaker extends BlockContainerBase implements IActAddItemOrBlock{
@SideOnly(Side.CLIENT)
private IIcon frontIcon;
@SideOnly(Side.CLIENT)
private IIcon topIcon;
public BlockDirectionalBreaker(){
@ -49,6 +51,7 @@ public class BlockDirectionalBreaker extends BlockContainerBase implements IActA
}
@Override
@SideOnly(Side.CLIENT)
public IIcon getIcon(IBlockAccess world, int x, int y, int z, int side){
int meta = world.getBlockMetadata(x, y, z);
if(side != meta && (side == 0 || side == 1)){
@ -61,6 +64,7 @@ public class BlockDirectionalBreaker extends BlockContainerBase implements IActA
}
@Override
@SideOnly(Side.CLIENT)
public IIcon getIcon(int side, int meta){
if(side == 0 || side == 1){
return this.topIcon;

View file

@ -5,7 +5,7 @@
* http://github.com/Ellpeck/ActuallyAdditions/blob/master/README.md
* View the source code at https://github.com/Ellpeck/ActuallyAdditions
*
* © 2015 Ellpeck
* © 2015 Ellpeck
*/
package ellpeck.actuallyadditions.blocks;
@ -32,7 +32,9 @@ import net.minecraft.world.World;
public class BlockDropper extends BlockContainerBase implements IActAddItemOrBlock{
@SideOnly(Side.CLIENT)
private IIcon frontIcon;
@SideOnly(Side.CLIENT)
private IIcon topIcon;
public BlockDropper(){
@ -49,6 +51,7 @@ public class BlockDropper extends BlockContainerBase implements IActAddItemOrBlo
}
@Override
@SideOnly(Side.CLIENT)
public IIcon getIcon(IBlockAccess world, int x, int y, int z, int side){
int meta = world.getBlockMetadata(x, y, z);
if(side != meta && (side == 0 || side == 1)){
@ -61,6 +64,7 @@ public class BlockDropper extends BlockContainerBase implements IActAddItemOrBlo
}
@Override
@SideOnly(Side.CLIENT)
public IIcon getIcon(int side, int meta){
if(side == 0 || side == 1){
return this.topIcon;

View file

@ -5,7 +5,7 @@
* http://github.com/Ellpeck/ActuallyAdditions/blob/master/README.md
* View the source code at https://github.com/Ellpeck/ActuallyAdditions
*
* © 2015 Ellpeck
* © 2015 Ellpeck
*/
package ellpeck.actuallyadditions.blocks;
@ -30,7 +30,9 @@ import net.minecraft.world.World;
public class BlockEnergizer extends BlockContainerBase implements IActAddItemOrBlock{
@SideOnly(Side.CLIENT)
private IIcon topIcon;
@SideOnly(Side.CLIENT)
private IIcon sideIcon;
private boolean isEnergizer;
@ -49,6 +51,7 @@ public class BlockEnergizer extends BlockContainerBase implements IActAddItemOrB
}
@Override
@SideOnly(Side.CLIENT)
public IIcon getIcon(int side, int meta){
return side == 1 ? this.topIcon : (side == 0 ? this.blockIcon : this.sideIcon);
}

View file

@ -5,7 +5,7 @@
* http://github.com/Ellpeck/ActuallyAdditions/blob/master/README.md
* View the source code at https://github.com/Ellpeck/ActuallyAdditions
*
* © 2015 Ellpeck
* © 2015 Ellpeck
*/
package ellpeck.actuallyadditions.blocks;
@ -29,6 +29,7 @@ import net.minecraft.world.World;
public class BlockFeeder extends BlockContainerBase implements IActAddItemOrBlock{
@SideOnly(Side.CLIENT)
private IIcon topIcon;
public BlockFeeder(){
@ -45,6 +46,7 @@ public class BlockFeeder extends BlockContainerBase implements IActAddItemOrBloc
}
@Override
@SideOnly(Side.CLIENT)
public IIcon getIcon(int side, int metadata){
return (side == 0 || side == 1) ? this.topIcon : this.blockIcon;
}

View file

@ -5,7 +5,7 @@
* http://github.com/Ellpeck/ActuallyAdditions/blob/master/README.md
* View the source code at https://github.com/Ellpeck/ActuallyAdditions
*
* © 2015 Ellpeck
* © 2015 Ellpeck
*/
package ellpeck.actuallyadditions.blocks;
@ -29,6 +29,7 @@ import net.minecraft.world.World;
public class BlockFermentingBarrel extends BlockContainerBase implements IActAddItemOrBlock{
@SideOnly(Side.CLIENT)
private IIcon iconTop;
public BlockFermentingBarrel(){
@ -51,6 +52,7 @@ public class BlockFermentingBarrel extends BlockContainerBase implements IActAdd
}
@Override
@SideOnly(Side.CLIENT)
public IIcon getIcon(int side, int metadata){
return side <= 1 ? this.iconTop : this.blockIcon;
}

View file

@ -5,7 +5,7 @@
* http://github.com/Ellpeck/ActuallyAdditions/blob/master/README.md
* View the source code at https://github.com/Ellpeck/ActuallyAdditions
*
* © 2015 Ellpeck
* © 2015 Ellpeck
*/
package ellpeck.actuallyadditions.blocks;
@ -51,6 +51,7 @@ public class BlockFishingNet extends BlockContainerBase implements IActAddItemOr
}
@Override
@SideOnly(Side.CLIENT)
public IIcon getIcon(int side, int metadata){
return this.blockIcon;
}

View file

@ -5,7 +5,7 @@
* http://github.com/Ellpeck/ActuallyAdditions/blob/master/README.md
* View the source code at https://github.com/Ellpeck/ActuallyAdditions
*
* © 2015 Ellpeck
* © 2015 Ellpeck
*/
package ellpeck.actuallyadditions.blocks;
@ -32,7 +32,9 @@ import net.minecraft.world.World;
public class BlockFluidCollector extends BlockContainerBase implements IActAddItemOrBlock{
@SideOnly(Side.CLIENT)
private IIcon frontIcon;
@SideOnly(Side.CLIENT)
private IIcon topIcon;
private boolean isPlacer;
@ -52,6 +54,7 @@ public class BlockFluidCollector extends BlockContainerBase implements IActAddIt
}
@Override
@SideOnly(Side.CLIENT)
public IIcon getIcon(IBlockAccess world, int x, int y, int z, int side){
int meta = world.getBlockMetadata(x, y, z);
if(side != meta && (side == 0 || side == 1)){
@ -64,6 +67,7 @@ public class BlockFluidCollector extends BlockContainerBase implements IActAddIt
}
@Override
@SideOnly(Side.CLIENT)
public IIcon getIcon(int side, int meta){
if(side == 0 || side == 1){
return this.topIcon;

View file

@ -5,7 +5,7 @@
* http://github.com/Ellpeck/ActuallyAdditions/blob/master/README.md
* View the source code at https://github.com/Ellpeck/ActuallyAdditions
*
* © 2015 Ellpeck
* © 2015 Ellpeck
*/
package ellpeck.actuallyadditions.blocks;
@ -26,7 +26,9 @@ import net.minecraftforge.fluids.Fluid;
public class BlockFluidFlowing extends BlockFluidClassic implements IActAddItemOrBlock{
@SideOnly(Side.CLIENT)
public IIcon stillIcon;
@SideOnly(Side.CLIENT)
public IIcon flowingIcon;
private String name;
@ -48,6 +50,7 @@ public class BlockFluidFlowing extends BlockFluidClassic implements IActAddItemO
}
@Override
@SideOnly(Side.CLIENT)
public IIcon getIcon(int side, int meta){
return side <= 1 ? this.stillIcon : this.flowingIcon;
}

View file

@ -5,7 +5,7 @@
* http://github.com/Ellpeck/ActuallyAdditions/blob/master/README.md
* View the source code at https://github.com/Ellpeck/ActuallyAdditions
*
* © 2015 Ellpeck
* © 2015 Ellpeck
*/
package ellpeck.actuallyadditions.blocks;
@ -35,8 +35,11 @@ import java.util.Random;
public class BlockFurnaceDouble extends BlockContainerBase implements IActAddItemOrBlock{
@SideOnly(Side.CLIENT)
private IIcon topIcon;
@SideOnly(Side.CLIENT)
private IIcon onIcon;
@SideOnly(Side.CLIENT)
private IIcon frontIcon;
public BlockFurnaceDouble(){
@ -54,6 +57,7 @@ public class BlockFurnaceDouble extends BlockContainerBase implements IActAddIte
}
@Override
@SideOnly(Side.CLIENT)
public IIcon getIcon(IBlockAccess world, int x, int y, int z, int side){
int meta = world.getBlockMetadata(x, y, z);
if(side == 1){
@ -69,6 +73,7 @@ public class BlockFurnaceDouble extends BlockContainerBase implements IActAddIte
}
@Override
@SideOnly(Side.CLIENT)
public IIcon getIcon(int side, int meta){
if(side == 1){
return this.topIcon;

View file

@ -5,7 +5,7 @@
* http://github.com/Ellpeck/ActuallyAdditions/blob/master/README.md
* View the source code at https://github.com/Ellpeck/ActuallyAdditions
*
* © 2015 Ellpeck
* © 2015 Ellpeck
*/
package ellpeck.actuallyadditions.blocks;
@ -53,6 +53,7 @@ public class BlockFurnaceSolar extends BlockContainerBase implements IActAddItem
}
@Override
@SideOnly(Side.CLIENT)
public IIcon getIcon(int side, int metadata){
return this.blockIcon;
}

View file

@ -5,7 +5,7 @@
* http://github.com/Ellpeck/ActuallyAdditions/blob/master/README.md
* View the source code at https://github.com/Ellpeck/ActuallyAdditions
*
* © 2015 Ellpeck
* © 2015 Ellpeck
*/
package ellpeck.actuallyadditions.blocks;
@ -35,6 +35,7 @@ public class BlockGeneric extends Block implements IActAddItemOrBlock{
}
@Override
@SideOnly(Side.CLIENT)
public IIcon getIcon(int side, int meta){
return this.blockIcon;
}

View file

@ -5,7 +5,7 @@
* http://github.com/Ellpeck/ActuallyAdditions/blob/master/README.md
* View the source code at https://github.com/Ellpeck/ActuallyAdditions
*
* © 2015 Ellpeck
* © 2015 Ellpeck
*/
package ellpeck.actuallyadditions.blocks;
@ -29,7 +29,9 @@ import net.minecraft.world.World;
public class BlockGiantChest extends BlockContainerBase implements IActAddItemOrBlock{
@SideOnly(Side.CLIENT)
private IIcon topIcon;
@SideOnly(Side.CLIENT)
private IIcon bottomIcon;
public BlockGiantChest(){
@ -46,6 +48,7 @@ public class BlockGiantChest extends BlockContainerBase implements IActAddItemOr
}
@Override
@SideOnly(Side.CLIENT)
public IIcon getIcon(int side, int metadata){
return side == 1 ? this.topIcon : (side == 0 ? this.bottomIcon : this.blockIcon);
}

View file

@ -5,7 +5,7 @@
* http://github.com/Ellpeck/ActuallyAdditions/blob/master/README.md
* View the source code at https://github.com/Ellpeck/ActuallyAdditions
*
* © 2015 Ellpeck
* © 2015 Ellpeck
*/
package ellpeck.actuallyadditions.blocks;
@ -48,6 +48,7 @@ public class BlockGreenhouseGlass extends BlockContainerBase implements IActAddI
}
@Override
@SideOnly(Side.CLIENT)
public IIcon getIcon(int side, int metadata){
return this.blockIcon;
}

View file

@ -5,7 +5,7 @@
* http://github.com/Ellpeck/ActuallyAdditions/blob/master/README.md
* View the source code at https://github.com/Ellpeck/ActuallyAdditions
*
* © 2015 Ellpeck
* © 2015 Ellpeck
*/
package ellpeck.actuallyadditions.blocks;
@ -34,8 +34,11 @@ import java.util.Random;
public class BlockGrinder extends BlockContainerBase implements IActAddItemOrBlock{
private final boolean isDouble;
@SideOnly(Side.CLIENT)
private IIcon topIcon;
@SideOnly(Side.CLIENT)
private IIcon onIcon;
@SideOnly(Side.CLIENT)
private IIcon bottomIcon;
public BlockGrinder(boolean isDouble){
@ -54,6 +57,7 @@ public class BlockGrinder extends BlockContainerBase implements IActAddItemOrBlo
}
@Override
@SideOnly(Side.CLIENT)
public IIcon getIcon(int side, int meta){
if(side == 1 && meta != 1){
return this.topIcon;

View file

@ -5,7 +5,7 @@
* http://github.com/Ellpeck/ActuallyAdditions/blob/master/README.md
* View the source code at https://github.com/Ellpeck/ActuallyAdditions
*
* © 2015 Ellpeck
* © 2015 Ellpeck
*/
package ellpeck.actuallyadditions.blocks;
@ -27,7 +27,9 @@ import net.minecraft.world.World;
public class BlockHeatCollector extends BlockContainerBase implements IActAddItemOrBlock{
@SideOnly(Side.CLIENT)
private IIcon topIcon;
@SideOnly(Side.CLIENT)
private IIcon bottomIcon;
public BlockHeatCollector(){
@ -44,6 +46,7 @@ public class BlockHeatCollector extends BlockContainerBase implements IActAddIte
}
@Override
@SideOnly(Side.CLIENT)
public IIcon getIcon(int side, int metadata){
return side == 1 ? this.topIcon : (side == 0 ? this.bottomIcon : this.blockIcon);
}

View file

@ -5,7 +5,7 @@
* http://github.com/Ellpeck/ActuallyAdditions/blob/master/README.md
* View the source code at https://github.com/Ellpeck/ActuallyAdditions
*
* © 2015 Ellpeck
* © 2015 Ellpeck
*/
package ellpeck.actuallyadditions.blocks;
@ -54,6 +54,7 @@ public class BlockInputter extends BlockContainerBase implements IActAddItemOrBl
}
@Override
@SideOnly(Side.CLIENT)
public IIcon getIcon(int side, int meta){
return this.blockIcon;
}

View file

@ -5,7 +5,7 @@
* http://github.com/Ellpeck/ActuallyAdditions/blob/master/README.md
* View the source code at https://github.com/Ellpeck/ActuallyAdditions
*
* © 2015 Ellpeck
* © 2015 Ellpeck
*/
package ellpeck.actuallyadditions.blocks;
@ -30,7 +30,9 @@ import net.minecraft.world.World;
public class BlockItemRepairer extends BlockContainerBase implements IActAddItemOrBlock{
@SideOnly(Side.CLIENT)
private IIcon topIcon;
@SideOnly(Side.CLIENT)
private IIcon bottomIcon;
public BlockItemRepairer(){
@ -48,6 +50,7 @@ public class BlockItemRepairer extends BlockContainerBase implements IActAddItem
}
@Override
@SideOnly(Side.CLIENT)
public IIcon getIcon(int side, int meta){
if(side == 1){
return this.topIcon;

View file

@ -5,7 +5,7 @@
* http://github.com/Ellpeck/ActuallyAdditions/blob/master/README.md
* View the source code at https://github.com/Ellpeck/ActuallyAdditions
*
* © 2015 Ellpeck
* © 2015 Ellpeck
*/
package ellpeck.actuallyadditions.blocks;
@ -30,6 +30,7 @@ import net.minecraftforge.common.util.ForgeDirection;
public class BlockLampPowerer extends Block implements IActAddItemOrBlock{
@SideOnly(Side.CLIENT)
private IIcon frontIcon;
public BlockLampPowerer(){
@ -41,6 +42,7 @@ public class BlockLampPowerer extends Block implements IActAddItemOrBlock{
}
@Override
@SideOnly(Side.CLIENT)
public IIcon getIcon(IBlockAccess world, int x, int y, int z, int side){
int meta = world.getBlockMetadata(x, y, z);
if(side == meta){
@ -50,6 +52,7 @@ public class BlockLampPowerer extends Block implements IActAddItemOrBlock{
}
@Override
@SideOnly(Side.CLIENT)
public IIcon getIcon(int side, int meta){
if(side == 3){
return this.frontIcon;

View file

@ -5,7 +5,7 @@
* http://github.com/Ellpeck/ActuallyAdditions/blob/master/README.md
* View the source code at https://github.com/Ellpeck/ActuallyAdditions
*
* © 2015 Ellpeck
* © 2015 Ellpeck
*/
package ellpeck.actuallyadditions.blocks;
@ -45,6 +45,7 @@ public class BlockLaserRelay extends BlockContainerBase implements IActAddItemOr
}
@Override
@SideOnly(Side.CLIENT)
public IIcon getIcon(int side, int metadata){
return this.blockIcon;
}

View file

@ -5,7 +5,7 @@
* http://github.com/Ellpeck/ActuallyAdditions/blob/master/README.md
* View the source code at https://github.com/Ellpeck/ActuallyAdditions
*
* © 2015 Ellpeck
* © 2015 Ellpeck
*/
package ellpeck.actuallyadditions.blocks;
@ -28,6 +28,7 @@ import net.minecraft.world.World;
public class BlockLavaFactoryController extends BlockContainerBase implements IActAddItemOrBlock{
@SideOnly(Side.CLIENT)
private IIcon topIcon;
public BlockLavaFactoryController(){
@ -44,6 +45,7 @@ public class BlockLavaFactoryController extends BlockContainerBase implements IA
}
@Override
@SideOnly(Side.CLIENT)
public IIcon getIcon(int side, int meta){
return side == 1 ? this.topIcon : this.blockIcon;
}

View file

@ -5,7 +5,7 @@
* http://github.com/Ellpeck/ActuallyAdditions/blob/master/README.md
* View the source code at https://github.com/Ellpeck/ActuallyAdditions
*
* © 2015 Ellpeck
* © 2015 Ellpeck
*/
package ellpeck.actuallyadditions.blocks;
@ -28,7 +28,9 @@ import net.minecraft.world.World;
public class BlockLeafGenerator extends BlockContainerBase implements IActAddItemOrBlock{
@SideOnly(Side.CLIENT)
private IIcon topIcon;
@SideOnly(Side.CLIENT)
private IIcon bottomIcon;
public BlockLeafGenerator(){
@ -45,6 +47,7 @@ public class BlockLeafGenerator extends BlockContainerBase implements IActAddIte
}
@Override
@SideOnly(Side.CLIENT)
public IIcon getIcon(int side, int meta){
return side <= 1 ? (side == 0 ? this.bottomIcon : this.topIcon) : this.blockIcon;
}

View file

@ -5,7 +5,7 @@
* http://github.com/Ellpeck/ActuallyAdditions/blob/master/README.md
* View the source code at https://github.com/Ellpeck/ActuallyAdditions
*
* © 2015 Ellpeck
* © 2015 Ellpeck
*/
package ellpeck.actuallyadditions.blocks;
@ -31,10 +31,15 @@ import java.util.List;
public class BlockMisc extends Block implements IActAddItemOrBlock{
public static final TheMiscBlocks[] allMiscBlocks = TheMiscBlocks.values();
public IIcon[] textures = new IIcon[allMiscBlocks.length];
@SideOnly(Side.CLIENT)
public IIcon[] textures;
private IIcon stoneCasingSeasonalTop;
@SideOnly(Side.CLIENT)
private IIcon casingSeasonalTop;
@SideOnly(Side.CLIENT)
private IIcon stoneCasingSeasonal;
@SideOnly(Side.CLIENT)
private IIcon ironCasingSeasonal;
public BlockMisc(){
super(Material.rock);
@ -44,9 +49,15 @@ public class BlockMisc extends Block implements IActAddItemOrBlock{
}
@Override
@SideOnly(Side.CLIENT)
public IIcon getIcon(int side, int metadata){
if(ClientProxy.jingleAllTheWay && metadata == TheMiscBlocks.STONE_CASING.ordinal() && side != 0){
return side == 1 ? this.stoneCasingSeasonalTop : this.stoneCasingSeasonal;
if(ClientProxy.jingleAllTheWay && side != 0){
if(metadata == TheMiscBlocks.STONE_CASING.ordinal()){
return side == 1 ? this.casingSeasonalTop : this.stoneCasingSeasonal;
}
else if(metadata == TheMiscBlocks.IRON_CASING.ordinal()){
return side == 1 ? this.casingSeasonalTop : this.ironCasingSeasonal;
}
}
return metadata >= textures.length ? null : textures[metadata];
}
@ -67,12 +78,14 @@ public class BlockMisc extends Block implements IActAddItemOrBlock{
@Override
@SideOnly(Side.CLIENT)
public void registerBlockIcons(IIconRegister iconReg){
this.textures = new IIcon[allMiscBlocks.length];
for(int i = 0; i < textures.length; i++){
textures[i] = iconReg.registerIcon(ModUtil.MOD_ID_LOWER+":"+this.getName()+allMiscBlocks[i].name);
}
this.stoneCasingSeasonalTop = iconReg.registerIcon(ModUtil.MOD_ID_LOWER+":blockMiscStoneCasingSnowTop");
this.casingSeasonalTop = iconReg.registerIcon(ModUtil.MOD_ID_LOWER+":blockMiscStoneCasingSnowTop");
this.stoneCasingSeasonal = iconReg.registerIcon(ModUtil.MOD_ID_LOWER+":blockMiscStoneCasingSnow");
this.ironCasingSeasonal = iconReg.registerIcon(ModUtil.MOD_ID_LOWER+":blockMiscIronCasingSnow");
}
@Override

View file

@ -5,7 +5,7 @@
* http://github.com/Ellpeck/ActuallyAdditions/blob/master/README.md
* View the source code at https://github.com/Ellpeck/ActuallyAdditions
*
* © 2015 Ellpeck
* © 2015 Ellpeck
*/
package ellpeck.actuallyadditions.blocks;
@ -32,7 +32,9 @@ import java.util.Random;
public class BlockOilGenerator extends BlockContainerBase implements IActAddItemOrBlock{
@SideOnly(Side.CLIENT)
private IIcon topIcon;
@SideOnly(Side.CLIENT)
private IIcon bottomIcon;
public BlockOilGenerator(){
@ -50,6 +52,7 @@ public class BlockOilGenerator extends BlockContainerBase implements IActAddItem
}
@Override
@SideOnly(Side.CLIENT)
public IIcon getIcon(int side, int meta){
return side <= 1 ? (side == 0 ? this.bottomIcon : this.topIcon) : this.blockIcon;
}

View file

@ -1,88 +0,0 @@
/*
* This file ("BlockOreMagnet.java") is part of the Actually Additions Mod for Minecraft.
* It is created and owned by Ellpeck and distributed
* under the Actually Additions License to be found at
* http://github.com/Ellpeck/ActuallyAdditions/blob/master/README.md
* View the source code at https://github.com/Ellpeck/ActuallyAdditions
*
* © 2015 Ellpeck
*/
package ellpeck.actuallyadditions.blocks;
import cpw.mods.fml.relauncher.Side;
import cpw.mods.fml.relauncher.SideOnly;
import ellpeck.actuallyadditions.ActuallyAdditions;
import ellpeck.actuallyadditions.inventory.GuiHandler;
import ellpeck.actuallyadditions.tile.TileEntityOreMagnet;
import ellpeck.actuallyadditions.util.IActAddItemOrBlock;
import ellpeck.actuallyadditions.util.ModUtil;
import net.minecraft.block.Block;
import net.minecraft.block.material.Material;
import net.minecraft.client.renderer.texture.IIconRegister;
import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.item.EnumRarity;
import net.minecraft.item.ItemStack;
import net.minecraft.tileentity.TileEntity;
import net.minecraft.util.IIcon;
import net.minecraft.world.World;
public class BlockOreMagnet extends BlockContainerBase implements IActAddItemOrBlock{
private IIcon topIcon;
private IIcon bottomIcon;
public BlockOreMagnet(){
super(Material.rock);
this.setHarvestLevel("pickaxe", 0);
this.setHardness(1.5F);
this.setResistance(10.0F);
this.setStepSound(soundTypeStone);
}
@Override
public TileEntity createNewTileEntity(World world, int par2){
return new TileEntityOreMagnet();
}
@Override
public IIcon getIcon(int side, int meta){
return (side == 1 ? this.topIcon : (side == 0 ? this.bottomIcon : this.blockIcon));
}
@Override
public boolean onBlockActivated(World world, int x, int y, int z, EntityPlayer player, int par6, float par7, float par8, float par9){
if(!world.isRemote){
TileEntityOreMagnet magnet = (TileEntityOreMagnet)world.getTileEntity(x, y, z);
if(magnet != null){
player.openGui(ActuallyAdditions.instance, GuiHandler.GuiTypes.ORE_MAGNET.ordinal(), world, x, y, z);
}
return true;
}
return true;
}
@Override
@SideOnly(Side.CLIENT)
public void registerBlockIcons(IIconRegister iconReg){
this.blockIcon = iconReg.registerIcon(ModUtil.MOD_ID_LOWER+":"+this.getName());
this.topIcon = iconReg.registerIcon(ModUtil.MOD_ID_LOWER+":"+this.getName()+"Top");
this.bottomIcon = iconReg.registerIcon(ModUtil.MOD_ID_LOWER+":"+this.getName()+"Bottom");
}
@Override
public String getName(){
return "blockOreMagnet";
}
@Override
public EnumRarity getRarity(ItemStack stack){
return EnumRarity.epic;
}
@Override
public void breakBlock(World world, int x, int y, int z, Block block, int par6){
this.dropInventory(world, x, y, z);
super.breakBlock(world, x, y, z, block, par6);
}
}

View file

@ -5,7 +5,7 @@
* http://github.com/Ellpeck/ActuallyAdditions/blob/master/README.md
* View the source code at https://github.com/Ellpeck/ActuallyAdditions
*
* © 2015 Ellpeck
* © 2015 Ellpeck
*/
package ellpeck.actuallyadditions.blocks;
@ -37,6 +37,7 @@ public class BlockPhantom extends BlockContainerBase implements IActAddItemOrBlo
public Type type;
public int range;
@SideOnly(Side.CLIENT)
private IIcon iconSeasonal;
public BlockPhantom(Type type){
@ -80,6 +81,7 @@ public class BlockPhantom extends BlockContainerBase implements IActAddItemOrBlo
}
@Override
@SideOnly(Side.CLIENT)
public IIcon getIcon(int side, int metadata){
return (this.type == Type.FACE && ClientProxy.pumpkinBlurPumpkinBlur && side > 1) ? this.iconSeasonal : this.blockIcon;
}

View file

@ -5,7 +5,7 @@
* http://github.com/Ellpeck/ActuallyAdditions/blob/master/README.md
* View the source code at https://github.com/Ellpeck/ActuallyAdditions
*
* © 2015 Ellpeck
* © 2015 Ellpeck
*/
package ellpeck.actuallyadditions.blocks;
@ -48,6 +48,7 @@ public class BlockPhantomBooster extends BlockContainerBase implements IActAddIt
}
@Override
@SideOnly(Side.CLIENT)
public IIcon getIcon(int side, int metadata){
return this.blockIcon;
}

View file

@ -5,7 +5,7 @@
* http://github.com/Ellpeck/ActuallyAdditions/blob/master/README.md
* View the source code at https://github.com/Ellpeck/ActuallyAdditions
*
* © 2015 Ellpeck
* © 2015 Ellpeck
*/
package ellpeck.actuallyadditions.blocks;
@ -31,14 +31,16 @@ public class BlockPlant extends BlockCrops implements IActAddItemOrBlock{
public Item seedItem;
public Item returnItem;
public int returnMeta;
@SideOnly(Side.CLIENT)
private IIcon[] textures;
private int stages;
private String name;
private int minDropAmount;
private int addDropAmount;
public BlockPlant(String name, int stages, int minDropAmount, int addDropAmount){
this.name = name;
this.textures = new IIcon[stages];
this.stages = stages;
this.minDropAmount = minDropAmount;
this.addDropAmount = addDropAmount;
}
@ -80,6 +82,7 @@ public class BlockPlant extends BlockCrops implements IActAddItemOrBlock{
@Override
@SideOnly(Side.CLIENT)
public void registerBlockIcons(IIconRegister iconReg){
this.textures = new IIcon[this.stages];
for(int i = 0; i < this.textures.length; i++){
textures[i] = iconReg.registerIcon(ModUtil.MOD_ID_LOWER+":"+this.getName()+"Stage"+(i+1));
}

View file

@ -5,7 +5,7 @@
* http://github.com/Ellpeck/ActuallyAdditions/blob/master/README.md
* View the source code at https://github.com/Ellpeck/ActuallyAdditions
*
* © 2015 Ellpeck
* © 2015 Ellpeck
*/
package ellpeck.actuallyadditions.blocks;
@ -43,6 +43,7 @@ public class BlockRangedCollector extends BlockContainerBase implements IActAddI
}
@Override
@SideOnly(Side.CLIENT)
public IIcon getIcon(int side, int meta){
return this.blockIcon;
}

View file

@ -5,18 +5,20 @@
* http://github.com/Ellpeck/ActuallyAdditions/blob/master/README.md
* View the source code at https://github.com/Ellpeck/ActuallyAdditions
*
* © 2015 Ellpeck
* © 2015 Ellpeck
*/
package ellpeck.actuallyadditions.blocks;
import cpw.mods.fml.relauncher.Side;
import cpw.mods.fml.relauncher.SideOnly;
import ellpeck.actuallyadditions.items.ItemBlockBase;
import ellpeck.actuallyadditions.util.IActAddItemOrBlock;
import net.minecraft.block.Block;
import net.minecraft.block.material.Material;
import net.minecraft.client.renderer.texture.IIconRegister;
import net.minecraft.entity.Entity;
import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.item.EnumRarity;
import net.minecraft.item.ItemStack;
import net.minecraft.util.AxisAlignedBB;
@ -100,4 +102,41 @@ public class BlockSlabs extends Block implements IActAddItemOrBlock{
public EnumRarity getRarity(ItemStack stack){
return EnumRarity.common;
}
public static class TheItemBlock extends ItemBlockBase{
public TheItemBlock(Block block){
super(block);
this.setHasSubtypes(false);
this.setMaxDamage(0);
}
@Override
public int getMetadata(int meta){
return meta;
}
@Override
public EnumRarity getRarity(ItemStack stack){
EnumRarity rarity = ((IActAddItemOrBlock)this.field_150939_a).getRarity(stack);
return rarity == null ? EnumRarity.common : rarity;
}
@Override
public boolean onItemUse(ItemStack stack, EntityPlayer player, World world, int x, int y, int z, int side, float hitX, float hitY, float hitZ){
if(world.getBlock(x, y, z) == this.field_150939_a && ((side == 1 && world.getBlockMetadata(x, y, z) == 0) || (side == 0 && world.getBlockMetadata(x, y, z) == 1))){
if(world.setBlock(x, y, z, ((BlockSlabs)this.field_150939_a).fullBlock, 0, 3)){
world.playSoundEffect(x+0.5F, y+0.5F, z+0.5F, this.field_150939_a.stepSound.getBreakSound(), (this.field_150939_a.stepSound.getVolume()+1.0F)/2.0F, this.field_150939_a.stepSound.getPitch()*0.8F);
stack.stackSize--;
return true;
}
}
return super.onItemUse(stack, player, world, x, y, z, side, hitX, hitY, hitZ);
}
@Override
public String getUnlocalizedName(ItemStack stack){
return this.getUnlocalizedName();
}
}
}

View file

@ -5,7 +5,7 @@
* http://github.com/Ellpeck/ActuallyAdditions/blob/master/README.md
* View the source code at https://github.com/Ellpeck/ActuallyAdditions
*
* © 2015 Ellpeck
* © 2015 Ellpeck
*/
package ellpeck.actuallyadditions.blocks;
@ -14,7 +14,6 @@ import cpw.mods.fml.relauncher.Side;
import cpw.mods.fml.relauncher.SideOnly;
import ellpeck.actuallyadditions.ActuallyAdditions;
import ellpeck.actuallyadditions.inventory.GuiHandler;
import ellpeck.actuallyadditions.proxy.ClientProxy;
import ellpeck.actuallyadditions.tile.TileEntitySmileyCloud;
import ellpeck.actuallyadditions.util.AssetUtil;
import ellpeck.actuallyadditions.util.IActAddItemOrBlock;
@ -52,6 +51,7 @@ public class BlockSmileyCloud extends BlockContainerBase implements IActAddItemO
}
@Override
@SideOnly(Side.CLIENT)
public IIcon getIcon(int side, int metadata){
return this.blockIcon;
}
@ -91,11 +91,6 @@ public class BlockSmileyCloud extends BlockContainerBase implements IActAddItemO
}
}
@Override
public String getUnlocalizedName(){
return super.getUnlocalizedName()+(ClientProxy.bulletForMyValentine ? "Valentine" : "");
}
@Override
public void onBlockPlacedBy(World world, int x, int y, int z, EntityLivingBase player, ItemStack stack){
int rotation = MathHelper.floor_double((double)(player.rotationYaw*4.0F/360.0F)+0.5D) & 3;

View file

@ -5,7 +5,7 @@
* http://github.com/Ellpeck/ActuallyAdditions/blob/master/README.md
* View the source code at https://github.com/Ellpeck/ActuallyAdditions
*
* © 2015 Ellpeck
* © 2015 Ellpeck
*/
package ellpeck.actuallyadditions.blocks;

View file

@ -5,7 +5,7 @@
* http://github.com/Ellpeck/ActuallyAdditions/blob/master/README.md
* View the source code at https://github.com/Ellpeck/ActuallyAdditions
*
* © 2015 Ellpeck
* © 2015 Ellpeck
*/
package ellpeck.actuallyadditions.blocks;
@ -36,8 +36,11 @@ import java.util.Random;
public class BlockTreasureChest extends Block implements IActAddItemOrBlock{
@SideOnly(Side.CLIENT)
private IIcon topIcon;
@SideOnly(Side.CLIENT)
private IIcon bottomIcon;
@SideOnly(Side.CLIENT)
private IIcon frontIcon;
public BlockTreasureChest(){
@ -50,6 +53,7 @@ public class BlockTreasureChest extends Block implements IActAddItemOrBlock{
}
@Override
@SideOnly(Side.CLIENT)
public IIcon getIcon(IBlockAccess world, int x, int y, int z, int side){
int meta = world.getBlockMetadata(x, y, z);
if(side == 1){
@ -65,6 +69,7 @@ public class BlockTreasureChest extends Block implements IActAddItemOrBlock{
}
@Override
@SideOnly(Side.CLIENT)
public IIcon getIcon(int side, int meta){
if(side == 1){
return this.topIcon;

View file

@ -5,7 +5,7 @@
* http://github.com/Ellpeck/ActuallyAdditions/blob/master/README.md
* View the source code at https://github.com/Ellpeck/ActuallyAdditions
*
* © 2015 Ellpeck
* © 2015 Ellpeck
*/
package ellpeck.actuallyadditions.blocks;
@ -33,7 +33,6 @@ import java.util.List;
public class BlockWildPlant extends BlockBush implements IActAddItemOrBlock{
public static final TheWildPlants[] allWildPlants = TheWildPlants.values();
public IIcon[] textures = new IIcon[allWildPlants.length];
public BlockWildPlant(){
this.setStepSound(soundTypeGrass);
@ -45,6 +44,7 @@ public class BlockWildPlant extends BlockBush implements IActAddItemOrBlock{
}
@Override
@SideOnly(Side.CLIENT)
public IIcon getIcon(int side, int metadata){
return metadata >= allWildPlants.length ? null : allWildPlants[metadata].wildVersionOf.getIcon(0, 7);
}
@ -98,8 +98,8 @@ public class BlockWildPlant extends BlockBush implements IActAddItemOrBlock{
this.setMaxDamage(0);
}
@SideOnly(Side.CLIENT)
@Override
@SideOnly(Side.CLIENT)
public IIcon getIconFromDamage(int meta){
return this.field_150939_a.getIcon(0, meta);
}

View file

@ -5,7 +5,7 @@
* http://github.com/Ellpeck/ActuallyAdditions/blob/master/README.md
* View the source code at https://github.com/Ellpeck/ActuallyAdditions
*
* © 2015 Ellpeck
* © 2015 Ellpeck
*/
package ellpeck.actuallyadditions.blocks;
@ -35,7 +35,9 @@ import net.minecraft.world.World;
public class BlockXPSolidifier extends BlockContainerBase implements IActAddItemOrBlock{
@SideOnly(Side.CLIENT)
private IIcon topIcon;
@SideOnly(Side.CLIENT)
private IIcon frontIcon;
public BlockXPSolidifier(){
@ -52,6 +54,7 @@ public class BlockXPSolidifier extends BlockContainerBase implements IActAddItem
}
@Override
@SideOnly(Side.CLIENT)
public IIcon getIcon(IBlockAccess world, int x, int y, int z, int side){
int meta = world.getBlockMetadata(x, y, z);
if(side == 1 || side == 0){
@ -64,6 +67,7 @@ public class BlockXPSolidifier extends BlockContainerBase implements IActAddItem
}
@Override
@SideOnly(Side.CLIENT)
public IIcon getIcon(int side, int meta){
if(side == 1 || side == 0){
return this.topIcon;

View file

@ -5,7 +5,7 @@
* http://github.com/Ellpeck/ActuallyAdditions/blob/master/README.md
* View the source code at https://github.com/Ellpeck/ActuallyAdditions
*
* © 2015 Ellpeck
* © 2015 Ellpeck
*/
package ellpeck.actuallyadditions.blocks;

View file

@ -5,7 +5,7 @@
* http://github.com/Ellpeck/ActuallyAdditions/blob/master/README.md
* View the source code at https://github.com/Ellpeck/ActuallyAdditions
*
* © 2015 Ellpeck
* © 2015 Ellpeck
*/
package ellpeck.actuallyadditions.blocks;
@ -89,7 +89,6 @@ public class InitBlocks{
public static Block blockTreasureChest;
public static Block blockXPSolidifier;
public static Block blockOreMagnet;
public static Block blockSmileyCloud;
@ -99,14 +98,14 @@ public class InitBlocks{
public static Block blockLaserRelay;
//TODO: Plan for Laser Power Transmitters:
//TODO: When there is a block in the way, they don't render their laser and don't transmit
//TODO: They stay connected and can be connected together even though they're blocked
//TODO: If blocked, they display the block coords blocking them on right-click
public static Block blockBlackLotus;
public static void init(){
ModUtil.LOGGER.info("Initializing Blocks...");
blockBlackLotus = new BlockBlackLotus();
BlockUtil.register(blockBlackLotus);
blockLaserRelay = new BlockLaserRelay();
BlockUtil.register(blockLaserRelay);
@ -122,9 +121,6 @@ public class InitBlocks{
blockSmileyCloud = new BlockSmileyCloud();
BlockUtil.register(blockSmileyCloud);
blockOreMagnet = new BlockOreMagnet();
BlockUtil.register(blockOreMagnet);
blockXPSolidifier = new BlockXPSolidifier();
BlockUtil.register(blockXPSolidifier);
@ -137,9 +133,9 @@ public class InitBlocks{
blockTestifiBucksWhiteStairs = new BlockStair(blockTestifiBucksWhiteWall, "blockTestifiBucksWhiteStairs");
BlockUtil.register(blockTestifiBucksWhiteStairs);
blockTestifiBucksGreenSlab = new BlockSlabs("blockTestifiBucksGreenSlab", blockTestifiBucksGreenWall);
BlockUtil.register(blockTestifiBucksGreenSlab);
BlockUtil.register(blockTestifiBucksGreenSlab, BlockSlabs.TheItemBlock.class);
blockTestifiBucksWhiteSlab = new BlockSlabs("blockTestifiBucksWhiteSlab", blockTestifiBucksWhiteWall);
BlockUtil.register(blockTestifiBucksWhiteSlab);
BlockUtil.register(blockTestifiBucksWhiteSlab, BlockSlabs.TheItemBlock.class);
blockColoredLamp = new BlockColoredLamp(false);
BlockUtil.register(blockColoredLamp, BlockColoredLamp.TheItemBlock.class);
@ -188,19 +184,19 @@ public class InitBlocks{
BlockUtil.register(blockFermentingBarrel);
blockRice = new BlockPlant("blockRice", 6, 1, 2);
BlockUtil.register(blockRice, false);
BlockUtil.register(blockRice);
CompatUtil.registerMFRPlant(blockRice);
blockCanola = new BlockPlant("blockCanola", 4, 3, 3);
BlockUtil.register(blockCanola, false);
BlockUtil.register(blockCanola);
CompatUtil.registerMFRPlant(blockCanola);
blockFlax = new BlockPlant("blockFlax", 6, 2, 4);
BlockUtil.register(blockFlax, false);
BlockUtil.register(blockFlax);
CompatUtil.registerMFRPlant(blockFlax);
blockCoffee = new BlockPlant("blockCoffee", 6, 2, 2);
BlockUtil.register(blockCoffee, false);
BlockUtil.register(blockCoffee);
CompatUtil.registerMFRPlant(blockCoffee);
blockCompost = new BlockCompost();
@ -267,7 +263,7 @@ public class InitBlocks{
BlockUtil.register(blockPhantomBooster);
blockWildPlant = new BlockWildPlant();
BlockUtil.register(blockWildPlant, BlockWildPlant.TheItemBlock.class, false);
BlockUtil.register(blockWildPlant, BlockWildPlant.TheItemBlock.class);
registerFluids();
}
@ -287,7 +283,7 @@ public class InitBlocks{
//Canola Block
if(fluidCanolaOil.getBlock() == null || ConfigBoolValues.PREVENT_CANOLA_BLOCK_OVERRIDE.isEnabled()){
blockCanolaOil = new BlockFluidFlowing(fluidCanolaOil, Material.water, "blockCanolaOil");
BlockUtil.register(blockCanolaOil, false);
BlockUtil.register(blockCanolaOil);
}
else{
errorAlreadyRegistered("Canola Oil Block");
@ -308,7 +304,7 @@ public class InitBlocks{
//Oil Block
if(fluidOil.getBlock() == null || ConfigBoolValues.PREVENT_OIL_BLOCK_OVERRIDE.isEnabled()){
blockOil = new BlockFluidFlowing(fluidOil, Material.water, "blockOil");
BlockUtil.register(blockOil, false);
BlockUtil.register(blockOil);
}
else{
errorAlreadyRegistered("Oil Block");

View file

@ -5,7 +5,7 @@
* http://github.com/Ellpeck/ActuallyAdditions/blob/master/README.md
* View the source code at https://github.com/Ellpeck/ActuallyAdditions
*
* © 2015 Ellpeck
* © 2015 Ellpeck
*/
package ellpeck.actuallyadditions.blocks.metalists;

View file

@ -5,7 +5,7 @@
* http://github.com/Ellpeck/ActuallyAdditions/blob/master/README.md
* View the source code at https://github.com/Ellpeck/ActuallyAdditions
*
* © 2015 Ellpeck
* © 2015 Ellpeck
*/
package ellpeck.actuallyadditions.blocks.metalists;
@ -23,7 +23,8 @@ public enum TheMiscBlocks{
CHARCOAL_BLOCK("Charcoal", EnumRarity.common),
ENDERPEARL_BLOCK("Enderpearl", EnumRarity.rare),
LAVA_FACTORY_CASE("LavaFactoryCase", EnumRarity.uncommon),
ENDER_CASING("EnderCasing", EnumRarity.epic);
ENDER_CASING("EnderCasing", EnumRarity.epic),
IRON_CASING("IronCasing", EnumRarity.rare);
public final String name;
public final EnumRarity rarity;

View file

@ -5,7 +5,7 @@
* http://github.com/Ellpeck/ActuallyAdditions/blob/master/README.md
* View the source code at https://github.com/Ellpeck/ActuallyAdditions
*
* © 2015 Ellpeck
* © 2015 Ellpeck
*/
package ellpeck.actuallyadditions.blocks.metalists;

View file

@ -5,7 +5,7 @@
* http://github.com/Ellpeck/ActuallyAdditions/blob/master/README.md
* View the source code at https://github.com/Ellpeck/ActuallyAdditions
*
* © 2015 Ellpeck
* © 2015 Ellpeck
*/
package ellpeck.actuallyadditions.blocks.render;

View file

@ -5,7 +5,7 @@
* http://github.com/Ellpeck/ActuallyAdditions/blob/master/README.md
* View the source code at https://github.com/Ellpeck/ActuallyAdditions
*
* © 2015 Ellpeck
* © 2015 Ellpeck
*/
package ellpeck.actuallyadditions.blocks.render;

View file

@ -5,7 +5,7 @@
* http://github.com/Ellpeck/ActuallyAdditions/blob/master/README.md
* View the source code at https://github.com/Ellpeck/ActuallyAdditions
*
* © 2015 Ellpeck
* © 2015 Ellpeck
*/
package ellpeck.actuallyadditions.blocks.render;

View file

@ -5,7 +5,7 @@
* http://github.com/Ellpeck/ActuallyAdditions/blob/master/README.md
* View the source code at https://github.com/Ellpeck/ActuallyAdditions
*
* © 2015 Ellpeck
* © 2015 Ellpeck
*/
package ellpeck.actuallyadditions.blocks.render;

View file

@ -5,7 +5,7 @@
* http://github.com/Ellpeck/ActuallyAdditions/blob/master/README.md
* View the source code at https://github.com/Ellpeck/ActuallyAdditions
*
* © 2015 Ellpeck
* © 2015 Ellpeck
*/
package ellpeck.actuallyadditions.blocks.render;

View file

@ -5,20 +5,14 @@
* http://github.com/Ellpeck/ActuallyAdditions/blob/master/README.md
* View the source code at https://github.com/Ellpeck/ActuallyAdditions
*
* © 2015 Ellpeck
* © 2015 Ellpeck
*/
package ellpeck.actuallyadditions.blocks.render;
import ellpeck.actuallyadditions.misc.LaserRelayConnectionHandler;
import ellpeck.actuallyadditions.tile.TileEntityLaserRelay;
import ellpeck.actuallyadditions.util.WorldPos;
import net.minecraft.client.model.ModelRenderer;
import net.minecraft.tileentity.TileEntity;
import org.lwjgl.opengl.GL11;
import java.util.ArrayList;
/**
* Made by Canitzp.
* Thanks. Seriously. It looks really awesome. I don't think I could do this.
@ -185,21 +179,6 @@ public class ModelLaserRelay extends ModelBaseAA{
return "modelLaserRelay";
}
@Override
public void renderExtra(float f, TileEntity tile){
TileEntityLaserRelay relay = (TileEntityLaserRelay)tile;
WorldPos firstWP = new WorldPos(relay.getWorldObj(), relay.xCoord, relay.yCoord, relay.zCoord);
ArrayList<LaserRelayConnectionHandler.ConnectionPair> network = LaserRelayConnectionHandler.getInstance().getNetworkFor(firstWP);
if(network != null){
for(LaserRelayConnectionHandler.ConnectionPair aPair : network){
TileEntityLaserRelay firstRelay = (TileEntityLaserRelay) aPair.firstRelay.getTileEntity();
if(aPair.contains(firstWP) && aPair.firstRelay.isEqual(firstWP)){
firstRelay.drawLine(aPair.firstRelay, aPair.secondRelay);
}
}
}
}
@Override
public boolean doesRotate(){
return true;

View file

@ -5,7 +5,7 @@
* http://github.com/Ellpeck/ActuallyAdditions/blob/master/README.md
* View the source code at https://github.com/Ellpeck/ActuallyAdditions
*
* © 2015 Ellpeck
* © 2015 Ellpeck
*/
package ellpeck.actuallyadditions.blocks.render;

View file

@ -5,7 +5,7 @@
* http://github.com/Ellpeck/ActuallyAdditions/blob/master/README.md
* View the source code at https://github.com/Ellpeck/ActuallyAdditions
*
* © 2015 Ellpeck
* © 2015 Ellpeck
*/
package ellpeck.actuallyadditions.blocks.render;

View file

@ -5,7 +5,7 @@
* http://github.com/Ellpeck/ActuallyAdditions/blob/master/README.md
* View the source code at https://github.com/Ellpeck/ActuallyAdditions
*
* © 2015 Ellpeck
* © 2015 Ellpeck
*/
package ellpeck.actuallyadditions.blocks.render;

View file

@ -5,13 +5,12 @@
* http://github.com/Ellpeck/ActuallyAdditions/blob/master/README.md
* View the source code at https://github.com/Ellpeck/ActuallyAdditions
*
* © 2015 Ellpeck
* © 2015 Ellpeck
*/
package ellpeck.actuallyadditions.blocks.render;
import net.minecraft.tileentity.TileEntity;
import net.minecraft.util.ResourceLocation;
import org.lwjgl.opengl.GL11;
@ -54,11 +53,7 @@ public class RenderLaserRelay extends RenderTileEntity{
}
theModel.render(0.0625F);
//A Random texture, so it is a smooth Laser!
bindTexture(new ResourceLocation("actuallyadditions:textures/blocks/blockBreaker.png"));
theModel.renderExtra(0.0625F, tile);
GL11.glPopMatrix();
}
}

View file

@ -5,7 +5,7 @@
* http://github.com/Ellpeck/ActuallyAdditions/blob/master/README.md
* View the source code at https://github.com/Ellpeck/ActuallyAdditions
*
* © 2015 Ellpeck
* © 2015 Ellpeck
*/
package ellpeck.actuallyadditions.blocks.render;

View file

@ -5,7 +5,7 @@
* http://github.com/Ellpeck/ActuallyAdditions/blob/master/README.md
* View the source code at https://github.com/Ellpeck/ActuallyAdditions
*
* © 2015 Ellpeck
* © 2015 Ellpeck
*/
package ellpeck.actuallyadditions.blocks.render;

View file

@ -5,7 +5,7 @@
* http://github.com/Ellpeck/ActuallyAdditions/blob/master/README.md
* View the source code at https://github.com/Ellpeck/ActuallyAdditions
*
* © 2015 Ellpeck
* © 2015 Ellpeck
*/
package ellpeck.actuallyadditions.booklet;
@ -44,14 +44,14 @@ public class BookletChapter{
return this.unlocalizedName;
}
public String getLocalizedName(){
return StringUtil.localize("booklet."+ModUtil.MOD_ID_LOWER+".chapter."+this.unlocalizedName+".name");
}
public String getNameWithColor(){
return this.color+this.getLocalizedName();
}
public String getLocalizedName(){
return StringUtil.localize("booklet."+ModUtil.MOD_ID_LOWER+".chapter."+this.unlocalizedName+".name");
}
public BookletChapter setImportant(){
this.color = EnumChatFormatting.DARK_GREEN;
return this;

View file

@ -5,7 +5,7 @@
* http://github.com/Ellpeck/ActuallyAdditions/blob/master/README.md
* View the source code at https://github.com/Ellpeck/ActuallyAdditions
*
* © 2015 Ellpeck
* © 2015 Ellpeck
*/
package ellpeck.actuallyadditions.booklet;

View file

@ -5,7 +5,7 @@
* http://github.com/Ellpeck/ActuallyAdditions/blob/master/README.md
* View the source code at https://github.com/Ellpeck/ActuallyAdditions
*
* © 2015 Ellpeck
* © 2015 Ellpeck
*/
package ellpeck.actuallyadditions.booklet;

View file

@ -5,7 +5,7 @@
* http://github.com/Ellpeck/ActuallyAdditions/blob/master/README.md
* View the source code at https://github.com/Ellpeck/ActuallyAdditions
*
* © 2015 Ellpeck
* © 2015 Ellpeck
*/
package ellpeck.actuallyadditions.booklet;
@ -19,8 +19,8 @@ import java.util.ArrayList;
public class BookletIndexEntry{
private final String unlocalizedName;
private EnumChatFormatting color;
public ArrayList<BookletChapter> chapters = new ArrayList<BookletChapter>();
private EnumChatFormatting color;
public BookletIndexEntry(String unlocalizedName){
this.unlocalizedName = unlocalizedName;
@ -37,14 +37,14 @@ public class BookletIndexEntry{
this.chapters.add(chapter);
}
public String getLocalizedName(){
return StringUtil.localize("booklet."+ModUtil.MOD_ID_LOWER+".indexEntry."+this.unlocalizedName+".name");
}
public String getNameWithColor(){
return this.color+this.getLocalizedName();
}
public String getLocalizedName(){
return StringUtil.localize("booklet."+ModUtil.MOD_ID_LOWER+".indexEntry."+this.unlocalizedName+".name");
}
public BookletIndexEntry setImportant(){
this.color = EnumChatFormatting.DARK_GREEN;
return this;

View file

@ -5,7 +5,7 @@
* http://github.com/Ellpeck/ActuallyAdditions/blob/master/README.md
* View the source code at https://github.com/Ellpeck/ActuallyAdditions
*
* © 2015 Ellpeck
* © 2015 Ellpeck
*/
package ellpeck.actuallyadditions.booklet;

View file

@ -5,7 +5,7 @@
* http://github.com/Ellpeck/ActuallyAdditions/blob/master/README.md
* View the source code at https://github.com/Ellpeck/ActuallyAdditions
*
* © 2015 Ellpeck
* © 2015 Ellpeck
*/
package ellpeck.actuallyadditions.booklet;
@ -16,10 +16,7 @@ import ellpeck.actuallyadditions.booklet.page.BookletPage;
import ellpeck.actuallyadditions.config.GuiConfiguration;
import ellpeck.actuallyadditions.proxy.ClientProxy;
import ellpeck.actuallyadditions.update.UpdateChecker;
import ellpeck.actuallyadditions.util.AssetUtil;
import ellpeck.actuallyadditions.util.ModUtil;
import ellpeck.actuallyadditions.util.StringUtil;
import ellpeck.actuallyadditions.util.Util;
import ellpeck.actuallyadditions.util.*;
import ellpeck.actuallyadditions.util.playerdata.PersistentClientData;
import net.minecraft.client.Minecraft;
import net.minecraft.client.gui.GuiButton;
@ -27,6 +24,7 @@ import net.minecraft.client.gui.GuiScreen;
import net.minecraft.client.gui.GuiTextField;
import net.minecraft.client.renderer.OpenGlHelper;
import net.minecraft.util.EnumChatFormatting;
import net.minecraft.util.IChatComponent;
import net.minecraft.util.ResourceLocation;
import org.lwjgl.opengl.GL11;
@ -35,14 +33,15 @@ import java.net.URI;
import java.util.ArrayList;
import java.util.Collections;
import java.util.List;
import java.util.Locale;
@SideOnly(Side.CLIENT)
public class GuiBooklet extends GuiScreen{
public static final ResourceLocation resLoc = AssetUtil.getGuiLocation("guiBooklet");
public static final ResourceLocation resLocHalloween = AssetUtil.getGuiLocation("guiBookletHalloween");
public static final ResourceLocation resLocChristmas = AssetUtil.getGuiLocation("guiBookletChristmas");
public static final ResourceLocation resLocValentine = AssetUtil.getGuiLocation("guiBookletValentinesDay");
public static final ResourceLocation resLoc = AssetUtil.getBookletGuiLocation("guiBooklet");
public static final ResourceLocation resLocHalloween = AssetUtil.getBookletGuiLocation("guiBookletHalloween");
public static final ResourceLocation resLocChristmas = AssetUtil.getBookletGuiLocation("guiBookletChristmas");
public static final ResourceLocation resLocValentine = AssetUtil.getBookletGuiLocation("guiBookletValentinesDay");
public static final int CHAPTER_BUTTONS_AMOUNT = 13;
public static final int TOOLTIP_SPLIT_LENGTH = 200;
public int xSize;
@ -54,17 +53,17 @@ public class GuiBooklet extends GuiScreen{
public BookletIndexEntry currentIndexEntry;
public int pageOpenInIndex;
public int indexPageAmount;
public GuiButton buttonForward;
public GuiButton buttonBackward;
public GuiButton buttonPreviousScreen;
public GuiButton buttonPreviouslyOpenedGui;
public GuiButton buttonUpdate;
public GuiButton buttonTwitter;
public GuiButton buttonForum;
public GuiButton buttonAchievements;
public GuiButton buttonConfig;
public GuiButton[] chapterButtons = new GuiButton[CHAPTER_BUTTONS_AMOUNT];
private GuiTextField searchField;
private GuiButton buttonForward;
private GuiButton buttonBackward;
private GuiButton buttonPreviousScreen;
private GuiButton buttonPreviouslyOpenedGui;
private GuiButton buttonUpdate;
private GuiButton buttonTwitter;
private GuiButton buttonForum;
private GuiButton buttonAchievements;
private GuiButton buttonConfig;
private GuiButton[] chapterButtons = new GuiButton[CHAPTER_BUTTONS_AMOUNT];
public GuiTextField searchField;
private int ticksElapsed;
private boolean mousePressed;
@ -149,20 +148,16 @@ public class GuiBooklet extends GuiScreen{
}
//Update Checker Hover Text
if(x >= this.guiLeft-11 && x <= this.guiLeft-11+10 && y >= this.guiTop-11 && y <= this.guiTop-11+10){
if(UpdateChecker.doneChecking){
ArrayList list = new ArrayList();
if(UpdateChecker.checkFailed){
list.add(EnumChatFormatting.DARK_RED+"The Update Check failed!");
list.add("Check your log for more Information!");
}
else if(UpdateChecker.updateVersion > UpdateChecker.clientVersion){
list.add(EnumChatFormatting.GOLD+"There is an Update available!");
list.add(EnumChatFormatting.ITALIC+"You have: "+ModUtil.VERSION+", Newest: "+UpdateChecker.updateVersionS);
list.addAll(this.fontRendererObj.listFormattedStringToWidth(EnumChatFormatting.ITALIC+"Updates include: "+UpdateChecker.changelog, TOOLTIP_SPLIT_LENGTH));
list.add(EnumChatFormatting.GRAY+"Click this button to visit the download page!");
}
this.func_146283_a(list, x, y);
ArrayList list = new ArrayList();
if(UpdateChecker.checkFailed){
list.add(IChatComponent.Serializer.func_150699_a(StringUtil.localize("info."+ModUtil.MOD_ID_LOWER+".update.failed")).getFormattedText());
}
else if(UpdateChecker.needsUpdateNotify){
list.add(IChatComponent.Serializer.func_150699_a(StringUtil.localize("info."+ModUtil.MOD_ID_LOWER+".update.generic")).getFormattedText());
list.add(IChatComponent.Serializer.func_150699_a(StringUtil.localizeFormatted("info."+ModUtil.MOD_ID_LOWER+".update.versionCompare", ModUtil.VERSION, UpdateChecker.updateVersion)).getFormattedText());
list.add(StringUtil.localize("info."+ModUtil.MOD_ID_LOWER+".update.buttonOptions"));
}
this.func_146283_a(list, x, y);
}
this.fontRendererObj.setUnicodeFlag(unicodeBefore);
@ -172,34 +167,37 @@ public class GuiBooklet extends GuiScreen{
}
}
@SuppressWarnings("unchecked")
@Override
public void keyTyped(char theChar, int key){
if(key != 1 && this.searchField.isFocused()){
this.searchField.textboxKeyTyped(theChar, key);
if(this.currentIndexEntry instanceof BookletEntryAllSearch){
BookletEntryAllSearch currentEntry = (BookletEntryAllSearch)this.currentIndexEntry;
if(this.searchField.getText() != null && !this.searchField.getText().isEmpty()){
currentEntry.chapters.clear();
for(BookletChapter chapter : currentEntry.allChapters){
if(chapter.getLocalizedName().toLowerCase().contains(this.searchField.getText().toLowerCase())){
currentEntry.chapters.add(chapter);
}
}
}
else{
currentEntry.chapters = (ArrayList<BookletChapter>)currentEntry.allChapters.clone();
}
this.openIndexEntry(this.currentIndexEntry, this.pageOpenInIndex, false);
}
this.updateSearchBar();
}
else{
super.keyTyped(theChar, key);
}
}
@SuppressWarnings("unchecked")
public void updateSearchBar(){
if(this.currentIndexEntry instanceof BookletEntryAllSearch){
BookletEntryAllSearch currentEntry = (BookletEntryAllSearch)this.currentIndexEntry;
if(this.searchField.getText() != null && !this.searchField.getText().isEmpty()){
currentEntry.chapters.clear();
for(BookletChapter chapter : currentEntry.allChapters){
if(chapter.getLocalizedName().toLowerCase(Locale.ROOT).contains(this.searchField.getText().toLowerCase(Locale.ROOT))){
currentEntry.chapters.add(chapter);
}
}
}
else{
currentEntry.chapters = (ArrayList<BookletChapter>)currentEntry.allChapters.clone();
}
this.openIndexEntry(this.currentIndexEntry, this.pageOpenInIndex, false);
}
}
@Override
protected void mouseClicked(int par1, int par2, int par3){
this.searchField.mouseClicked(par1, par2, par3);
@ -219,10 +217,15 @@ public class GuiBooklet extends GuiScreen{
}
}
else if(button == this.buttonUpdate){
if(UpdateChecker.doneChecking && UpdateChecker.updateVersion > UpdateChecker.clientVersion){
if(UpdateChecker.needsUpdateNotify){
try{
if(Desktop.isDesktopSupported()){
Desktop.getDesktop().browse(new URI(UpdateChecker.DOWNLOAD_LINK));
if(KeyUtil.isShiftPressed()){
Desktop.getDesktop().browse(new URI(UpdateChecker.DOWNLOAD_LINK));
}
else{
Desktop.getDesktop().browse(new URI(UpdateChecker.CHANGELOG_LINK));
}
}
}
catch(Exception e){
@ -243,7 +246,7 @@ public class GuiBooklet extends GuiScreen{
else if(button == this.buttonForum){
try{
if(Desktop.isDesktopSupported()){
Desktop.getDesktop().browse(new URI("http://www.minecraftforum.net/forums/mapping-and-modding/minecraft-mods/wip-mods/2374910-actually-additions-a-bunch-of-awesome-gadgets"));
Desktop.getDesktop().browse(new URI("http://www.minecraftforum.net/forums/mapping-and-modding/minecraft-mods/2551118"));
}
}
catch(Exception e){
@ -335,7 +338,7 @@ public class GuiBooklet extends GuiScreen{
this.buttonList.add(this.buttonPreviouslyOpenedGui);
this.buttonUpdate = new TexturedButton(4, this.guiLeft-11, this.guiTop-11, 245, 0, 11, 11);
this.buttonUpdate.visible = UpdateChecker.doneChecking && UpdateChecker.updateVersion > UpdateChecker.clientVersion;
this.buttonUpdate.visible = UpdateChecker.needsUpdateNotify;
this.buttonList.add(this.buttonUpdate);
this.buttonTwitter = new TexturedButton(5, this.guiLeft, this.guiTop, 213, 0, 8, 8);
@ -385,7 +388,7 @@ public class GuiBooklet extends GuiScreen{
this.currentPage.updateScreen(this.ticksElapsed);
}
boolean buttonThere = UpdateChecker.doneChecking && UpdateChecker.updateVersion > UpdateChecker.clientVersion;
boolean buttonThere = UpdateChecker.needsUpdateNotify;
this.buttonUpdate.visible = buttonThere;
if(buttonThere){
if(this.ticksElapsed%8 == 0){
@ -399,7 +402,7 @@ public class GuiBooklet extends GuiScreen{
@Override
public void onGuiClosed(){
PersistentClientData.saveBookPage(this.currentIndexEntry, this.currentChapter, this.currentPage, this.pageOpenInIndex);
PersistentClientData.saveBookPage(this.currentIndexEntry, this.currentChapter, this.currentPage, this.pageOpenInIndex, this.searchField.getText());
}
@Override

View file

@ -5,7 +5,7 @@
* http://github.com/Ellpeck/ActuallyAdditions/blob/master/README.md
* View the source code at https://github.com/Ellpeck/ActuallyAdditions
*
* © 2015 Ellpeck
* © 2015 Ellpeck
*/
package ellpeck.actuallyadditions.booklet;
@ -20,7 +20,6 @@ import ellpeck.actuallyadditions.items.InitItems;
import ellpeck.actuallyadditions.items.metalists.TheFoods;
import ellpeck.actuallyadditions.items.metalists.TheMiscItems;
import ellpeck.actuallyadditions.items.metalists.TheSpecialDrops;
import ellpeck.actuallyadditions.proxy.ClientProxy;
import ellpeck.actuallyadditions.util.Util;
import net.minecraft.item.ItemStack;
import net.minecraft.item.crafting.IRecipe;
@ -46,8 +45,7 @@ public class InitBooklet{
chapterIntro = new BookletChapter("intro", entryMisc, new ItemStack(InitItems.itemLexicon), new PageTextOnly(1), new PageTextOnly(2), new PageTextOnly(3), new PageCrafting(4, ItemCrafting.recipeBook)).setImportant();
//Miscellaneous
BookletPage pageStoneCase = new PageCrafting(5, BlockCrafting.recipeStoneCase);
new BookletChapter("craftingIngs", entryMisc, new ItemStack(InitItems.itemMisc, 1, TheMiscItems.COIL.ordinal()), new PageTextOnly(1), new PageCrafting(2, ItemCrafting.recipeCoil).setNoText(), new PageCrafting(3, ItemCrafting.recipeCoilAdvanced).setNoText(), new PageCrafting(4, BlockCrafting.recipeCase).setNoText(), ClientProxy.jingleAllTheWay ? pageStoneCase : pageStoneCase.setNoText(), new PageCrafting(6, BlockCrafting.recipeEnderPearlBlock).setNoText(), new PageCrafting(7, BlockCrafting.recipeEnderCase).setNoText(), new PageCrafting(8, ItemCrafting.recipeRing).setNoText(), new PageCrafting(9, ItemCrafting.recipeKnifeHandle).setNoText(), new PageCrafting(10, ItemCrafting.recipeKnifeBlade).setNoText(), new PageCrafting(11, ItemCrafting.recipeKnife).setNoText(), new PageCrafting(12, ItemCrafting.recipeDough).setNoText(), new PageCrafting(13, ItemCrafting.recipeRiceDough).setNoText()).setImportant();
new BookletChapter("craftingIngs", entryMisc, new ItemStack(InitItems.itemMisc, 1, TheMiscItems.COIL.ordinal()), new PageTextOnly(1), new PageCrafting(2, ItemCrafting.recipeCoil).setNoText(), new PageCrafting(3, ItemCrafting.recipeCoilAdvanced).setNoText(), new PageCrafting(4, BlockCrafting.recipeCase).setNoText(), new PageCrafting(5, BlockCrafting.recipeStoneCase).setNoText(), new PageCrafting(6, BlockCrafting.recipeEnderPearlBlock).setNoText(), new PageCrafting(7, BlockCrafting.recipeEnderCase).setNoText(), new PageCrafting(8, ItemCrafting.recipeRing).setNoText(), new PageCrafting(9, ItemCrafting.recipeKnifeHandle).setNoText(), new PageCrafting(10, ItemCrafting.recipeKnifeBlade).setNoText(), new PageCrafting(11, ItemCrafting.recipeKnife).setNoText(), new PageCrafting(12, ItemCrafting.recipeDough).setNoText(), new PageCrafting(13, ItemCrafting.recipeRiceDough).setNoText(), new PageCrafting(14, BlockCrafting.recipeIronCase).setNoText()).setImportant();
new BookletChapter("quartz", entryMisc, new ItemStack(InitItems.itemMisc, 1, TheMiscItems.QUARTZ.ordinal()), new PageTextOnly(1).setStack(new ItemStack(InitBlocks.blockMisc, 1, TheMiscBlocks.ORE_QUARTZ.ordinal())).addTextReplacement("<lowest>", ConfigIntValues.BLACK_QUARTZ_MIN_HEIGHT.getValue()).addTextReplacement("<highest>", ConfigIntValues.BLACK_QUARTZ_MAX_HEIGHT.getValue()), new PageTextOnly(2).setStack(new ItemStack(InitItems.itemMisc, 1, TheMiscItems.QUARTZ.ordinal())), new PageCrafting(3, BlockCrafting.recipeQuartzBlock).setNoText(), new PageCrafting(4, BlockCrafting.recipeQuartzPillar).setNoText(), new PageCrafting(5, BlockCrafting.recipeQuartzChiseled).setNoText());
new BookletChapter("cloud", entryMisc, new ItemStack(InitBlocks.blockSmileyCloud), new PageTextOnly(1), new PageCrafting(2, BlockCrafting.recipeSmileyCloud).setNoText()).setSpecial();
new BookletChapter("coalStuff", entryMisc, new ItemStack(InitItems.itemMisc, 1, TheMiscItems.TINY_COAL.ordinal()), new PageTextOnly(1), new PageCrafting(2, ItemCrafting.recipeTinyCoal).setNoText(), new PageCrafting(3, ItemCrafting.recipeTinyChar).setNoText(), new PageCrafting(4, BlockCrafting.recipeBlockChar).setNoText());
@ -59,13 +57,14 @@ public class InitBooklet{
}
new BookletChapter("lamps", entryMisc, new ItemStack(InitBlocks.blockColoredLampOn, 1, TheColoredLampColors.GREEN.ordinal()), lampPages.toArray(new BookletPage[lampPages.size()]));
new BookletChapter("treasureChest", entryMisc, new ItemStack(InitBlocks.blockTreasureChest), new PageTextOnly(1).setStack(new ItemStack(InitBlocks.blockTreasureChest))).setSpecial();
new BookletChapter("hairBalls", entryMisc, new ItemStack(InitItems.itemHairyBall), new PageTextOnly(1).setStack(new ItemStack(InitItems.itemHairyBall))).setSpecial();
new BookletChapter("treasureChest", entryMisc, new ItemStack(InitBlocks.blockTreasureChest), new PagePicture(1, "pageTreasureChest", 150).setStack(new ItemStack(InitBlocks.blockTreasureChest)), new PageTextOnly(2)).setSpecial();
new BookletChapter("hairBalls", entryMisc, new ItemStack(InitItems.itemHairyBall), new PagePicture(1, "pageFurBalls", 110).setStack(new ItemStack(InitItems.itemHairyBall)), new PageTextOnly(2)).setSpecial();
new BookletChapter("blackLotus", entryMisc, new ItemStack(InitBlocks.blockBlackLotus), new PageTextOnly(1).setStack(new ItemStack(InitBlocks.blockBlackLotus)), new PageCrafting(2, ItemCrafting.recipeBlackDye));
//No RF Using Blocks
new BookletChapter("breaker", entryFunctionalNonRF, new ItemStack(InitBlocks.blockBreaker), new PageCrafting(1, BlockCrafting.recipeBreaker), new PageCrafting(2, BlockCrafting.recipePlacer), new PageCrafting(3, BlockCrafting.recipeLiquidPlacer), new PageCrafting(4, BlockCrafting.recipeLiquidCollector));
new BookletChapter("dropper", entryFunctionalNonRF, new ItemStack(InitBlocks.blockDropper), new PageTextOnly(1), new PageCrafting(1, BlockCrafting.recipeDropper).setNoText());
new BookletChapter("phantomfaces", entryFunctionalNonRF, new ItemStack(InitBlocks.blockPhantomLiquiface), new PageTextOnly(1).addTextReplacement("<range>", ConfigIntValues.PHANTOMFACE_RANGE.getValue()), new PageCrafting(ClientProxy.pumpkinBlurPumpkinBlur ? 666 : 2, BlockCrafting.recipePhantomface), new PageCrafting(3, BlockCrafting.recipeLiquiface), new PageCrafting(4, BlockCrafting.recipeEnergyface), new PageCrafting(5, ItemCrafting.recipePhantomConnector).setNoText(), new PageCrafting(6, BlockCrafting.recipePhantomBooster)).setImportant();
new BookletChapter("phantomfaces", entryFunctionalNonRF, new ItemStack(InitBlocks.blockPhantomLiquiface), new PageTextOnly(1).addTextReplacement("<range>", ConfigIntValues.PHANTOMFACE_RANGE.getValue()), new PageCrafting(2, BlockCrafting.recipePhantomface), new PageCrafting(3, BlockCrafting.recipeLiquiface), new PageCrafting(4, BlockCrafting.recipeEnergyface), new PageCrafting(5, ItemCrafting.recipePhantomConnector).setNoText(), new PageCrafting(6, BlockCrafting.recipePhantomBooster)).setImportant();
new BookletChapter("phantomBreaker", entryFunctionalNonRF, new ItemStack(InitBlocks.blockPhantomBreaker), new PageTextOnly(1).addTextReplacement("<range>", ConfigIntValues.PHANTOM_PLACER_RANGE.getValue()), new PageCrafting(2, BlockCrafting.recipePhantomPlacer).setNoText(), new PageCrafting(3, BlockCrafting.recipePhantomBreaker).setNoText());
new BookletChapter("esd", entryFunctionalNonRF, new ItemStack(InitBlocks.blockInputterAdvanced), new PageTextOnly(1), new PageCrafting(2, BlockCrafting.recipeESD).setNoText(), new PageCrafting(3, BlockCrafting.recipeAdvancedESD).setNoText()).setSpecial();
new BookletChapter("xpSolidifier", entryFunctionalNonRF, new ItemStack(InitBlocks.blockXPSolidifier), new PageTextOnly(1).setStack(new ItemStack(InitItems.itemSpecialDrop, 1, TheSpecialDrops.SOLIDIFIED_EXPERIENCE.ordinal())), new PageCrafting(2, BlockCrafting.recipeSolidifier).setNoText()).setSpecial();
@ -73,15 +72,15 @@ public class InitBooklet{
new BookletChapter("fishingNet", entryFunctionalNonRF, new ItemStack(InitBlocks.blockFishingNet), new PageTextOnly(1), new PageCrafting(2, BlockCrafting.recipeFisher).setNoText());
new BookletChapter("feeder", entryFunctionalNonRF, new ItemStack(InitBlocks.blockFeeder), new PageTextOnly(1), new PageCrafting(2, BlockCrafting.recipeFeeder).setNoText());
new BookletChapter("compost", entryFunctionalNonRF, new ItemStack(InitBlocks.blockCompost), new PageTextOnly(1).setStack(new ItemStack(InitItems.itemFertilizer)).addTextReplacement("<num>", ConfigIntValues.COMPOST_AMOUNT.getValue()), new PageCrafting(2, BlockCrafting.recipeCompost).setNoText(), new PageCrafting(3, ItemCrafting.recipesMashedFood));
new BookletChapter("crate", entryFunctionalNonRF, new ItemStack(InitBlocks.blockGiantChest), new PageCrafting(1, BlockCrafting.recipeCrate));
new BookletChapter("crate", entryFunctionalNonRF, new ItemStack(InitBlocks.blockGiantChest), new PageCrafting(1, BlockCrafting.recipeCrate), new PageCrafting(2, ItemCrafting.recipeChestToCrateUpgrade));
new BookletChapter("rangedCollector", entryFunctionalNonRF, new ItemStack(InitBlocks.blockRangedCollector), new PageTextOnly(1).addTextReplacement("<range>", ConfigIntValues.RANGED_COLLECTOR_RANGE.getValue()), new PageCrafting(2, BlockCrafting.recipeRangedCollector).setNoText());
//RF Using Blocks
new BookletChapterCoffee("coffeeMachine", entryFunctionalRF, new ItemStack(InitBlocks.blockCoffeeMachine), new PageTextOnly(1).setStack(new ItemStack(InitItems.itemCoffeeBean)).addTextReplacement("<rf>", ConfigIntValues.COFFEE_MACHINE_ENERGY_USED.getValue()).addTextReplacement("<coffee>", ConfigIntValues.COFFEE_CACHE_USED_PER_ITEM.getValue()).addTextReplacement("<water>", ConfigIntValues.COFFEE_MACHINE_WATER_USED.getValue()), new PageTextOnly(2).setStack(new ItemStack(InitItems.itemCoffee)), new PageCrafting(3, BlockCrafting.recipeCoffeeMachine).setNoText(), new PageCrafting(4, ItemCrafting.recipeCup).setNoText()).setImportant();
new BookletChapter("laserRelays", entryFunctionalRF, new ItemStack(InitBlocks.blockLaserRelay), new PageTextOnly(1).addTextReplacement("<range>", ConfigIntValues.LASER_RELAY_MAX_DISTANCE.getValue()).addTextReplacement("<loss>", ConfigIntValues.LASER_RELAY_LOSS.getValue()), new PagePicture(2, "pageLaserRelay", 0).setNoText(), new PageCrafting(3, BlockCrafting.recipeLaserRelay).setNoText(), new PageCrafting(4, ItemCrafting.recipeLaserWrench).setNoText()).setImportant();
new BookletChapterCoffee("coffeeMachine", entryFunctionalRF, new ItemStack(InitBlocks.blockCoffeeMachine), new PageTextOnly(1).setStack(new ItemStack(InitItems.itemCoffeeBean)).addTextReplacement("<rf>", ConfigIntValues.COFFEE_MACHINE_ENERGY_USED.getValue()).addTextReplacement("<coffee>", ConfigIntValues.COFFEE_CACHE_USED_PER_ITEM.getValue()).addTextReplacement("<water>", ConfigIntValues.COFFEE_MACHINE_WATER_USED.getValue()), new PageTextOnly(2).setStack(new ItemStack(InitItems.itemCoffee)), new PagePicture(3, "pageCoffeeMachine", 115), new PageCrafting(4, BlockCrafting.recipeCoffeeMachine).setNoText(), new PageCrafting(5, ItemCrafting.recipeCup).setNoText()).setImportant();
new BookletChapter("crusher", entryFunctionalRF, new ItemStack(InitBlocks.blockGrinderDouble), new PageTextOnly(1).addTextReplacement("<rf1>", ConfigIntValues.GRINDER_ENERGY_USED.getValue()).addTextReplacement("<rf2>", ConfigIntValues.GRINDER_DOUBLE_ENERGY_USED.getValue()), new PageCrafting(2, BlockCrafting.recipeCrusher).setNoText(), new PageCrafting(3, BlockCrafting.recipeDoubleCrusher).setNoText(), new PageCrusherRecipe(4, CrusherCrafting.recipeSugar).setNoText(), new PageCrusherRecipe(5, CrusherCrafting.recipeIronHorseArmor).setNoText(), new PageCrusherRecipe(6, CrusherCrafting.recipeGoldHorseArmor).setNoText(), new PageCrusherRecipe(7, CrusherCrafting.recipeDiamondHorseArmor).setNoText());
new BookletChapter("furnaceDouble", entryFunctionalRF, new ItemStack(InitBlocks.blockFurnaceDouble), new PageCrafting(1, BlockCrafting.recipeFurnace).addTextReplacement("<rf>", ConfigIntValues.FURNACE_ENERGY_USED.getValue()));
new BookletChapter("miner", entryFunctionalRF, new ItemStack(InitBlocks.blockOreMagnet), new PageTextOnly(1).addTextReplacement("<rf>", ConfigIntValues.ORE_MAGNET_ENERGY_USE.getValue()).addTextReplacement("<oil>", ConfigIntValues.ORE_MAGNET_OIL_USE.getValue()).addTextReplacement("<range>", ConfigIntValues.ORE_MAGNET_RANGE.getValue()), new PageCrafting(2, BlockCrafting.recipeMiner).setNoText(), new PageCrafting(3, BlockCrafting.recipeCasing).setNoText());
new BookletChapter("lavaFactory", entryFunctionalRF, new ItemStack(InitBlocks.blockLavaFactoryController), new PageTextOnly(1).addTextReplacement("<rf>", ConfigIntValues.LAVA_FACTORY_ENERGY_USED.getValue()), new PageCrafting(2, BlockCrafting.recipeLavaFactory).setNoText());
new BookletChapter("lavaFactory", entryFunctionalRF, new ItemStack(InitBlocks.blockLavaFactoryController), new PageTextOnly(1).addTextReplacement("<rf>", ConfigIntValues.LAVA_FACTORY_ENERGY_USED.getValue()), new PagePicture(2, "pageLavaFactory", 0).setNoText(), new PageCrafting(3, BlockCrafting.recipeLavaFactory).setNoText(), new PageCrafting(4, BlockCrafting.recipeCasing).setNoText());
new BookletChapter("energizer", entryFunctionalRF, new ItemStack(InitBlocks.blockEnergizer), new PageCrafting(1, BlockCrafting.recipeEnergizer), new PageCrafting(2, BlockCrafting.recipeEnervator));
new BookletChapter("repairer", entryFunctionalRF, new ItemStack(InitBlocks.blockItemRepairer), new PageCrafting(1, BlockCrafting.recipeRepairer).addTextReplacement("<rf>", ConfigIntValues.REPAIRER_ENERGY_USED.getValue()));
new BookletChapter("longRangeBreaker", entryFunctionalRF, new ItemStack(InitBlocks.blockDirectionalBreaker), new PageTextOnly(1).addTextReplacement("<rf>", ConfigIntValues.DIRECTIONAL_BREAKER_RF_PER_BLOCK.getValue()).addTextReplacement("<range>", ConfigIntValues.DIRECTIONAL_BREAKER_RANGE.getValue()), new PageCrafting(2, BlockCrafting.recipeDirectionalBreaker));
@ -95,7 +94,7 @@ public class InitBooklet{
//No RF Using Items
new BookletChapter("wings", entryItemsNonRF, new ItemStack(InitItems.itemWingsOfTheBats), new PageTextOnly(1).setStack(new ItemStack(InitItems.itemMisc, 1, TheMiscItems.BAT_WING.ordinal())), new PageCrafting(2, ItemCrafting.recipeWings).setNoText()).setSpecial();
new BookletChapter("foods", entryItemsNonRF, new ItemStack(InitItems.itemFoods, 1, TheFoods.HAMBURGER.ordinal()), new PageCrafting(1, FoodCrafting.recipePizza).setNoText(), new PageFurnace(2, new ItemStack(InitItems.itemFoods, 1, TheFoods.RICE_BREAD.ordinal())).setNoText(), new PageCrafting(3, FoodCrafting.recipeHamburger).setNoText(), new PageCrafting(4, FoodCrafting.recipeBigCookie).setNoText(), new PageCrafting(5, FoodCrafting.recipeSubSandwich).setNoText(), new PageCrafting(6, FoodCrafting.recipeFrenchFry).setNoText(), new PageCrafting(7, FoodCrafting.recipeFrenchFries).setNoText(), new PageCrafting(8, FoodCrafting.recipeFishNChips).setNoText(), new PageCrafting(9, FoodCrafting.recipeCheese).setNoText(), new PageCrafting(10, FoodCrafting.recipePumpkinStew).setNoText(), new PageCrafting(11, FoodCrafting.recipeCarrotJuice).setNoText(), new PageCrafting(12, FoodCrafting.recipeSpaghetti).setNoText(), new PageCrafting(13, FoodCrafting.recipeNoodle).setNoText(), new PageCrafting(14, FoodCrafting.recipeChocolate).setNoText(), new PageCrafting(15, FoodCrafting.recipeChocolateCake).setNoText(), new PageCrafting(16, FoodCrafting.recipeToast).setNoText(), new PageFurnace(17, new ItemStack(InitItems.itemFoods, 1, TheFoods.BAGUETTE.ordinal())).setNoText());
new BookletChapter("foods", entryItemsNonRF, new ItemStack(InitItems.itemFoods, 1, TheFoods.HAMBURGER.ordinal()), new PageCrafting(1, FoodCrafting.recipePizza).setNoText(), new PageFurnace(2, new ItemStack(InitItems.itemFoods, 1, TheFoods.RICE_BREAD.ordinal())).setNoText(), new PageCrafting(3, FoodCrafting.recipeHamburger).setNoText(), new PageCrafting(4, FoodCrafting.recipeBigCookie).setNoText(), new PageCrafting(5, FoodCrafting.recipeSubSandwich).setNoText(), new PageCrafting(6, FoodCrafting.recipeFrenchFry).setNoText(), new PageCrafting(7, FoodCrafting.recipeFrenchFries).setNoText(), new PageCrafting(8, FoodCrafting.recipeFishNChips).setNoText(), new PageCrafting(9, FoodCrafting.recipeCheese).setNoText(), new PageCrafting(10, FoodCrafting.recipePumpkinStew).setNoText(), new PageCrafting(11, FoodCrafting.recipeCarrotJuice).setNoText(), new PageCrafting(12, FoodCrafting.recipeSpaghetti).setNoText(), new PageCrafting(13, FoodCrafting.recipeNoodle).setNoText(), new PageCrafting(14, FoodCrafting.recipeChocolate).setNoText(), new PageCrafting(15, FoodCrafting.recipeChocolateCake).setNoText(), new PageCrafting(16, FoodCrafting.recipeToast).setNoText(), new PageFurnace(17, new ItemStack(InitItems.itemFoods, 1, TheFoods.BAGUETTE.ordinal())).setNoText(), new PageCrafting(18, FoodCrafting.recipeChocolateToast).setNoText());
new BookletChapter("leafBlower", entryItemsNonRF, new ItemStack(InitItems.itemLeafBlowerAdvanced), new PageTextOnly(1), new PageCrafting(2, ItemCrafting.recipeLeafBlower).setNoText(), new PageCrafting(3, ItemCrafting.recipeLeafBlowerAdvanced).setNoText()).setImportant();
ArrayList<BookletPage> aiotPages = new ArrayList<BookletPage>();
aiotPages.add(new PageTextOnly(aiotPages.size()+1));
@ -114,7 +113,7 @@ public class InitBooklet{
new BookletChapter("potionRings", entryItemsNonRF, new ItemStack(InitItems.itemPotionRing), potionRingPages.toArray(new BookletPage[potionRingPages.size()]));
//RF Using Items
new BookletChapter("drill", entryItemsRF, new ItemStack(InitItems.itemDrill), new PageTextOnly(1), new PageCrafting(2, ItemCrafting.recipeDrill).setNoText(), new PageCrafting(3, ItemCrafting.recipeDrillSpeedI).setNoText(), new PageCrafting(4, ItemCrafting.recipeDrillSpeedII).setNoText(), new PageCrafting(5, ItemCrafting.recipeDrillSpeedIII).setNoText(), new PageCrafting(6, ItemCrafting.recipeDrillFortuneI).setNoText(), new PageCrafting(7, ItemCrafting.recipeDrillFortuneII).setNoText(), new PageCrafting(8, ItemCrafting.recipeDrillSilk).setNoText(), new PageCrafting(9, ItemCrafting.recipeDrillThree).setNoText(), new PageCrafting(10, ItemCrafting.recipeDrillFive).setNoText(), new PageCrafting(11, ItemCrafting.recipeDrillPlacing).setNoText()).setSpecial();
new BookletChapter("drill", entryItemsRF, new ItemStack(InitItems.itemDrill), new PageTextOnly(1), new PageCrafting(2, ItemCrafting.recipeDrill).setNoText(), new PageCrafting(3, ItemCrafting.recipeDrillCore).setNoText(), new PageCrafting(4, ItemCrafting.recipeDrillSpeedI).setNoText(), new PageCrafting(5, ItemCrafting.recipeDrillSpeedII).setNoText(), new PageCrafting(6, ItemCrafting.recipeDrillSpeedIII).setNoText(), new PageCrafting(7, ItemCrafting.recipeDrillFortuneI).setNoText(), new PageCrafting(8, ItemCrafting.recipeDrillFortuneII).setNoText(), new PageCrafting(9, ItemCrafting.recipeDrillSilk).setNoText(), new PageCrafting(10, ItemCrafting.recipeDrillThree).setNoText(), new PageCrafting(11, ItemCrafting.recipeDrillFive).setNoText(), new PageCrafting(12, ItemCrafting.recipeDrillPlacing).setNoText()).setSpecial();
new BookletChapter("staff", entryItemsRF, new ItemStack(InitItems.itemTeleStaff), new PageTextOnly(1), new PageCrafting(2, ItemCrafting.recipeStaff).setNoText()).setImportant();
new BookletChapter("magnetRing", entryItemsRF, new ItemStack(InitItems.itemMagnetRing), new PageCrafting(1, ItemCrafting.recipeMagnetRing));
new BookletChapter("growthRing", entryItemsRF, new ItemStack(InitItems.itemGrowthRing), new PageCrafting(1, ItemCrafting.recipeGrowthRing));

View file

@ -5,7 +5,7 @@
* http://github.com/Ellpeck/ActuallyAdditions/blob/master/README.md
* View the source code at https://github.com/Ellpeck/ActuallyAdditions
*
* © 2015 Ellpeck
* © 2015 Ellpeck
*/
package ellpeck.actuallyadditions.booklet.page;
@ -41,6 +41,21 @@ public class BookletPage{
this.id = id;
}
public void addToPagesWithItemStackData(){
if(!InitBooklet.pagesWithItemStackData.contains(this)){
ItemStack[] stacks = this.getItemStacksForPage();
if(stacks != null && stacks.length > 0){
//Ensure that there is at least one ItemStack
for(ItemStack stack : stacks){
if(stack != null){
InitBooklet.pagesWithItemStackData.add(this);
break;
}
}
}
}
}
public static void renderItem(GuiBooklet gui, ItemStack stack, int x, int y, float scale){
GL11.glPushMatrix();
GL11.glEnable(GL11.GL_BLEND);

View file

@ -5,7 +5,7 @@
* http://github.com/Ellpeck/ActuallyAdditions/blob/master/README.md
* View the source code at https://github.com/Ellpeck/ActuallyAdditions
*
* © 2015 Ellpeck
* © 2015 Ellpeck
*/
package ellpeck.actuallyadditions.booklet.page;

View file

@ -5,14 +5,13 @@
* http://github.com/Ellpeck/ActuallyAdditions/blob/master/README.md
* View the source code at https://github.com/Ellpeck/ActuallyAdditions
*
* © 2015 Ellpeck
* © 2015 Ellpeck
*/
package ellpeck.actuallyadditions.booklet.page;
import cpw.mods.fml.relauncher.ReflectionHelper;
import ellpeck.actuallyadditions.booklet.GuiBooklet;
import ellpeck.actuallyadditions.booklet.InitBooklet;
import ellpeck.actuallyadditions.proxy.ClientProxy;
import ellpeck.actuallyadditions.util.ModUtil;
import ellpeck.actuallyadditions.util.StringUtil;
@ -40,7 +39,7 @@ public class PageCrafting extends BookletPage{
public PageCrafting(int id, IRecipe... recipes){
super(id);
this.recipes = recipes;
InitBooklet.pagesWithItemStackData.add(this);
this.addToPagesWithItemStackData();
}
@Override
@ -94,7 +93,7 @@ public class PageCrafting extends BookletPage{
for(int i = 0; i < shaped.getInput().length; i++){
Object input = shaped.getInput()[i];
if(input != null){
stacks[i] = input instanceof ItemStack ? (ItemStack)input : ((ArrayList<ItemStack>)input).get(0);
stacks[i] = input instanceof ItemStack ? (ItemStack)input : (((ArrayList<ItemStack>)input).isEmpty() ? null : ((ArrayList<ItemStack>)input).get(0));
}
}
}
@ -102,7 +101,7 @@ public class PageCrafting extends BookletPage{
ShapelessOreRecipe shapeless = (ShapelessOreRecipe)recipe;
for(int i = 0; i < shapeless.getInput().size(); i++){
Object input = shapeless.getInput().get(i);
stacks[i] = input instanceof ItemStack ? (ItemStack)input : ((ArrayList<ItemStack>)input).get(0);
stacks[i] = input instanceof ItemStack ? (ItemStack)input : (((ArrayList<ItemStack>)input).isEmpty() ? null : ((ArrayList<ItemStack>)input).get(0));
}
}
@ -153,7 +152,7 @@ public class PageCrafting extends BookletPage{
@Override
public ItemStack[] getItemStacksForPage(){
if(this.recipes != null && this.recipes.length > 0){
if(this.recipes != null && this.recipes.length > 0 && this.recipes[0] != null){
return new ItemStack[]{this.recipes[0].getRecipeOutput()};
}
return null;

View file

@ -5,13 +5,12 @@
* http://github.com/Ellpeck/ActuallyAdditions/blob/master/README.md
* View the source code at https://github.com/Ellpeck/ActuallyAdditions
*
* © 2015 Ellpeck
* © 2015 Ellpeck
*/
package ellpeck.actuallyadditions.booklet.page;
import ellpeck.actuallyadditions.booklet.GuiBooklet;
import ellpeck.actuallyadditions.booklet.InitBooklet;
import ellpeck.actuallyadditions.proxy.ClientProxy;
import ellpeck.actuallyadditions.recipe.CrusherRecipeRegistry;
import ellpeck.actuallyadditions.util.ModUtil;
@ -34,7 +33,7 @@ public class PageCrusherRecipe extends BookletPage{
public PageCrusherRecipe(int id, CrusherRecipeRegistry.CrusherRecipe recipe){
super(id);
this.recipe = recipe;
InitBooklet.pagesWithItemStackData.add(this);
this.addToPagesWithItemStackData();
}
@Override

View file

@ -5,13 +5,12 @@
* http://github.com/Ellpeck/ActuallyAdditions/blob/master/README.md
* View the source code at https://github.com/Ellpeck/ActuallyAdditions
*
* © 2015 Ellpeck
* © 2015 Ellpeck
*/
package ellpeck.actuallyadditions.booklet.page;
import ellpeck.actuallyadditions.booklet.GuiBooklet;
import ellpeck.actuallyadditions.booklet.InitBooklet;
import ellpeck.actuallyadditions.proxy.ClientProxy;
import ellpeck.actuallyadditions.util.ModUtil;
import ellpeck.actuallyadditions.util.StringUtil;
@ -35,7 +34,7 @@ public class PageFurnace extends BookletPage{
super(id);
this.result = result;
this.input = input;
InitBooklet.pagesWithItemStackData.add(this);
this.addToPagesWithItemStackData();
}
@Override

View file

@ -0,0 +1,38 @@
/*
* This file ("PagePicture.java") is part of the Actually Additions Mod for Minecraft.
* It is created and owned by Ellpeck and distributed
* under the Actually Additions License to be found at
* http://github.com/Ellpeck/ActuallyAdditions/blob/master/README.md
* View the source code at https://github.com/Ellpeck/ActuallyAdditions
*
* © 2015 Ellpeck
*/
package ellpeck.actuallyadditions.booklet.page;
import ellpeck.actuallyadditions.booklet.GuiBooklet;
import ellpeck.actuallyadditions.util.AssetUtil;
import net.minecraft.util.ResourceLocation;
public class PagePicture extends PageTextOnly{
private ResourceLocation resLoc;
private int textStartY;
public PagePicture(int id, String resLocName, int textStartY){
super(id);
this.textStartY = textStartY;
this.resLoc = AssetUtil.getBookletGuiLocation(resLocName);
}
@Override
public void renderPre(GuiBooklet gui, int mouseX, int mouseY, int ticksElapsed, boolean mousePressed){
gui.mc.getTextureManager().bindTexture(this.resLoc);
gui.drawTexturedModalRect(gui.guiLeft, gui.guiTop, 0, 0, gui.xSize, gui.ySize);
String text = gui.currentPage.getText();
if(text != null && !text.isEmpty()){
gui.mc.fontRenderer.drawSplitString(text, gui.guiLeft+14, gui.guiTop+textStartY, 115, 0);
}
}
}

View file

@ -5,13 +5,12 @@
* http://github.com/Ellpeck/ActuallyAdditions/blob/master/README.md
* View the source code at https://github.com/Ellpeck/ActuallyAdditions
*
* © 2015 Ellpeck
* © 2015 Ellpeck
*/
package ellpeck.actuallyadditions.booklet.page;
import ellpeck.actuallyadditions.booklet.GuiBooklet;
import ellpeck.actuallyadditions.booklet.InitBooklet;
import net.minecraft.item.ItemStack;
public class PageTextOnly extends BookletPage{
@ -23,10 +22,8 @@ public class PageTextOnly extends BookletPage{
}
public PageTextOnly setStack(ItemStack stack){
if(!InitBooklet.pagesWithItemStackData.contains(this)){
InitBooklet.pagesWithItemStackData.add(this);
}
this.stack = stack;
this.addToPagesWithItemStackData();
return this;
}

View file

@ -5,7 +5,7 @@
* http://github.com/Ellpeck/ActuallyAdditions/blob/master/README.md
* View the source code at https://github.com/Ellpeck/ActuallyAdditions
*
* © 2015 Ellpeck
* © 2015 Ellpeck
*/
package ellpeck.actuallyadditions.communication;

View file

@ -5,7 +5,7 @@
* http://github.com/Ellpeck/ActuallyAdditions/blob/master/README.md
* View the source code at https://github.com/Ellpeck/ActuallyAdditions
*
* © 2015 Ellpeck
* © 2015 Ellpeck
*/
package ellpeck.actuallyadditions.config;

View file

@ -5,7 +5,7 @@
* http://github.com/Ellpeck/ActuallyAdditions/blob/master/README.md
* View the source code at https://github.com/Ellpeck/ActuallyAdditions
*
* © 2015 Ellpeck
* © 2015 Ellpeck
*/
package ellpeck.actuallyadditions.config;
@ -26,9 +26,6 @@ public class ConfigValues{
public static String[] crusherRecipeExceptions;
public static String[] mashedFoodCraftingExceptions;
public static String[] oreMagnetExceptions;
public static String[] oreMagnetExtraWhitelist;
public static String[] paxelExtraMiningWhitelist;
public static String[] drillExtraminingWhitelist;
@ -49,8 +46,6 @@ public class ConfigValues{
crusherRecipeExceptions = config.get(ConfigCategories.CRUSHER_RECIPES.name, "Crusher Recipe Exceptions", new String[]{"ingotBrick", "ingotBrickNether"}, "The Ingots, Dusts and Ores blacklisted from being auto-registered to be crushed by the Crusher. This list uses OreDictionary Names of the Inputs only.").getStringList();
mashedFoodCraftingExceptions = config.get(ConfigCategories.ITEMS_CRAFTING.name, "Mashed Food Crafting Exceptions", new String[]{"ActuallyAdditions:itemCoffee"}, "The ItemFood, IGrowable and IPlantable Items that can not be used to craft Mashed Food. These are the actual registered Item Names, the ones you use, for example, when using the /give Command.").getStringList();
oreMagnetExceptions = config.get(ConfigCategories.MACHINE_VALUES.name, "Ore Magnet Exceptions", new String[0], "By default, the Ore Magnet pulls up everything that is registered in the OreDictionary as a String that starts with 'ore'. If you want any Ore not to be pulled up by the Magnet, put its ORE DICTIONARY name here.").getStringList();
oreMagnetExtraWhitelist = config.get(ConfigCategories.MACHINE_VALUES.name, "Ore Magnet Extra Whitelist", new String[]{"rftools:dimensionalShardBlock"}, "By default, the Ore Magnet pulls up everything that is registered in the OreDictionary as a String that starts with 'ore'. If you want anything else to be pulled up by the Magnet, put its REGISTRY NAME here. These are the actual registered Item Names, the ones you use, for example, when using the /give Command.").getStringList();
paxelExtraMiningWhitelist = config.get(ConfigCategories.TOOL_VALUES.name, "AIOT Extra Whitelist", new String[]{"TConstruct:GravelOre"}, "By default, the AIOT can mine certain blocks. If there is one that it can't mine, but should be able to, put its REGISTRY NAME here. These are the actual registered Item Names, the ones you use, for example, when using the /give Command.").getStringList();
drillExtraminingWhitelist = config.get(ConfigCategories.TOOL_VALUES.name, "Drill Extra Whitelist", new String[]{"TConstruct:GravelOre"}, "By default, the Drill can mine certain blocks. If there is one that it can't mine, but should be able to, put its REGISTRY NAME here. These are the actual registered Item Names, the ones you use, for example, when using the /give Command.").getStringList();
}

View file

@ -5,7 +5,7 @@
* http://github.com/Ellpeck/ActuallyAdditions/blob/master/README.md
* View the source code at https://github.com/Ellpeck/ActuallyAdditions
*
* © 2015 Ellpeck
* © 2015 Ellpeck
*/
package ellpeck.actuallyadditions.config;

View file

@ -5,7 +5,7 @@
* http://github.com/Ellpeck/ActuallyAdditions/blob/master/README.md
* View the source code at https://github.com/Ellpeck/ActuallyAdditions
*
* © 2015 Ellpeck
* © 2015 Ellpeck
*/
package ellpeck.actuallyadditions.config;

View file

@ -5,7 +5,7 @@
* http://github.com/Ellpeck/ActuallyAdditions/blob/master/README.md
* View the source code at https://github.com/Ellpeck/ActuallyAdditions
*
* © 2015 Ellpeck
* © 2015 Ellpeck
*/
package ellpeck.actuallyadditions.config;

View file

@ -5,7 +5,7 @@
* http://github.com/Ellpeck/ActuallyAdditions/blob/master/README.md
* View the source code at https://github.com/Ellpeck/ActuallyAdditions
*
* © 2015 Ellpeck
* © 2015 Ellpeck
*/
package ellpeck.actuallyadditions.config.values;
@ -34,12 +34,13 @@ public enum ConfigBoolValues{
TF_PAXELS("Thermal Foundation Paxels", ConfigCategories.OTHER, true, "If Paxels made of Thermal Foundation Materials should exist"),
MT_PAXELS("MekanismTools Paxels", ConfigCategories.OTHER, true, "If Paxels made of MekanismTools Materials should exist"),
DUPLICATE_PAXELS("Allow Duplicate Paxels", ConfigCategories.OTHER, true, "If Paxels are allowed to have Duplicates (for Example ActuallyAdditions' Obsidian and MekanismTools' Obsidian)"),
SO_PAXELS("Simpleores Paxels", ConfigCategories.OTHER, true, "If Paxels made of SimpleOres Materials should exist"),
DO_RICE_GEN("Rice Gen", ConfigCategories.WORLD_GEN, true, "If Rice should generate in the World"),
DO_CANOLA_GEN("Canola Gen", ConfigCategories.WORLD_GEN, true, "If Canola should generate in the World"),
DO_FLAX_GEN("Flax Gen", ConfigCategories.WORLD_GEN, true, "If Flax should generate in the World"),
DO_COFFEE_GEN("Coffee Gen", ConfigCategories.WORLD_GEN, true, "If Coffee should generate in the World"),
DO_LOTUS_GEN("Black Lotus Gen", ConfigCategories.WORLD_GEN, true, "If the Black Lotus should generate in the World"),
DO_TREASURE_CHEST_GEN("Treasure Chest Gen", ConfigCategories.WORLD_GEN, true, "If Treasure Chests should generate in the World"),
DO_SPIDER_DROPS("Spider Cobweb Drop", ConfigCategories.MOB_DROPS, true, "If Cobwebs should sometimes drop from Spiders"),
@ -56,7 +57,8 @@ public enum ConfigBoolValues{
SHOW_BOOKLET_INFO("Booklet Quick Opening Info", ConfigCategories.TOOL_VALUES, true, "If the 'Press key for more information'-text should show when the item has a page in the booklet"),
GIVE_BOOKLET_ON_FIRST_CRAFT("Give Booklet on First Craft", ConfigCategories.OTHER, true, "If the booklet should be given to the player when he first crafts something from the Mod"),
ENABLE_SEASONAL("Seasonal Mode", ConfigCategories.OTHER, true, "If Seasonal Mode is enabled");
ENABLE_SEASONAL("Seasonal Mode", ConfigCategories.OTHER, true, "If Seasonal Mode is enabled"),
LESS_LASER_RELAY_PARTICLES("Laser Relay: Particles", ConfigCategories.MACHINE_VALUES, false, "If the Laser Relay should have less laser particles to prevent lag");
public final String name;
public final String category;

View file

@ -5,7 +5,7 @@
* http://github.com/Ellpeck/ActuallyAdditions/blob/master/README.md
* View the source code at https://github.com/Ellpeck/ActuallyAdditions
*
* © 2015 Ellpeck
* © 2015 Ellpeck
*/
package ellpeck.actuallyadditions.config.values;
@ -18,6 +18,7 @@ public enum ConfigCrafting{
CLOUD("Smiley Cloud", ConfigCategories.BLOCKS_CRAFTING),
XP_SOLIDIFIER("Experience Solidifier", ConfigCategories.BLOCKS_CRAFTING),
WOOD_CASING("Wood Casing", ConfigCategories.BLOCKS_CRAFTING),
IRON_CASING("Iron Casing", ConfigCategories.BLOCKS_CRAFTING),
STONE_CASING("Stone Casing", ConfigCategories.BLOCKS_CRAFTING),
FISHING_NET("Fishing Net", ConfigCategories.BLOCKS_CRAFTING),
REPAIRER("Repairer", ConfigCategories.BLOCKS_CRAFTING),
@ -52,7 +53,7 @@ public enum ConfigCrafting{
CHOCOLATE("Chocolate", ConfigCategories.FOOD_CRAFTING),
CHOCOLATE_CAKE("Chocolate Cake", ConfigCategories.FOOD_CRAFTING),
TOAST("Toast", ConfigCategories.FOOD_CRAFTING),
CHOCOTOAST("ChocoToast", ConfigCategories.FOOD_CRAFTING),
CHOCOLATE_TOAST("Chocolate Toast", ConfigCategories.FOOD_CRAFTING),
LEAF_BLOWER("Leaf Blower", ConfigCategories.ITEMS_CRAFTING),
LEAF_BLOWER_ADVANCED("Advanced Leaf Blower", ConfigCategories.ITEMS_CRAFTING),
@ -146,13 +147,17 @@ public enum ConfigCrafting{
TELE_STAFF("Tele Staff", ConfigCategories.ITEMS_CRAFTING),
CASING("Casing", ConfigCategories.BLOCKS_CRAFTING),
ORE_MAGNET("Ore Magnet", ConfigCategories.BLOCKS_CRAFTING),
MAGNET_RING("Magnet Ring", ConfigCategories.ITEMS_CRAFTING),
WATER_RING("Water Ring", ConfigCategories.ITEMS_CRAFTING),
GROWTH_RING("Growth Ring", ConfigCategories.ITEMS_CRAFTING),
DIRECTIONAL_BREAKER("Long-Range Breaker", ConfigCategories.BLOCKS_CRAFTING),
RANGED_COLLECTOR("Ranged Collector", ConfigCategories.BLOCKS_CRAFTING);
RANGED_COLLECTOR("Ranged Collector", ConfigCategories.BLOCKS_CRAFTING),
LASER_RELAY("Laser Relay", ConfigCategories.BLOCKS_CRAFTING),
LASER_WRENCH("Laser Wrench", ConfigCategories.ITEMS_CRAFTING),
CHEST_TO_CRATE_UPGRADE("Chest To Crate Upgrade", ConfigCategories.ITEMS_CRAFTING),
DRILL_CORE("Drill Core", ConfigCategories.ITEMS_CRAFTING);
public final String name;
public final String category;

View file

@ -5,7 +5,7 @@
* http://github.com/Ellpeck/ActuallyAdditions/blob/master/README.md
* View the source code at https://github.com/Ellpeck/ActuallyAdditions
*
* © 2015 Ellpeck
* © 2015 Ellpeck
*/
package ellpeck.actuallyadditions.config.values;

View file

@ -5,7 +5,7 @@
* http://github.com/Ellpeck/ActuallyAdditions/blob/master/README.md
* View the source code at https://github.com/Ellpeck/ActuallyAdditions
*
* © 2015 Ellpeck
* © 2015 Ellpeck
*/
package ellpeck.actuallyadditions.config.values;
@ -93,6 +93,7 @@ public enum ConfigIntValues{
CANOLA_AMOUNT("Canola Amount", ConfigCategories.WORLD_GEN, 10, 1, 50, "The Chance of Canola generating"),
FLAX_AMOUNT("Flax Amount", ConfigCategories.WORLD_GEN, 8, 1, 50, "The Chance of Flax generating"),
COFFEE_AMOUNT("Coffee Amount", ConfigCategories.WORLD_GEN, 6, 1, 50, "The Chance of Coffee generating"),
BLACK_LOTUS_AMOUNT("Black Lotus Amount", ConfigCategories.WORLD_GEN, 14, 1, 50, "The Chance of the Black Lotus generating"),
RICE_CHANCE("Rice Chance", ConfigCategories.WORLD_GEN, 50, 1, 3000, "The 1 in X chance for Rice to generate"),
NORMAL_PLANT_CHANCE("Plant Chance", ConfigCategories.WORLD_GEN, 400, 1, 3000, "The 1 in X chance for Flax, Coffee and Canola to generate"),
TREASURE_CHEST_CHANCE("Treasure Chest Chance", ConfigCategories.WORLD_GEN, 300, 1, 3000, "The 1 in X chance for a Treasure Chest to generate in an Ocean"),
@ -171,7 +172,11 @@ public enum ConfigIntValues{
DIRECTIONAL_BREAKER_RF_PER_BLOCK("Directional Breaker: RF per Block", ConfigCategories.MACHINE_VALUES, 5, 0, 1000, "The amount of RF the Directional Breaker uses to break each block"),
DIRECTIONAL_BREAKER_RANGE("Directional Breaker: Range", ConfigCategories.MACHINE_VALUES, 8, 1, 1000, "The range of the Directional Breaker"),
RANGED_COLLECTOR_RANGE("Ranged Collector: Range", ConfigCategories.MACHINE_VALUES, 6, 1, 30, "The range of the Ranged Collector");
RANGED_COLLECTOR_RANGE("Ranged Collector: Range", ConfigCategories.MACHINE_VALUES, 6, 1, 30, "The range of the Ranged Collector"),
LASER_RELAY_LOSS("Laser Relay: Loss", ConfigCategories.MACHINE_VALUES, 5, 0, 80, "The Energy Loss of the Laser Relay per Transfer in Percent"),
LASER_RELAY_MAX_DISTANCE("Laser Relay: Max Distance", ConfigCategories.MACHINE_VALUES, 15, 3, 80, "The max distance between two connected Laser Relays"),
LASER_RELAY_MAX_TRANSFER("Laser Relay: Max Transfer", ConfigCategories.MACHINE_VALUES, 10000, 100, 1000000, "The max amount of RF a Laser Relay can receive and try to transfer (if it's given 100 RF and can only transfer 50, it will only accept 50, it won't waste any power!)");
public final String name;
public final String category;

View file

@ -5,7 +5,7 @@
* http://github.com/Ellpeck/ActuallyAdditions/blob/master/README.md
* View the source code at https://github.com/Ellpeck/ActuallyAdditions
*
* © 2015 Ellpeck
* © 2015 Ellpeck
*/
package ellpeck.actuallyadditions.crafting;
@ -39,6 +39,7 @@ public class BlockCrafting{
public static IRecipe recipeLiquidPlacer;
public static IRecipe recipeLiquidCollector;
public static IRecipe recipeCase;
public static IRecipe recipeIronCase;
public static IRecipe recipeStoneCase;
public static IRecipe recipeEnderCase;
public static IRecipe recipeEnderPearlBlock;
@ -50,7 +51,6 @@ public class BlockCrafting{
public static IRecipe recipeDoubleCrusher;
public static IRecipe recipeFurnace;
public static IRecipe recipeSolidifier;
public static IRecipe recipeMiner;
public static IRecipe recipeCasing;
public static IRecipe recipeGlass;
public static IRecipe recipeLavaFactory;
@ -77,9 +77,21 @@ public class BlockCrafting{
public static IRecipe recipeDirectionalBreaker;
public static IRecipe recipeDropper;
public static IRecipe recipeRangedCollector;
public static IRecipe recipeLaserRelay;
public static void init(){
//Laser Relay
if(ConfigCrafting.LASER_RELAY.isEnabled()){
GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(InitBlocks.blockLaserRelay, 2),
"OBO", "RCR", "OBO",
'B', new ItemStack(Blocks.redstone_block),
'O', new ItemStack(Blocks.obsidian),
'R', new ItemStack(Items.redstone),
'C', new ItemStack(InitItems.itemMisc, 1, TheMiscItems.COIL_ADVANCED.ordinal())));
recipeLaserRelay = Util.GetRecipes.lastIRecipe();
}
//Ranged Collector
if(ConfigCrafting.RANGED_COLLECTOR.isEnabled()){
GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(InitBlocks.blockRangedCollector),
@ -144,6 +156,16 @@ public class BlockCrafting{
recipeCase = Util.GetRecipes.lastIRecipe();
}
//Iron Casing
if(ConfigCrafting.IRON_CASING.isEnabled()){
GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(InitBlocks.blockMisc, 1, TheMiscBlocks.IRON_CASING.ordinal()),
"WSW", "SQS", "WSW",
'Q', new ItemStack(InitItems.itemMisc, 1, TheMiscItems.QUARTZ.ordinal()),
'W', "ingotIron",
'S', "stickWood"));
recipeIronCase = Util.GetRecipes.lastIRecipe();
}
//Ender Casing
if(ConfigCrafting.ENDER_CASING.isEnabled()){
GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(InitBlocks.blockMisc, 1, TheMiscBlocks.ENDER_CASING.ordinal()),
@ -180,7 +202,7 @@ public class BlockCrafting{
"I I", "CAC", "I I",
'I', "ingotIron",
'C', new ItemStack(InitItems.itemMisc, 1, TheMiscItems.COIL_ADVANCED.ordinal()),
'A', new ItemStack(InitBlocks.blockMisc, 1, TheMiscBlocks.STONE_CASING.ordinal())));
'A', new ItemStack(InitBlocks.blockMisc, 1, TheMiscBlocks.IRON_CASING.ordinal())));
recipeEnergizer = Util.GetRecipes.lastIRecipe();
}
@ -190,7 +212,7 @@ public class BlockCrafting{
" I ", "CAC", " I ",
'I', "ingotIron",
'C', new ItemStack(InitItems.itemMisc, 1, TheMiscItems.COIL_ADVANCED.ordinal()),
'A', new ItemStack(InitBlocks.blockMisc, 1, TheMiscBlocks.STONE_CASING.ordinal())));
'A', new ItemStack(InitBlocks.blockMisc, 1, TheMiscBlocks.IRON_CASING.ordinal())));
recipeEnervator = Util.GetRecipes.lastIRecipe();
}
@ -198,7 +220,7 @@ public class BlockCrafting{
if(ConfigCrafting.LAVA_FACTORY.isEnabled()){
GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(InitBlocks.blockLavaFactoryController),
"SCS", "ISI", "LLL",
'C', new ItemStack(InitBlocks.blockMisc, 1, TheMiscBlocks.STONE_CASING.ordinal()),
'C', new ItemStack(InitBlocks.blockMisc, 1, TheMiscBlocks.IRON_CASING.ordinal()),
'S', new ItemStack(InitItems.itemMisc, 1, TheMiscItems.COIL_ADVANCED.ordinal()),
'I', "blockIron",
'L', Items.lava_bucket));
@ -209,7 +231,7 @@ public class BlockCrafting{
if(ConfigCrafting.CASING.isEnabled()){
GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(InitBlocks.blockMisc, 32, TheMiscBlocks.LAVA_FACTORY_CASE.ordinal()),
"ICI",
'C', new ItemStack(InitBlocks.blockMisc, 1, TheMiscBlocks.STONE_CASING.ordinal()),
'C', new ItemStack(InitBlocks.blockMisc, 1, TheMiscBlocks.IRON_CASING.ordinal()),
'I', "blockIron"));
recipeCasing = Util.GetRecipes.lastIRecipe();
}
@ -225,17 +247,6 @@ public class BlockCrafting{
recipeCanolaPress = Util.GetRecipes.lastIRecipe();
}
//Ore Magnet
if(ConfigCrafting.ORE_MAGNET.isEnabled()){
GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(InitBlocks.blockOreMagnet),
"SSS", "CBC", "ISI",
'S', new ItemStack(InitBlocks.blockMisc, 1, TheMiscBlocks.LAVA_FACTORY_CASE.ordinal()),
'C', new ItemStack(InitBlocks.blockMisc, 1, TheMiscBlocks.STONE_CASING.ordinal()),
'B', new ItemStack(InitItems.itemBatteryDouble),
'I', new ItemStack(Blocks.iron_block)));
recipeMiner = Util.GetRecipes.lastIRecipe();
}
//Fermenting Barrel
if(ConfigCrafting.FERMENTING_BARREL.isEnabled()){
GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(InitBlocks.blockFermentingBarrel),
@ -336,7 +347,7 @@ public class BlockCrafting{
"IEI", "GLG", "ICI",
'I', "ingotIron",
'G', "ingotGold",
'E', new ItemStack(InitBlocks.blockMisc, 1, TheMiscBlocks.STONE_CASING.ordinal()),
'E', new ItemStack(InitBlocks.blockMisc, 1, TheMiscBlocks.IRON_CASING.ordinal()),
'L', "treeLeaves",
'C', new ItemStack(InitItems.itemMisc, 1, TheMiscItems.COIL_ADVANCED.ordinal())));
recipeLeafGen = Util.GetRecipes.lastIRecipe();
@ -392,7 +403,7 @@ public class BlockCrafting{
"IQI", "CDC", "IBI",
'D', "blockDiamond",
'I', "ingotIron",
'Q', new ItemStack(InitBlocks.blockMisc, 1, TheMiscBlocks.STONE_CASING.ordinal()),
'Q', new ItemStack(InitBlocks.blockMisc, 1, TheMiscBlocks.IRON_CASING.ordinal()),
'C', new ItemStack(InitItems.itemMisc, 1, TheMiscItems.COIL_ADVANCED.ordinal()),
'B', new ItemStack(Blocks.iron_bars)));
recipeSolar = Util.GetRecipes.lastIRecipe();
@ -402,9 +413,9 @@ public class BlockCrafting{
if(ConfigCrafting.HEAT_COLLECTOR.isEnabled()){
GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(InitBlocks.blockHeatCollector),
"BRB", "CDC", "BQB",
'D', "gemDiamond",
'D', "ingotIron",
'R', new ItemStack(Items.repeater),
'Q', new ItemStack(InitBlocks.blockMisc, 1, TheMiscBlocks.STONE_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()),
'B', new ItemStack(Blocks.iron_bars)));

View file

@ -5,7 +5,7 @@
* http://github.com/Ellpeck/ActuallyAdditions/blob/master/README.md
* View the source code at https://github.com/Ellpeck/ActuallyAdditions
*
* © 2015 Ellpeck
* © 2015 Ellpeck
*/
package ellpeck.actuallyadditions.crafting;

View file

@ -5,7 +5,7 @@
* http://github.com/Ellpeck/ActuallyAdditions/blob/master/README.md
* View the source code at https://github.com/Ellpeck/ActuallyAdditions
*
* © 2015 Ellpeck
* © 2015 Ellpeck
*/
package ellpeck.actuallyadditions.crafting;
@ -40,7 +40,7 @@ public class FoodCrafting{
public static IRecipe recipeChocolate;
public static IRecipe recipeChocolateCake;
public static IRecipe recipeToast;
public static IRecipe recipeChocoToast;
public static IRecipe recipeChocolateToast;
public static void init(){
@ -197,10 +197,10 @@ public class FoodCrafting{
recipeToast = Util.GetRecipes.lastIRecipe();
}
//ChocoToast:
if(ConfigCrafting.CHOCOTOAST.isEnabled()){
GameRegistry.addShapelessRecipe(new ItemStack(InitItems.itemFoods, 1, TheFoods.CHOCOTOAST.ordinal()), new ItemStack(InitItems.itemFoods, 1, TheFoods.TOAST.ordinal()), new ItemStack(InitItems.itemFoods, 1, TheFoods.CHOCOLATE.ordinal()));
recipeChocoToast = Util.GetRecipes.lastIRecipe();
//Chocolate Toast
if(ConfigCrafting.CHOCOLATE_TOAST.isEnabled()){
GameRegistry.addShapelessRecipe(new ItemStack(InitItems.itemFoods, 1, TheFoods.CHOCOLATE_TOAST.ordinal()), new ItemStack(InitItems.itemFoods, 1, TheFoods.TOAST.ordinal()), new ItemStack(InitItems.itemFoods, 1, TheFoods.CHOCOLATE.ordinal()));
recipeChocolateToast = Util.GetRecipes.lastIRecipe();
}
}

View file

@ -5,7 +5,7 @@
* http://github.com/Ellpeck/ActuallyAdditions/blob/master/README.md
* View the source code at https://github.com/Ellpeck/ActuallyAdditions
*
* © 2015 Ellpeck
* © 2015 Ellpeck
*/
package ellpeck.actuallyadditions.crafting;

View file

@ -5,7 +5,7 @@
* http://github.com/Ellpeck/ActuallyAdditions/blob/master/README.md
* View the source code at https://github.com/Ellpeck/ActuallyAdditions
*
* © 2015 Ellpeck
* © 2015 Ellpeck
*/
package ellpeck.actuallyadditions.crafting;
@ -71,9 +71,17 @@ public class ItemCrafting{
public static IRecipe recipeLeafBlower;
public static IRecipe recipeLeafBlowerAdvanced;
public static ArrayList<IRecipe> recipesPotionRings = new ArrayList<IRecipe>();
public static IRecipe recipeChestToCrateUpgrade;
public static IRecipe recipeLaserWrench;
public static IRecipe recipeDrillCore;
public static IRecipe recipeBlackDye;
public static void init(){
//Black Dye
GameRegistry.addRecipe(new ShapelessOreRecipe(new ItemStack(InitItems.itemMisc, 2, TheMiscItems.BLACK_DYE.ordinal()), new ItemStack(InitBlocks.blockBlackLotus)));
recipeBlackDye = Util.GetRecipes.lastIRecipe();
//Booklet
GameRegistry.addRecipe(new ShapelessOreRecipe(new ItemStack(InitItems.itemLexicon), new ItemStack(InitItems.itemCanolaSeed), new ItemStack(Items.paper)));
recipeBook = Util.GetRecipes.lastIRecipe();
@ -82,6 +90,24 @@ public class ItemCrafting{
GameRegistry.addShapelessRecipe(new ItemStack(InitItems.itemLaserWrench), new ItemStack(InitItems.itemLaserWrench));
GameRegistry.addShapelessRecipe(new ItemStack(InitItems.itemPhantomConnector), new ItemStack(InitItems.itemPhantomConnector));
//Chest To Crate Upgrade
if(ConfigCrafting.CHEST_TO_CRATE_UPGRADE.isEnabled()){
GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(InitItems.itemChestToCrateUpgrade),
"CWC", "WWW", "CWC",
'C', new ItemStack(Blocks.chest),
'W', "plankWood"));
recipeChestToCrateUpgrade = Util.GetRecipes.lastIRecipe();
}
//Laser Wrench
if(ConfigCrafting.LASER_WRENCH.isEnabled()){
GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(InitItems.itemLaserWrench),
"C ", " S ", " S",
'C', new ItemStack(InitItems.itemMisc, 1, TheMiscItems.COIL_ADVANCED.ordinal()),
'S', "ingotIron"));
recipeLaserWrench = Util.GetRecipes.lastIRecipe();
}
//Rice Stuff
if(ConfigCrafting.RICE_GADGETS.isEnabled()){
GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(Items.paper, 3),
@ -114,11 +140,21 @@ public class ItemCrafting{
"DDD", "CRC", "III",
'D', "gemDiamond",
'C', new ItemStack(InitItems.itemMisc, 1, TheMiscItems.COIL_ADVANCED.ordinal()),
'R', "dustRedstone",
'R', new ItemStack(InitItems.itemMisc, 1, TheMiscItems.DRILL_CORE.ordinal()),
'I', "blockIron"));
recipeDrill = Util.GetRecipes.lastIRecipe();
}
//Drill Core
if(ConfigCrafting.DRILL_CORE.isEnabled()){
GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(InitItems.itemMisc, 1, TheMiscItems.DRILL_CORE.ordinal()),
"ICI", "CRC", "ICI",
'C', new ItemStack(InitItems.itemMisc, 1, TheMiscItems.COIL.ordinal()),
'R', "dustRedstone",
'I', "blockIron"));
recipeDrillCore = Util.GetRecipes.lastIRecipe();
}
//Tele Staff
if(ConfigCrafting.TELE_STAFF.isEnabled()){
GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(InitItems.itemTeleStaff),

View file

@ -5,7 +5,7 @@
* http://github.com/Ellpeck/ActuallyAdditions/blob/master/README.md
* View the source code at https://github.com/Ellpeck/ActuallyAdditions
*
* © 2015 Ellpeck
* © 2015 Ellpeck
*/
package ellpeck.actuallyadditions.crafting;

View file

@ -5,7 +5,7 @@
* http://github.com/Ellpeck/ActuallyAdditions/blob/master/README.md
* View the source code at https://github.com/Ellpeck/ActuallyAdditions
*
* © 2015 Ellpeck
* © 2015 Ellpeck
*/
package ellpeck.actuallyadditions.crafting;

View file

@ -5,7 +5,7 @@
* http://github.com/Ellpeck/ActuallyAdditions/blob/master/README.md
* View the source code at https://github.com/Ellpeck/ActuallyAdditions
*
* © 2015 Ellpeck
* © 2015 Ellpeck
*/
package ellpeck.actuallyadditions.creative;
@ -39,7 +39,7 @@ public class CreativeTab extends CreativeTabs{
@Override
public Item getTabIconItem(){
return Item.getItemFromBlock(InitBlocks.blockPhantomLiquiface);
return InitItems.itemLexicon;
}
@Override
@ -50,6 +50,7 @@ public class CreativeTab extends CreativeTabs{
add(InitItems.itemLexicon);
add(InitBlocks.blockSmileyCloud);
add(InitBlocks.blockLaserRelay);
add(InitBlocks.blockPhantomface);
add(InitBlocks.blockPhantomEnergyface);
add(InitBlocks.blockPhantomLiquiface);
@ -61,8 +62,6 @@ public class CreativeTab extends CreativeTabs{
add(InitBlocks.blockCoffeeMachine);
add(InitBlocks.blockXPSolidifier);
add(InitBlocks.blockOreMagnet);
add(InitBlocks.blockGreenhouseGlass);
add(InitBlocks.blockGrinder);
add(InitBlocks.blockGrinderDouble);
@ -105,6 +104,11 @@ public class CreativeTab extends CreativeTabs{
add(InitBlocks.blockLampPowerer);
add(InitBlocks.blockTreasureChest);
add(InitBlocks.blockBlackLotus);
add(InitItems.itemLaserWrench);
add(InitItems.itemChestToCrateUpgrade);
add(InitItems.itemDrill);
add(InitItems.itemDrillUpgradeSpeed);
add(InitItems.itemDrillUpgradeSpeedII);

View file

@ -5,7 +5,7 @@
* http://github.com/Ellpeck/ActuallyAdditions/blob/master/README.md
* View the source code at https://github.com/Ellpeck/ActuallyAdditions
*
* © 2015 Ellpeck
* © 2015 Ellpeck
*/
package ellpeck.actuallyadditions.event;

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