Some fixes
This commit is contained in:
parent
50b822c15c
commit
984dcd7b4a
7 changed files with 14 additions and 32 deletions
|
@ -234,28 +234,6 @@ public class EquivalencyHandler {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Ignores stack size for world transmutation */
|
|
||||||
public boolean areWorldEquivalent(Object obj1, Object obj2) {
|
|
||||||
|
|
||||||
ItemStack first = GeneralHelper.convertObjectToItemStack(obj1);
|
|
||||||
if(first == null) return false;
|
|
||||||
ItemStack second = GeneralHelper.convertObjectToItemStack(obj1);
|
|
||||||
if(second == null) return false;
|
|
||||||
|
|
||||||
if ((getEquivalencyList(first.itemID, first.getItemDamage()) != null) && (getEquivalencyList(second.itemID, second.getItemDamage()) != null)) {
|
|
||||||
if ((first.itemID == second.itemID) && (first.getItemDamage() == second.getItemDamage())) {
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
else {
|
|
||||||
return (getEquivalencyList(first.itemID, first.getItemDamage()).equals(getEquivalencyList(second.itemID, second.getItemDamage())));
|
|
||||||
}
|
|
||||||
}
|
|
||||||
else {
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
public void debug() {
|
public void debug() {
|
||||||
|
|
||||||
int i = 0;
|
int i = 0;
|
||||||
|
|
|
@ -114,21 +114,19 @@ public class WorldTransmutationHandler {
|
||||||
|
|
||||||
int id = event.world.getBlockId(event.x, event.y, event.z);
|
int id = event.world.getBlockId(event.x, event.y, event.z);
|
||||||
int meta = event.world.getBlockMetadata(event.x, event.y, event.z);
|
int meta = event.world.getBlockMetadata(event.x, event.y, event.z);
|
||||||
Material material = event.world.getBlockMaterial(event.x, event.y, event.z);
|
|
||||||
boolean result = false;
|
boolean result = false;
|
||||||
|
|
||||||
if ((material == Material.leaves) && (id == Block.leaves.blockID)) {
|
Block currentBlock = Block.blocksList[id];
|
||||||
meta = meta & 4;
|
|
||||||
}
|
if (currentBlock != null) {
|
||||||
else if ((material == Material.pumpkin) && (id == Block.pumpkin.blockID)) {
|
meta = currentBlock.damageDropped(meta);
|
||||||
meta = 0;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
ItemStack worldStack = new ItemStack(id, 1, meta);
|
ItemStack worldStack = new ItemStack(id, 1, meta);
|
||||||
ItemStack targetStack = new ItemStack(event.targetID, 1, event.targetMeta);
|
ItemStack targetStack = new ItemStack(event.targetID, 1, event.targetMeta);
|
||||||
|
|
||||||
if (!worldStack.isItemEqual(targetStack)) {
|
if (!worldStack.isItemEqual(targetStack)) {
|
||||||
if (EquivalencyHandler.instance().areWorldEquivalent(worldStack, targetStack)) {
|
if (EquivalencyHandler.instance().areEquivalent(worldStack, targetStack)) {
|
||||||
if (event.itemStack.getItemDamage() < event.itemStack.getMaxDamage()) {
|
if (event.itemStack.getItemDamage() < event.itemStack.getMaxDamage()) {
|
||||||
result = TransmutationHelper.transmuteInWorld(event.world, event.player, event.player.getCurrentEquippedItem(), event.x, event.y, event.z, event.targetID, event.targetMeta);
|
result = TransmutationHelper.transmuteInWorld(event.world, event.player, event.player.getCurrentEquippedItem(), event.x, event.y, event.z, event.targetID, event.targetMeta);
|
||||||
}
|
}
|
||||||
|
|
|
@ -18,6 +18,7 @@ public class Sounds {
|
||||||
SOUND_RESOURCE_LOCATION + "chargeDown.ogg",
|
SOUND_RESOURCE_LOCATION + "chargeDown.ogg",
|
||||||
SOUND_RESOURCE_LOCATION + "chargeUp.ogg",
|
SOUND_RESOURCE_LOCATION + "chargeUp.ogg",
|
||||||
SOUND_RESOURCE_LOCATION + "destruct.ogg",
|
SOUND_RESOURCE_LOCATION + "destruct.ogg",
|
||||||
|
SOUND_RESOURCE_LOCATION + "fail.ogg",
|
||||||
SOUND_RESOURCE_LOCATION + "gust.ogg",
|
SOUND_RESOURCE_LOCATION + "gust.ogg",
|
||||||
SOUND_RESOURCE_LOCATION + "heal.ogg",
|
SOUND_RESOURCE_LOCATION + "heal.ogg",
|
||||||
SOUND_RESOURCE_LOCATION + "kinesis.ogg",
|
SOUND_RESOURCE_LOCATION + "kinesis.ogg",
|
||||||
|
@ -33,6 +34,7 @@ public class Sounds {
|
||||||
public static final String CHARGE_DOWN = SOUND_PREFIX + "chargeDown";
|
public static final String CHARGE_DOWN = SOUND_PREFIX + "chargeDown";
|
||||||
public static final String CHARGE_UP = SOUND_PREFIX + "chargeUp";
|
public static final String CHARGE_UP = SOUND_PREFIX + "chargeUp";
|
||||||
public static final String DESTRUCTION = SOUND_PREFIX + "destruct";
|
public static final String DESTRUCTION = SOUND_PREFIX + "destruct";
|
||||||
|
public static final String FAIL = SOUND_PREFIX + "fail";
|
||||||
public static final String GUST = SOUND_PREFIX + "gust";
|
public static final String GUST = SOUND_PREFIX + "gust";
|
||||||
public static final String HEAL = SOUND_PREFIX + "heal";
|
public static final String HEAL = SOUND_PREFIX + "heal";
|
||||||
public static final String KINESIS = SOUND_PREFIX + "kinesis";
|
public static final String KINESIS = SOUND_PREFIX + "kinesis";
|
||||||
|
@ -46,5 +48,6 @@ public class Sounds {
|
||||||
public static final String WIND = SOUND_PREFIX + "wind";
|
public static final String WIND = SOUND_PREFIX + "wind";
|
||||||
|
|
||||||
public static final String CHARGE_FAIL = "mob.enderdragon.hit";
|
public static final String CHARGE_FAIL = "mob.enderdragon.hit";
|
||||||
|
public static final String TRANSMUTE_FAIL = "mob.wither.hurt";
|
||||||
|
|
||||||
}
|
}
|
|
@ -7,6 +7,7 @@ import java.io.IOException;
|
||||||
import net.minecraft.entity.player.EntityPlayer;
|
import net.minecraft.entity.player.EntityPlayer;
|
||||||
import net.minecraft.network.INetworkManager;
|
import net.minecraft.network.INetworkManager;
|
||||||
|
|
||||||
|
import com.pahimar.ee3.configuration.ConfigurationSettings;
|
||||||
import com.pahimar.ee3.network.PacketTypeHandler;
|
import com.pahimar.ee3.network.PacketTypeHandler;
|
||||||
|
|
||||||
import cpw.mods.fml.common.network.Player;
|
import cpw.mods.fml.common.network.Player;
|
||||||
|
@ -62,7 +63,9 @@ public class PacketSpawnParticle extends PacketEE {
|
||||||
|
|
||||||
EntityPlayer thePlayer = (EntityPlayer) player;
|
EntityPlayer thePlayer = (EntityPlayer) player;
|
||||||
|
|
||||||
|
if (ConfigurationSettings.ENABLE_PARTICLE_FX) {
|
||||||
thePlayer.worldObj.spawnParticle(particleName, x, y, z, velocityX, velocityY, velocityZ);
|
thePlayer.worldObj.spawnParticle(particleName, x, y, z, velocityX, velocityY, velocityZ);
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -11,7 +11,7 @@
|
||||||
"x3n0ph0b3"
|
"x3n0ph0b3"
|
||||||
],
|
],
|
||||||
"credits": "By pahimar, based on Equivalent Exchange 1 & 2 by x3n0ph0b3",
|
"credits": "By pahimar, based on Equivalent Exchange 1 & 2 by x3n0ph0b3",
|
||||||
"logoFile": "/ee3/art/logo.png",
|
"logoFile": "com/pahimar/ee3/art/logo.png",
|
||||||
"screenshots": [
|
"screenshots": [
|
||||||
],
|
],
|
||||||
"parent":"",
|
"parent":"",
|
||||||
|
|
BIN
resources/com/pahimar/ee3/sound/fail.ogg
Normal file
BIN
resources/com/pahimar/ee3/sound/fail.ogg
Normal file
Binary file not shown.
|
@ -6,5 +6,5 @@
|
||||||
<entry key="Minecraft 1.4.4">pre1b|http://goo.gl/Ria2V</entry>
|
<entry key="Minecraft 1.4.4">pre1b|http://goo.gl/Ria2V</entry>
|
||||||
<entry key="Minecraft 1.4.5">pre1d|http://goo.gl/Ria2V</entry>
|
<entry key="Minecraft 1.4.5">pre1d|http://goo.gl/Ria2V</entry>
|
||||||
<entry key="Minecraft 1.4.6">pre1e|http://goo.gl/Ria2V</entry>
|
<entry key="Minecraft 1.4.6">pre1e|http://goo.gl/Ria2V</entry>
|
||||||
<entry key="Minecraft 1.4.7">pre1e|http://goo.gl/Ria2V</entry>
|
<entry key="Minecraft 1.4.7">pre1f|http://goo.gl/Ria2V</entry>
|
||||||
</properties>
|
</properties>
|
||||||
|
|
Loading…
Reference in a new issue