Skip to content
This repository has been archived by the owner on Oct 4, 2024. It is now read-only.

Commit

Permalink
fixed wood and ironwood item barrels not using axe isntead of wrench tag
Browse files Browse the repository at this point in the history
  • Loading branch information
Trinsdar committed Nov 1, 2023
1 parent cfede84 commit 1efc1a5
Show file tree
Hide file tree
Showing 3 changed files with 20 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,8 @@
import net.minecraft.tags.BlockTags;
import net.minecraft.world.level.block.Block;

import static muramasa.antimatter.material.MaterialTags.WOOD;


public class GTCoreBlockTagProvider extends AntimatterBlockTagProvider {

Expand All @@ -23,10 +25,18 @@ public GTCoreBlockTagProvider(String providerDomain, String providerName, boolea
public void processTags(String domain) {
super.processTags(domain);
AntimatterAPI.all(BlockMachineMaterial.class, cas -> {
this.tag(AntimatterDefaultTools.WRENCH.getToolType()).add(cas);
if (cas.getMaterial().has(WOOD)){
this.tag(AntimatterDefaultTools.AXE.getToolType()).add(cas);
} else {
this.tag(AntimatterDefaultTools.WRENCH.getToolType()).add(cas);
}
});
AntimatterAPI.all(BlockMultiMachineMaterial.class, cas -> {
this.tag(AntimatterDefaultTools.WRENCH.getToolType()).add(cas);
if (cas.getMaterial().has(WOOD)){
this.tag(AntimatterDefaultTools.AXE.getToolType()).add(cas);
} else {
this.tag(AntimatterDefaultTools.WRENCH.getToolType()).add(cas);
}
});
/*AntimatterAPI.all(BlockMaterialChest.class, Ref.ID, cas -> {
this.tag(AntimatterDefaultTools.WRENCH.getToolType()).add(cas);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,10 @@ public BlockMachineMaterial(Machine<?> type, Tier tier, Properties properties) {
}
}

public Material getMaterial() {
return material;
}

@Override
public int getBlockColor(BlockState state, @Nullable BlockGetter world, @Nullable BlockPos pos, int i) {
return i == 0 ? material.getRGB() : -1;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,10 @@ public BlockMultiMachineMaterial(Machine<?> type, Tier tier) {
}
}

public Material getMaterial() {
return material;
}

@Override
public int getBlockColor(BlockState state, @Nullable BlockGetter world, @Nullable BlockPos pos, int i) {
return i == 0 ? material.getRGB() : -1;
Expand Down

0 comments on commit 1efc1a5

Please sign in to comment.