Skip to content

Commit

Permalink
Fix method name conflict between TileEntity and ILaserTarget
Browse files Browse the repository at this point in the history
I'm told this original decision was intentional, but Loom prefers not to reobfuscate the method as it's defined in a custom interface. 1.4 MCP instead reobfuscated it, which was relied upon here. In 1.7 this would have been an error during reobfuscation.
  • Loading branch information
unascribed committed Jun 26, 2022
1 parent e4db7ec commit 06dc8a8
Show file tree
Hide file tree
Showing 4 changed files with 14 additions and 3 deletions.
2 changes: 1 addition & 1 deletion common/buildcraft/silicon/ILaserTarget.java
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ public interface ILaserTarget {

void receiveLaserEnergy(float energy);

boolean isInvalid();
boolean isLaserInvalid();

int getXCoord();

Expand Down
6 changes: 5 additions & 1 deletion common/buildcraft/silicon/TileAssemblyAdvancedWorkbench.java
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@
import net.minecraft.inventory.InventoryCrafting;
import net.minecraft.inventory.SlotCrafting;
import net.minecraft.item.ItemStack;
import net.minecraft.item.crafting.CraftingManager;
import net.minecraft.item.crafting.IRecipe;
import net.minecraft.nbt.NBTTagCompound;
import net.minecraft.nbt.NBTTagList;
Expand Down Expand Up @@ -465,5 +464,10 @@ public void sendGUINetworkData(Container container, ICrafting iCrafting) {
iCrafting.sendProgressBarUpdate(container, 4, lRecentEnergy & 0xFFFF);
iCrafting.sendProgressBarUpdate(container, 5, (lRecentEnergy >>> 16) & 0xFFFF);
}

@Override
public boolean isLaserInvalid() {
return isInvalid();
}

}
7 changes: 7 additions & 0 deletions common/buildcraft/silicon/TileAssemblyTable.java
Original file line number Diff line number Diff line change
Expand Up @@ -74,6 +74,7 @@ public LinkedList<AssemblyRecipe> getPotentialOutputs() {
return result;
}

@Override
public void receiveLaserEnergy(float energy) {
energyStored += energy;
recentEnergy[tick] += energy;
Expand Down Expand Up @@ -492,4 +493,10 @@ public int getYCoord() {
public int getZCoord() {
return zCoord;
}

@Override
public boolean isLaserInvalid() {
return isInvalid();
}

}
2 changes: 1 addition & 1 deletion common/buildcraft/silicon/TileLaser.java
Original file line number Diff line number Diff line change
Expand Up @@ -102,7 +102,7 @@ protected boolean canUpdateLaser() {

protected boolean isValidTable() {

if (laserTarget == null || laserTarget.isInvalid() || !laserTarget.hasCurrentWork())
if (laserTarget == null || ((TileEntity)laserTarget).isInvalid() || !laserTarget.hasCurrentWork())
return false;

return true;
Expand Down

0 comments on commit 06dc8a8

Please sign in to comment.