Skip to content

Commit

Permalink
Fixed Armor & new Conduit texture
Browse files Browse the repository at this point in the history
  • Loading branch information
Zokonius committed Mar 13, 2020
1 parent ab0de22 commit 805ba22
Show file tree
Hide file tree
Showing 43 changed files with 31 additions and 23 deletions.
3 changes: 3 additions & 0 deletions resources/assets/enderio/lang/en_US.lang
Original file line number Diff line number Diff line change
Expand Up @@ -805,6 +805,9 @@ enderio.item.darkSteel_armor.tooltip.line2=when powered
enderio.item.endSteel_armor.tooltip.line1=Diamond+ level protection
enderio.item.endSteel_armor.tooltip.line2=when powered

enderio.item.darkSteel_boots.tooltip.line1=Fall damage negated
enderio.item.darkSteel_boots.tooltip.line2=when powered

enderio.item.endSteel_boots.tooltip.line1=Fall damage negated
enderio.item.endSteel_boots.tooltip.line2=when powered

Expand Down
Binary file modified resources/assets/enderio/textures/blocks/itemConduit.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified resources/assets/enderio/textures/blocks/itemConduitCore.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified resources/assets/enderio/textures/blocks/liquidConduit.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified resources/assets/enderio/textures/blocks/liquidConduitAdvanced.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified resources/assets/enderio/textures/blocks/liquidConduitCore.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified resources/assets/enderio/textures/blocks/liquidConduitEnder.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified resources/assets/enderio/textures/blocks/meConduit.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified resources/assets/enderio/textures/blocks/meConduitCore.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified resources/assets/enderio/textures/blocks/meConduitCoreDense.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified resources/assets/enderio/textures/blocks/meConduitDense.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified resources/assets/enderio/textures/blocks/ocConduitCore.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified resources/assets/enderio/textures/blocks/ocConduitCoreAnim.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified resources/assets/enderio/textures/blocks/powerConduit.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified resources/assets/enderio/textures/blocks/powerConduitCore.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified resources/assets/enderio/textures/blocks/powerConduitEnder.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified resources/assets/enderio/textures/blocks/powerConduitEnhanced.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified resources/assets/enderio/textures/items/itemLiquidConduit.png
Binary file modified resources/assets/enderio/textures/items/itemPowerConduit.png
Binary file modified resources/assets/enderio/textures/items/itemRedstoneConduit.png
Binary file modified resources/assets/enderio/textures/items/itemRedstoneSwitch.png
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,9 @@ public class ItemPowerConduit extends AbstractItemConduit {
static ItemConduitSubtype[] subtypes = new ItemConduitSubtype[] {
new ItemConduitSubtype(ModObject.itemPowerConduit.name(), "enderio:itemPowerConduit"),
new ItemConduitSubtype(ModObject.itemPowerConduit.name() + "Enhanced", "enderio:itemPowerConduitEnhanced"),
new ItemConduitSubtype(ModObject.itemPowerConduit.name() + "Ender", "enderio:itemPowerConduitEnder")
new ItemConduitSubtype(ModObject.itemPowerConduit.name() + "Ender", "enderio:itemPowerConduitEnder"),
// new ItemConduitSubtype(ModObject.itemPowerConduit.name() + "Stellar", "enderio:itemPowerConduitStellar")

};

public static ItemPowerConduit create() {
Expand Down Expand Up @@ -56,7 +58,7 @@ public void addInformation(ItemStack itemStack, EntityPlayer par2EntityPlayer, L
ICapacitor cap = PowerConduit.getCapacitors()[itemStack.getItemDamage()];
list.add(PREFIX + PowerDisplayUtil.formatPower(cap.getMaxEnergyExtracted()) + POSTFIX);
}

@Override
public boolean shouldHideFacades(ItemStack stack, EntityPlayer player) {
return true;
Expand Down
37 changes: 19 additions & 18 deletions src/main/java/crazypants/enderio/conduit/power/PowerConduit.java
Original file line number Diff line number Diff line change
Expand Up @@ -47,22 +47,23 @@
public class PowerConduit extends AbstractConduit implements IPowerConduit {

static final Map<String, IIcon> ICONS = new HashMap<String, IIcon>();

private static ICapacitor[] capacitors;

static final String[] POSTFIX = new String[] { "", "Enhanced", "Ender" };
static final String[] POSTFIX = new String[] { "", "Enhanced", "Ender", /*"Stellar"*/};

static ICapacitor[] getCapacitors() {
if(capacitors == null) {
capacitors = new BasicCapacitor[] {
new BasicCapacitor(Config.powerConduitTierOneRF, Config.powerConduitTierOneRF),
new BasicCapacitor(Config.powerConduitTierTwoRF, Config.powerConduitTierTwoRF),
new BasicCapacitor(Config.powerConduitTierThreeRF, Config.powerConduitTierThreeRF)
new BasicCapacitor(Config.powerConduitTierThreeRF, Config.powerConduitTierThreeRF),
// new BasicCapacitor(Config.powerConduitTierFourRF, Config.powerConduitTierFourRF)
};
}
return capacitors;
}

static ItemStack createItemStackForSubtype(int subtype) {
ItemStack result = new ItemStack(EnderIO.itemPowerConduit, 1, subtype);
return result;
Expand Down Expand Up @@ -199,13 +200,13 @@ public DyeColor getExtractionSignalColor(ForgeDirection dir) {
}
return res;
}

@Override
protected void readTypeSettings(ForgeDirection dir, NBTTagCompound dataRoot) {
protected void readTypeSettings(ForgeDirection dir, NBTTagCompound dataRoot) {
setExtractionSignalColor(dir, DyeColor.values()[dataRoot.getShort("extractionSignalColor")]);
setExtractionRedstoneMode(RedstoneControlMode.values()[dataRoot.getShort("extractionRedstoneMode")], dir);
}

@Override
protected void writeTypeSettingsToNbt(ForgeDirection dir, NBTTagCompound dataRoot) {
dataRoot.setShort("extractionSignalColor", (short)getExtractionSignalColor(dir).ordinal());
Expand Down Expand Up @@ -240,9 +241,9 @@ public void readFromNBT(NBTTagCompound nbtRoot, short nbtVersion) {

if(nbtRoot.hasKey("energyStored")) {
nbtRoot.setInteger("energyStoredRF", (int)(nbtRoot.getFloat("energyStored") * 10));

}
setEnergyStored(nbtRoot.getInteger("energyStoredRF"));
setEnergyStored(nbtRoot.getInteger("energyStoredRF"));

for (ForgeDirection dir : ForgeDirection.VALID_DIRECTIONS) {
String key = "pRsMode." + dir.name();
Expand All @@ -263,7 +264,7 @@ public void readFromNBT(NBTTagCompound nbtRoot, short nbtVersion) {
}

@Override
public void onTick() {
public void onTick() {
}

@Override
Expand All @@ -273,10 +274,10 @@ public int getEnergyStored() {

@Override
public void setEnergyStored(int energyStored) {
energyStoredRF = MathHelper.clamp_int(energyStored, 0, getMaxEnergyStored());
energyStoredRF = MathHelper.clamp_int(energyStored, 0, getMaxEnergyStored());
}


private boolean isRedstoneEnabled(ForgeDirection dir) {
boolean result;
RedstoneControlMode mode = getExtractionRedstoneMode(dir);
Expand All @@ -293,8 +294,8 @@ private boolean isRedstoneEnabled(ForgeDirection dir) {
boolean res;
if(mode == RedstoneControlMode.OFF) {
//if checking for no signal, must be no signal from both
res = mode.isConditionMet(mode, signal) && (col != DyeColor.RED || mode.isConditionMet(mode, exSig));
} else {
res = mode.isConditionMet(mode, signal) && (col != DyeColor.RED || mode.isConditionMet(mode, exSig));
} else {
//if checking for a signal, either is fine
res = mode.isConditionMet(mode, signal) || (col == DyeColor.RED && mode.isConditionMet(mode, exSig));
}
Expand Down Expand Up @@ -375,7 +376,7 @@ public int receiveEnergy(ForgeDirection from, int maxReceive, boolean simulate)
int freeSpace = getMaxEnergyStored() - getEnergyStored();
int result = (int) Math.min(maxReceive, freeSpace);
if(!simulate && result > 0) {
setEnergyStored(getEnergyStored() + result);
setEnergyStored(getEnergyStored() + result);

if(getBundle() != null) {
if(recievedTicks == null) {
Expand Down Expand Up @@ -422,10 +423,10 @@ public boolean setNetwork(AbstractConduitNetwork<?, ?> network) {
@Override
public boolean canConnectToExternal(ForgeDirection direction, boolean ignoreDisabled) {
IPowerInterface rec = getExternalPowerReceptor(direction);

return rec != null && rec.canConduitConnect(direction);
}

@Override
public boolean canConnectToConduit(ForgeDirection direction, IConduit conduit) {
boolean res = super.canConnectToConduit(direction, conduit);
Expand All @@ -438,7 +439,7 @@ public boolean canConnectToConduit(ForgeDirection direction, IConduit conduit) {
if( !(conduit instanceof IPowerConduit)) {
return false;
}
IPowerConduit pc = (IPowerConduit)conduit;
IPowerConduit pc = (IPowerConduit)conduit;
return pc.getMaxEnergyStored() == getMaxEnergyStored();
}

Expand Down
2 changes: 2 additions & 0 deletions src/main/java/crazypants/enderio/config/Config.java
Original file line number Diff line number Diff line change
Expand Up @@ -442,6 +442,7 @@ public String lc() {
public static int powerConduitTierOneRF = 640;
public static int powerConduitTierTwoRF = 5120;
public static int powerConduitTierThreeRF = 20480;
//public static int powerConduitTierFourRF = 81920;
public static boolean powerConduitOutputMJ = true;

public static int sliceAndSpliceLevelOnePowerPerTickRF = 80;
Expand Down Expand Up @@ -521,6 +522,7 @@ public String lc() {
public static float inventoryPanelExtractCostPerOperation = 32.0f;



public static void load(FMLPreInitializationEvent event) {
PacketHandler.INSTANCE.registerMessage(PacketConfigSync.class, PacketConfigSync.class, PacketHandler.nextID(), Side.CLIENT);

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -308,7 +308,7 @@ private void updateSpeed(EntityPlayer player) {
private void updateStepHeightAndFallDistance(EntityPlayer player) {
ItemStack boots = player.getEquipmentInSlot(1);

if(boots != null && !DarkSteelItems.isArmorPart(boots.getItem(), 3) && !player.capabilities.allowFlying) {
if(boots != null && DarkSteelItems.isArmorPart(boots.getItem(), 3) && !player.capabilities.allowFlying) {
int costedDistance = (int) player.fallDistance;
if(costedDistance > 0) {
int energyCost = costedDistance * Config.darkSteelFallDistanceCost;
Expand All @@ -321,7 +321,7 @@ private void updateStepHeightAndFallDistance(EntityPlayer player) {
}

JumpUpgrade jumpUpgrade = JumpUpgrade.loadFromItem(boots);
if(jumpUpgrade != null && boots != null && boots.getItem() == DarkSteelItems.itemDarkSteelBoots && isStepAssistActive(player)) {
if(jumpUpgrade != null && boots != null && DarkSteelItems.isArmorPart(boots.getItem(), 3) && isStepAssistActive(player)) {
player.stepHeight = 1.0023F;
} else if(player.stepHeight == 1.0023F) {
player.stepHeight = 0.5001F;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -186,7 +186,7 @@ public void addDetailedEntries(ItemStack itemstack, EntityPlayer entityplayer, L
if(EnergyUpgrade.itemHasAnyPowerUpgrade(itemstack)) {
list.add(EnumChatFormatting.WHITE + EnderIO.lang.localize("item."+name+"_armor.tooltip.line1"));
list.add(EnumChatFormatting.WHITE + EnderIO.lang.localize("item."+name+"_armor.tooltip.line2"));
if(itemstack.getItem() == DarkSteelItems.itemDarkSteelBoots) {
if(DarkSteelItems.isArmorPart(itemstack.getItem(), 3)) {
list.add(EnumChatFormatting.WHITE + EnderIO.lang.localize("item."+name+"_boots.tooltip.line1"));
list.add(EnumChatFormatting.WHITE + EnderIO.lang.localize("item."+name+"_boots.tooltip.line2"));
}
Expand Down

0 comments on commit 805ba22

Please sign in to comment.