mirror of
https://github.com/GTNewHorizons/ForestryMC.git
synced 2026-11-21 04:22:32 +00:00
Update CircuitFarmLogic.java
I've created a custom farm logic for my seeds, but it just implements IFarmLogic, and doesn't extend FarmLogic (as that isn't available from the API), causing a ClassCastException. This would resolve that issue.
This commit is contained in:
1 parent
5fb04e4467
commit
9acb76a676
1 file changed
+2
-2
@@ -45,7 +45,7 @@ public class CircuitFarmLogic extends Circuit {
|
||||
if (!isCircuitable(tile))
|
||||
return;
|
||||
|
||||
FarmLogic logic = null;
|
||||
IFarmLogic logic = null;
|
||||
try {
|
||||
logic = logicClass.getConstructor(new Class[] { IFarmHousing.class }).newInstance(new Object[] { (IFarmHousing) tile });
|
||||
} catch (Exception ex) {
|
||||
@@ -53,7 +53,7 @@ public class CircuitFarmLogic extends Circuit {
|
||||
}
|
||||
|
||||
if (logic != null) {
|
||||
logic.setManual(isManual);
|
||||
if(logic instanceof FarmLogic) ((FarmLogic)logic).setManual(isManual);
|
||||
((IFarmHousing) tile).setFarmLogic(ForgeDirection.values()[slot + 2], logic);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user