Finished (almost) everything !items

This commit is contained in:
Arcaratus 2015-07-30 14:52:39 -04:00
parent 8eed901fcb
commit a9507b3b68
145 changed files with 1261 additions and 2156 deletions

View file

@ -40,7 +40,7 @@ public class BlockSet
{
this.blockid = blockid;
this.metadata = new int[4];
positions = new ArrayList();
positions = new ArrayList<Int3>();
}
public BlockSet(Block block)

View file

@ -30,7 +30,7 @@ public class BuildingSchematic
public BuildingSchematic(String name)
{
this.name = name;
blockList = new ArrayList();
blockList = new ArrayList<BlockSet>();
this.doorX = 0;
this.doorZ = 0;
this.doorY = 0;
@ -90,7 +90,7 @@ public class BuildingSchematic
public List<Int3> getGriddedPositions(EnumFacing dir)
{
List<Int3> positionList = new ArrayList();
List<Int3> positionList = new ArrayList<Int3>();
for (BlockSet blockSet : blockList)
{

View file

@ -1,8 +0,0 @@
package WayofTime.alchemicalWizardry.common.demonVillage;
import net.minecraft.nbt.NBTTagCompound;
public class TileBlockSet extends BlockSet
{
public NBTTagCompound tag;
}

View file

@ -36,7 +36,7 @@ public class EntityDemonAIHurtByTarget extends EntityAIHurtByTarget
this.taskOwner.setAttackTarget(this.taskOwner.getAITarget());
if (this.entityCallsForHelp && this.taskOwner instanceof IHoardDemon)
if (this.entityCallsForHelp)
{
if(portal instanceof TEDemonPortal)

View file

@ -5,10 +5,7 @@ import net.minecraft.world.World;
public abstract class DemonHoardPacket
{
public DemonHoardPacket()
{
}
public DemonHoardPacket() {}
public abstract int summonDemons(TEDemonPortal teDemonPortal, World world, int x, int y, int z, DemonType type, int tier, boolean spawnGuardian);

View file

@ -9,7 +9,7 @@ import net.minecraft.world.World;
public class DemonPacketRegistry
{
public static Map<String, DemonHoardPacket> packetMap = new HashMap();
public static Map<String, DemonHoardPacket> packetMap = new HashMap<String, DemonHoardPacket>();
public static boolean registerDemonPacket(String string, DemonHoardPacket packet)
{

View file

@ -513,6 +513,6 @@ public class EntityMinorDemonGrunt extends EntityDemon implements IOccasionalRan
BlockPos position = demon.getPortalLocation();
TileEntity portal = worldObj.getTileEntity(this.demonPortal);
return portal instanceof TEDemonPortal ? portal == worldObj.getTileEntity(position) : false;
return portal instanceof TEDemonPortal && portal == worldObj.getTileEntity(position);
}
}

View file

@ -5,7 +5,10 @@ import net.minecraft.util.BlockPos;
public interface IHoardDemon
{
void setPortalLocation(BlockPos position);
BlockPos getPortalLocation();
boolean thrallDemon(BlockPos location);
boolean isSamePortal(IHoardDemon demon);
}

View file

@ -11,7 +11,7 @@ import WayofTime.alchemicalWizardry.ModItems;
public class DemonVillageLootRegistry
{
public static ArrayList<WeightedRandomChestContent> list1 = new ArrayList();
public static ArrayList<WeightedRandomChestContent> list1 = new ArrayList<WeightedRandomChestContent>();
public static void init()
{

View file

@ -43,10 +43,7 @@ public class TEDemonChest extends TileEntityChest implements ITilePortalNode
}
@Override
public void checkForAdjacentChests()
{
}
public void checkForAdjacentChests() {}
@Override
public void setPortalLocation(TEDemonPortal teDemonPortal)

View file

@ -66,9 +66,9 @@ public class TEDemonPortal extends TileEntity implements IUpdatePlayerListBox
public static int[] tierCostList = new int[]{1500};
public Set<IHoardDemon> hoardList = new HashSet();
public Set<IHoardDemon> hoardList = new HashSet<IHoardDemon>();
public static List<DemonBuilding> buildingList = new ArrayList();
public static List<DemonBuilding> buildingList = new ArrayList<DemonBuilding>();
public Random rand = new Random();
private GridSpace[][] area;
@ -168,7 +168,7 @@ public class TEDemonPortal extends TileEntity implements IUpdatePlayerListBox
{
float totalChance = 0;
Map<String, Float> map = new HashMap();
Map<String, Float> map = new HashMap<String, Float>();
map.put("roadChance", this.getRoadChance());
map.put("houseChance", this.getHouseChance());
map.put("demonPortalChance", this.getDemonPortalChance());
@ -661,7 +661,7 @@ public class TEDemonPortal extends TileEntity implements IUpdatePlayerListBox
public List<EnumFacing> findValidExtentionDirection(int x, int z)
{
List<EnumFacing> directions = new LinkedList();
List<EnumFacing> directions = new LinkedList<EnumFacing>();
if (this.getGridSpace(x, z) == null || !this.getGridSpace(x, z).isRoadSegment())
{
@ -1197,7 +1197,7 @@ public class TEDemonPortal extends TileEntity implements IUpdatePlayerListBox
// GridSpaceHolder grid = this.createGSH();
List<EnumFacing> directions = new ArrayList();
List<EnumFacing> directions = new ArrayList<EnumFacing>();
for (int i = 2; i < 6; i++)
{
@ -1210,7 +1210,7 @@ public class TEDemonPortal extends TileEntity implements IUpdatePlayerListBox
return 0;
}
HashMap<EnumFacing, List<DemonBuilding>> schemMap = new HashMap();
HashMap<EnumFacing, List<DemonBuilding>> schemMap = new HashMap<EnumFacing, List<DemonBuilding>>();
for (EnumFacing nextDir : directions)
{
@ -1226,7 +1226,7 @@ public class TEDemonPortal extends TileEntity implements IUpdatePlayerListBox
schemMap.get(nextDir).add(build);
} else
{
schemMap.put(nextDir, new ArrayList());
schemMap.put(nextDir, new ArrayList<DemonBuilding>());
schemMap.get(nextDir).add(build);
}
}
@ -1353,7 +1353,7 @@ public class TEDemonPortal extends TileEntity implements IUpdatePlayerListBox
return 0;
}
List<EnumFacing> directions = new ArrayList();
List<EnumFacing> directions = new ArrayList<EnumFacing>();
for (int i = 2; i < 6; i++)
{
@ -1369,7 +1369,7 @@ public class TEDemonPortal extends TileEntity implements IUpdatePlayerListBox
return 0;
}
HashMap<EnumFacing, List<DemonBuilding>> schemMap = new HashMap();
HashMap<EnumFacing, List<DemonBuilding>> schemMap = new HashMap<EnumFacing, List<DemonBuilding>>();
for (EnumFacing nextDir : directions)
{
@ -1390,7 +1390,7 @@ public class TEDemonPortal extends TileEntity implements IUpdatePlayerListBox
schemMap.get(nextDir).add(build);
} else
{
schemMap.put(nextDir, new ArrayList());
schemMap.put(nextDir, new ArrayList<DemonBuilding>());
schemMap.get(nextDir).add(build);
}
} else
@ -1418,10 +1418,6 @@ public class TEDemonPortal extends TileEntity implements IUpdatePlayerListBox
build.setAllGridSpaces(x + xOff, z + zOff, yLevel, chosenDirection.getOpposite(), GridSpace.HOUSE, grid);
this.loadGSH(grid);
DemonVillagePath path = new DemonVillagePath(pos.getX() + (x) * 5, yLevel, pos.getZ() + (z) * 5, chosenDirection, 2);
Int3AndBool temp = path.constructFullPath(this, worldObj, this.getRoadStepClearance());
return build.getNumberOfGridSpaces();
}
@ -1451,11 +1447,6 @@ public class TEDemonPortal extends TileEntity implements IUpdatePlayerListBox
public void createRoad(int xi, int yi, int zi, EnumFacing dir, int length, boolean doesNotDrop)
{
int curX = xi;
int curY = yi;
int curZ = zi;
int roadRadius = this.getRoadRadius();
if (dir.getFrontOffsetY() != 0)
{
return;