mirror of
https://github.com/Ellpeck/ActuallyAdditions.git
synced 2024-11-26 08:48:34 +01:00
Little bit of cleanup ~
This commit is contained in:
parent
d5c430fcdc
commit
f2c74521b1
9 changed files with 20 additions and 27 deletions
|
@ -11,7 +11,6 @@
|
|||
package de.ellpeck.actuallyadditions.mod.crafting;
|
||||
|
||||
import de.ellpeck.actuallyadditions.api.ActuallyAdditionsAPI;
|
||||
import de.ellpeck.actuallyadditions.mod.ActuallyAdditions;
|
||||
import de.ellpeck.actuallyadditions.mod.fluids.InitFluids;
|
||||
import de.ellpeck.actuallyadditions.mod.items.InitItems;
|
||||
import de.ellpeck.actuallyadditions.mod.items.metalists.TheMiscItems;
|
||||
|
|
|
@ -34,9 +34,9 @@ import java.util.concurrent.ConcurrentHashMap;
|
|||
public class WorldData extends WorldSavedData{
|
||||
|
||||
public static final String DATA_TAG = ModUtil.MOD_ID+"data";
|
||||
private static WorldData data;
|
||||
//TODO Remove this as well
|
||||
public static List<File> legacyLoadWorlds = new ArrayList<File>();
|
||||
private static WorldData data;
|
||||
public final ConcurrentSet<Network> laserRelayNetworks = new ConcurrentSet<Network>();
|
||||
public final ConcurrentHashMap<UUID, PlayerSave> playerSaveData = new ConcurrentHashMap<UUID, PlayerSave>();
|
||||
|
||||
|
@ -106,6 +106,16 @@ public class WorldData extends WorldSavedData{
|
|||
return get(world, false);
|
||||
}
|
||||
|
||||
//TODO Remove old loading mechanic after a while because it's legacy
|
||||
public static void loadLegacy(World world){
|
||||
if(!world.isRemote && world instanceof WorldServer){
|
||||
int dim = world.provider.getDimension();
|
||||
ISaveHandler handler = new WorldSpecificSaveHandler((WorldServer)world, world.getSaveHandler());
|
||||
File dataFile = handler.getMapFileFromName(DATA_TAG+dim);
|
||||
legacyLoadWorlds.add(dataFile);
|
||||
}
|
||||
}
|
||||
|
||||
//TODO Remove merging once removing old save handler
|
||||
private void readFromNBT(NBTTagCompound compound, boolean merge){
|
||||
//Laser World Data
|
||||
|
@ -165,14 +175,4 @@ public class WorldData extends WorldSavedData{
|
|||
|
||||
return compound;
|
||||
}
|
||||
|
||||
//TODO Remove old loading mechanic after a while because it's legacy
|
||||
public static void loadLegacy(World world){
|
||||
if(!world.isRemote && world instanceof WorldServer){
|
||||
int dim = world.provider.getDimension();
|
||||
ISaveHandler handler = new WorldSpecificSaveHandler((WorldServer)world, world.getSaveHandler());
|
||||
File dataFile = handler.getMapFileFromName(DATA_TAG+dim);
|
||||
legacyLoadWorlds.add(dataFile);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
/*
|
||||
* This file ("CrusherRecipeHandler.java") is part of the Actually Additions mod for Minecraft.
|
||||
* This file ("ReedFarmerBehavior.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://ellpeck.de/actaddlicense
|
||||
|
@ -14,11 +14,9 @@ import de.ellpeck.actuallyadditions.api.farmer.IFarmerBehavior;
|
|||
import de.ellpeck.actuallyadditions.api.internal.IFarmer;
|
||||
import net.minecraft.block.Block;
|
||||
import net.minecraft.block.BlockReed;
|
||||
import net.minecraft.block.BlockSand;
|
||||
import net.minecraft.block.state.IBlockState;
|
||||
import net.minecraft.init.Blocks;
|
||||
import net.minecraft.init.Items;
|
||||
import net.minecraft.item.Item;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.util.math.BlockPos;
|
||||
import net.minecraft.world.World;
|
||||
|
|
|
@ -17,8 +17,8 @@ public interface INumberReactor{
|
|||
/**
|
||||
* Called when a Number gets received after typing it in in the GUI
|
||||
*
|
||||
* @param number The number that was sent
|
||||
* @param id The ID (meaning the place in the GUI) of the number typed in
|
||||
* @param number The number that was sent
|
||||
* @param id The ID (meaning the place in the GUI) of the number typed in
|
||||
* @param player The Player doing it
|
||||
*/
|
||||
void onNumberReceived(double number, int id, EntityPlayer player);
|
||||
|
|
|
@ -32,24 +32,20 @@ public class TileEntityFireworkBox extends TileEntityBase implements IEnergyDisp
|
|||
|
||||
public static final int USE_PER_SHOT = 500;
|
||||
public final CustomEnergyStorage storage = new CustomEnergyStorage(20000, 200, 0);
|
||||
private int timeUntilNextFirework;
|
||||
private int oldEnergy;
|
||||
|
||||
public int intValuePlay = 2;
|
||||
|
||||
public int chargeAmount = 2;
|
||||
public int flightTime = 2;
|
||||
public float trailOrFlickerChance = 0.65F;
|
||||
public float flickerChance = 0.25F;
|
||||
public int colorAmount = 3;
|
||||
|
||||
public float typeChance0 = 1F;
|
||||
public float typeChance1 = 0F;
|
||||
public float typeChance2 = 0F;
|
||||
public float typeChance3 = 0F;
|
||||
public float typeChance4 = 0F;
|
||||
|
||||
public int areaOfEffect = 2;
|
||||
private int timeUntilNextFirework;
|
||||
private int oldEnergy;
|
||||
|
||||
public TileEntityFireworkBox(){
|
||||
super("fireworkBox");
|
||||
|
|
|
@ -33,6 +33,7 @@ import java.util.concurrent.ConcurrentHashMap;
|
|||
public class TileEntityInputter extends TileEntityInventoryBase implements IButtonReactor, INumberReactor{
|
||||
|
||||
public static final int OKAY_BUTTON_ID = 133;
|
||||
private final SlotlessableItemHandlerWrapper wrapper = new SlotlessableItemHandlerWrapper(this.slots, null);
|
||||
public int sideToPut = -1;
|
||||
public int slotToPutStart;
|
||||
public int slotToPutEnd;
|
||||
|
@ -50,7 +51,6 @@ public class TileEntityInputter extends TileEntityInventoryBase implements IButt
|
|||
private int lastPullSide;
|
||||
private int lastPullStart;
|
||||
private int lastPullEnd;
|
||||
private final SlotlessableItemHandlerWrapper wrapper = new SlotlessableItemHandlerWrapper(this.slots, null);
|
||||
|
||||
public TileEntityInputter(int slots, String name){
|
||||
super(slots, name);
|
||||
|
|
|
@ -33,10 +33,10 @@ import java.util.*;
|
|||
|
||||
public class TileEntityItemViewer extends TileEntityBase{
|
||||
|
||||
protected final SlotlessableItemHandlerWrapper itemHandler;
|
||||
public final List<GenericItemHandlerInfo> genericInfos = new ArrayList<GenericItemHandlerInfo>();
|
||||
public final Map<Integer, IItemHandlerInfo> itemHandlerInfos = new HashMap<Integer, IItemHandlerInfo>();
|
||||
public final List<SlotlessItemHandlerInfo> slotlessInfos = new ArrayList<SlotlessItemHandlerInfo>();
|
||||
protected final SlotlessableItemHandlerWrapper itemHandler;
|
||||
public TileEntityLaserRelayItem connectedRelay;
|
||||
private int lastNetworkChangeAmount = -1;
|
||||
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
/*
|
||||
* This file ("SlotlessableItemHandler.java") is part of the Actually Additions mod for Minecraft.
|
||||
* This file ("SlotlessableItemHandlerWrapper.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://ellpeck.de/actaddlicense
|
||||
|
|
Loading…
Reference in a new issue