Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -85,6 +85,11 @@ public String toString() {
*/
public static final MaterialFlag PHOSPHORESCENT = new MaterialFlag.Builder("phosphorescent").build();

/**
* Add to material if it is fire resistant
*/
public static final MaterialFlag FIRE_RESISTANT = new MaterialFlag.Builder("fire_resistant").build();

//////////////////
// DUST //
//////////////////
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@

import com.gregtechceu.gtceu.GTCEu;
import com.gregtechceu.gtceu.api.data.chemical.material.Material;
import com.gregtechceu.gtceu.api.data.chemical.material.info.MaterialFlags;
import com.gregtechceu.gtceu.api.item.IGTTool;
import com.gregtechceu.gtceu.api.sound.SoundEntry;
import com.gregtechceu.gtceu.client.renderer.item.ToolItemRenderer;
Expand Down Expand Up @@ -53,7 +54,8 @@ public class GTToolItem extends DiggerItem implements IGTTool {

public GTToolItem(GTToolType toolType, MaterialToolTier tier, Material material, IGTToolDefinition definition,
Properties properties) {
super(0, 0, tier, toolType.harvestTags.isEmpty() ? null : toolType.harvestTags.get(0), properties);
super(0, 0, tier, toolType.harvestTags.isEmpty() ? null : toolType.harvestTags.get(0),
material.hasFlag(MaterialFlags.FIRE_RESISTANT) ? properties.fireResistant() : properties);
this.toolType = toolType;
this.material = material;
this.electricTier = toolType.electricTier;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@

import com.gregtechceu.gtceu.api.GTCEuAPI;
import com.gregtechceu.gtceu.api.data.chemical.material.Material;
import com.gregtechceu.gtceu.api.data.chemical.material.info.MaterialFlags;
import com.gregtechceu.gtceu.api.data.chemical.material.properties.PropertyKey;
import com.gregtechceu.gtceu.api.data.chemical.material.registry.MaterialRegistry;
import com.gregtechceu.gtceu.api.data.chemical.material.stack.MaterialEntry;
Expand Down Expand Up @@ -86,7 +87,9 @@ public static void generateMaterialItems() {
private static void generateMaterialItem(TagPrefix tagPrefix, Material material, GTRegistrate registrate) {
MATERIAL_ITEMS_BUILDER.put(tagPrefix, material, registrate
.item(tagPrefix.idPattern().formatted(material.getName()),
properties -> tagPrefix.itemConstructor().create(properties, tagPrefix, material))
properties -> tagPrefix.itemConstructor()
.create(material.hasFlag(MaterialFlags.FIRE_RESISTANT) ? properties.fireResistant() :
properties, tagPrefix, material))
.setData(ProviderType.LANG, NonNullBiConsumer.noop())
.transform(GTItems.unificationItem(tagPrefix, material))
.properties(p -> p.stacksTo(tagPrefix.maxStackSize()))
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -392,6 +392,7 @@ public static void register() {

Netherite = new Material.Builder(GTCEu.id("netherite"))
.ingot().color(0x4b4042).secondaryColor(0x474447)
.flags(FIRE_RESISTANT)
.toolStats(ToolProperty.Builder.of(10.0F, 4.0F, 2032, 4)
.enchantability(21).build())
.buildAndRegister();
Expand Down
Loading