forked from RebelKeithy/Metallurgy3
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request RebelKeithy#71 from lclc98/master
Fixed RebelKeithy#22, RebelKeithy#63, RebelKeithy#70 and half of RebelKeithy#58
- Loading branch information
Showing
28 changed files
with
1,171 additions
and
23 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
65 changes: 65 additions & 0 deletions
65
common/rebelkeithy/mods/metallurgy/integration/ComputerCraftTurtle.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,65 @@ | ||
package rebelkeithy.mods.metallurgy.integration; | ||
|
||
import net.minecraft.item.Item; | ||
import net.minecraft.item.ItemStack; | ||
import net.minecraft.util.Icon; | ||
import dan200.computer.api.IHostedPeripheral; | ||
import dan200.turtle.api.ITurtleAccess; | ||
import dan200.turtle.api.ITurtleUpgrade; | ||
import dan200.turtle.api.TurtleSide; | ||
import dan200.turtle.api.TurtleUpgradeType; | ||
import dan200.turtle.api.TurtleVerb; | ||
|
||
public class ComputerCraftTurtle implements ITurtleUpgrade { | ||
|
||
int id; | ||
String name; | ||
Item tool; | ||
|
||
public ComputerCraftTurtle(int id, String name, Item tool) { | ||
this.id = id; | ||
this.name = name; | ||
this.tool = tool; | ||
} | ||
|
||
@Override | ||
public int getUpgradeID() { | ||
return id; | ||
} | ||
|
||
@Override | ||
public String getAdjective() { | ||
return name; | ||
} | ||
|
||
@Override | ||
public TurtleUpgradeType getType() { | ||
return TurtleUpgradeType.Tool; | ||
} | ||
|
||
@Override | ||
public ItemStack getCraftingItem() { | ||
return new ItemStack(tool); | ||
} | ||
|
||
@Override | ||
public boolean isSecret() { | ||
return false; | ||
} | ||
|
||
@Override | ||
public IHostedPeripheral createPeripheral(ITurtleAccess turtle, TurtleSide side) { | ||
return null; | ||
} | ||
|
||
@Override | ||
public boolean useTool(ITurtleAccess turtle, TurtleSide side, TurtleVerb verb, int direction) { | ||
return false; | ||
} | ||
|
||
@Override | ||
public Icon getIcon(ITurtleAccess turtle, TurtleSide side) { | ||
return tool.getIconFromDamage(0); | ||
} | ||
|
||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.