Finished up the EE3 command, for now
This commit is contained in:
parent
36e296a53d
commit
ea431cb3e7
4 changed files with 40 additions and 20 deletions
|
@ -13,16 +13,40 @@ public class CommandEE extends CommandBase {
|
|||
return "ee3";
|
||||
}
|
||||
|
||||
public static List getListOfStringsMatchingLastWord(String[] par0ArrayOfStr, String... par1ArrayOfStr) {
|
||||
|
||||
// TODO
|
||||
return null;
|
||||
}
|
||||
|
||||
public List addTabCompletionOptions(ICommandSender commandSender, String[] args) {
|
||||
|
||||
// TODO
|
||||
return null;
|
||||
switch (args.length) {
|
||||
case 1: {
|
||||
return getListOfStringsMatchingLastWord(args, new String[] { "overlay", "particles" });
|
||||
}
|
||||
case 2: {
|
||||
if (args[0].equalsIgnoreCase("overlay")) {
|
||||
return getListOfStringsMatchingLastWord(args, new String[] { "on", "off", "position", "scale", "opacity" });
|
||||
}
|
||||
else if (args[0].equalsIgnoreCase("particles")) {
|
||||
return getListOfStringsMatchingLastWord(args, new String[] { "on", "off" });
|
||||
}
|
||||
}
|
||||
case 3: {
|
||||
if (args[0].equalsIgnoreCase("overlay")) {
|
||||
if (args[1].equalsIgnoreCase("position")) {
|
||||
return getListOfStringsMatchingLastWord(args, new String[] { "top", "bottom" });
|
||||
}
|
||||
}
|
||||
}
|
||||
case 4: {
|
||||
if (args[0].equalsIgnoreCase("overlay")) {
|
||||
if (args[1].equalsIgnoreCase("position")) {
|
||||
if (args[2].equalsIgnoreCase("top") || args[2].equalsIgnoreCase("bottom")) {
|
||||
return getListOfStringsMatchingLastWord(args, new String[] { "left", "right" });
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
default: {
|
||||
return null;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public void processCommand(ICommandSender commandSender, String[] args) {
|
||||
|
|
|
@ -24,7 +24,7 @@ public class ItemDropHelper {
|
|||
rand = Math.random();
|
||||
|
||||
if (rand < 0.15d) {
|
||||
entity.dropItem(ModItems.miniumShard.shiftedIndex, 1);
|
||||
entity.dropItem(ModItems.miniumShard.itemID, 1);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -53,19 +53,15 @@ public class TransmutationHelper {
|
|||
|
||||
int id = world.getBlockId(x, y, z);
|
||||
int meta = world.getBlockMetadata(x, y, z);
|
||||
Material material = world.getBlockMaterial(x, y, z);
|
||||
|
||||
if ((material == Material.leaves) && (id == Block.leaves.blockID)) {
|
||||
meta = meta & 4;
|
||||
}
|
||||
else if ((material == Material.pumpkin) && (id == Block.pumpkin.blockID)) {
|
||||
meta = 0;
|
||||
Block currentBlock = Block.blocksList[id];
|
||||
|
||||
if (currentBlock != null) {
|
||||
meta = currentBlock.damageDropped(meta);
|
||||
}
|
||||
|
||||
currentBlockStack = new ItemStack(id, 1, meta);
|
||||
|
||||
System.out.format("%d %d\n", id, meta);
|
||||
|
||||
if (previousBlockStack == null) {
|
||||
previousBlockStack = currentBlockStack;
|
||||
targetBlockStack = getNextBlock(currentBlockStack.itemID, currentBlockStack.getItemDamage());
|
||||
|
@ -100,7 +96,7 @@ public class TransmutationHelper {
|
|||
if (list != null) {
|
||||
nextStack = EquivalencyHandler.instance().getNextInList(id, meta);
|
||||
nextStack.stackSize = 1;
|
||||
|
||||
|
||||
/*
|
||||
* If the current item is the same as the original one we started
|
||||
* with, then we have recursed through the entire list and not found
|
||||
|
|
|
@ -38,7 +38,7 @@ public class EMCRegistry {
|
|||
public EMCEntry getEMCValue(Item item) {
|
||||
|
||||
if (item != null) {
|
||||
return getEMCValue(item.shiftedIndex, 0);
|
||||
return getEMCValue(item.itemID, 0);
|
||||
}
|
||||
|
||||
return null;
|
||||
|
@ -81,7 +81,7 @@ public class EMCRegistry {
|
|||
|
||||
public void addEMCValue(Item item, EMCEntry emcEntry) {
|
||||
|
||||
addEMCValue(item.shiftedIndex, 0, emcEntry);
|
||||
addEMCValue(item.itemID, 0, emcEntry);
|
||||
}
|
||||
|
||||
public void addEMCValue(ItemStack itemStack, EMCEntry emcEntry) {
|
||||
|
|
Loading…
Reference in a new issue