mirror of
https://github.com/GTNewHorizons/TinkersConstruct.git
synced 2026-11-21 12:42:57 +00:00
* Implement AoE exclusion list for Tinkers' Construct tools - Created AoEExclusionList class in tconstruct.library.util package - Added config file loading for tool-specific block exclusions - Modified AOEHarvestTool class to check exclusions before breaking blocks - Updated Hammer class to use new exclusion system - Added debug logging for troubleshooting This change allows users to specify blocks that should not be broken by the AoE effect of tools like the Hammer, while still allowing the targeted block to be broken. * Implement AoE exclusion list for Tinkers' Construct tools - Created AoEExclusionList class in tconstruct.library.util package - Added config file loading for tool-specific block exclusions - Modified AOEHarvestTool class to check exclusions before breaking blocks - Updated Hammer class to use new exclusion system - Added debug logging for troubleshooting This change allows users to specify blocks that should not be broken by the AoE effect of tools like the Hammer, while still allowing the targeted block to be broken. * Update README.md * Removed/Commented debug. * Gradle Clean * Removed missed debug message Added example formatting for config file. Inlined Variable * Added the license back, oops * Removed redundant variable * Brought back toolName, used proper getAOEToolName variable, intended for caching the name instead of calling the method later on. Changed function call to simply toolName in relation to this. * Removed now redundant if statements. * Spotless Apply * Changed to use Set<String> instead of Map<String>, and other appropriate changes made so other parts still work properly & SpotlesApply * Reinstated original README * Changed to include metadata (optionally) in the blacklist. * Changed to include metadata (optionally) in the blacklist. * Removed bad import. * .
117 lines
2.3 KiB
Java
117 lines
2.3 KiB
Java
package tconstruct.items.tools;
|
|
|
|
import net.minecraft.block.material.Material;
|
|
import net.minecraft.item.Item;
|
|
|
|
import tconstruct.library.tools.AOEHarvestTool;
|
|
import tconstruct.tools.TinkerTools;
|
|
|
|
public class Excavator extends AOEHarvestTool {
|
|
|
|
public Excavator() {
|
|
super(2, 1, 0);
|
|
this.setUnlocalizedName("InfiTool.Excavator");
|
|
}
|
|
|
|
@Override
|
|
protected String getAOEToolName() {
|
|
return "excavator";
|
|
}
|
|
|
|
@Override
|
|
protected Material[] getEffectiveMaterials() {
|
|
return materials;
|
|
}
|
|
|
|
@Override
|
|
protected String getHarvestType() {
|
|
return "shovel";
|
|
}
|
|
|
|
static Material[] materials = { Material.grass, Material.ground, Material.sand, Material.snow, Material.craftedSnow,
|
|
Material.clay };
|
|
|
|
@Override
|
|
public Item getHeadItem() {
|
|
return TinkerTools.excavatorHead;
|
|
}
|
|
|
|
@Override
|
|
public Item getHandleItem() {
|
|
return TinkerTools.toughRod;
|
|
}
|
|
|
|
@Override
|
|
public Item getAccessoryItem() {
|
|
return TinkerTools.largePlate;
|
|
}
|
|
|
|
@Override
|
|
public Item getExtraItem() {
|
|
return TinkerTools.toughBinding;
|
|
}
|
|
|
|
@Override
|
|
public float getRepairCost() {
|
|
return 4.0f;
|
|
}
|
|
|
|
@Override
|
|
public float getDurabilityModifier() {
|
|
return 2.75f;
|
|
}
|
|
|
|
@Override
|
|
public int durabilityTypeAccessory() {
|
|
return 2;
|
|
}
|
|
|
|
@Override
|
|
public int durabilityTypeExtra() {
|
|
return 1;
|
|
}
|
|
|
|
@Override
|
|
public int getPartAmount() {
|
|
return 4;
|
|
}
|
|
|
|
@Override
|
|
public String getIconSuffix(int partType) {
|
|
switch (partType) {
|
|
case 0:
|
|
return "_excavator_head";
|
|
case 1:
|
|
return "_excavator_head_broken";
|
|
case 2:
|
|
return "_excavator_handle";
|
|
case 3:
|
|
return "_excavator_binding";
|
|
case 4:
|
|
return "_excavator_grip";
|
|
default:
|
|
return "";
|
|
}
|
|
}
|
|
|
|
@Override
|
|
public String getEffectSuffix() {
|
|
return "_excavator_effect";
|
|
}
|
|
|
|
@Override
|
|
public String getDefaultFolder() {
|
|
return "excavator";
|
|
}
|
|
|
|
@Override
|
|
public float breakSpeedModifier() {
|
|
return 0.4f;
|
|
}
|
|
|
|
@Override
|
|
public float stoneboundModifier() {
|
|
return 216f;
|
|
}
|
|
}
|