Skip to content
Merged
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 @@ -244,6 +244,11 @@ public boolean isAttackable() {
return false;
}

@Override
public boolean fireImmune() {
return true;
}

@Override
protected void defineSynchedData(SynchedEntityData.Builder builder) {
builder.define(DATA_CAULDRON_POS, BlockPos.ZERO)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -83,6 +83,11 @@ public boolean isAttackable() {
return false;
}

@Override
public boolean fireImmune() {
return true;
}

@Override
protected void defineSynchedData(SynchedEntityData.Builder builder) {
builder.define(DATA_BLOCK_POS, BlockPos.ZERO).define(DATA_BLOCK_STATE, Blocks.AIR.defaultBlockState());
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3953,6 +3953,7 @@ public class ModBlocks {
DangerUtil.genConfiguredModel("block/multiphase_matter_block").get()
))
.item(MultiphaseMatterBlockItem::new)
.initialProperties(() -> new Item.Properties().fireResistant())
.tag(Tags.Items.STORAGE_BLOCKS, ModItemTags.STORAGE_BLOCKS_MULTIPHASE_MATTER)
.build()
.tag(
Expand Down
3 changes: 2 additions & 1 deletion src/main/java/dev/dubhe/anvilcraft/init/item/ModItems.java
Original file line number Diff line number Diff line change
Expand Up @@ -726,7 +726,8 @@ public class ModItems {
ItemTags.MINING_ENCHANTABLE,
ItemTags.FISHING_ENCHANTABLE,
ItemTags.STRIDER_TEMPT_ITEMS
).properties((properties) -> properties.durability(2031)).model(DataGenUtil::noExtraModelOrState).register();
).properties((properties) -> properties.durability(2031).fireResistant())
.model(DataGenUtil::noExtraModelOrState).register();

public static final ItemEntry<? extends SpectralSlingshotItem> SPECTRAL_SLINGSHOT = REGISTRATE
.item("spectral_slingshot", SpectralSlingshotItem::new)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -218,7 +218,6 @@ public static void registerRecipes(IRecipeRegistration registration) {
}

public static void registerRecipeCatalysts(IRecipeCatalystRegistration registration) {
registration.addRecipeCatalyst(ModBlocks.CURSED_GOLD_BLOCK.asStack(), AnvilCraftJeiPlugin.TRANSCENDIUM_RECIPE);
registration.addRecipeCatalyst(new ItemStack(Items.ANVIL), AnvilCraftJeiPlugin.TRANSCENDIUM_RECIPE);
registration.addRecipeCatalyst(new ItemStack(ModBlocks.ROYAL_ANVIL), AnvilCraftJeiPlugin.TRANSCENDIUM_RECIPE);
registration.addRecipeCatalyst(new ItemStack(ModBlocks.EMBER_ANVIL), AnvilCraftJeiPlugin.TRANSCENDIUM_RECIPE);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ public class EmberMetalResonatorItem extends ResonatorItem {
public EmberMetalResonatorItem(Properties properties) {
super(
ModTiers.EMBER_METAL,
properties
properties.fireResistant()
.attributes(ResonatorItem.createAttributes(ModTiers.EMBER_METAL, 10, -3f))
.component(ModComponents.FIRE_REFORGING, Unit.INSTANCE)
);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,7 @@ public class FrostMetalAxeItem extends AxeItem {
public FrostMetalAxeItem(Properties properties) {
super(
ModTiers.FROST_METAL,
properties.fireResistant()
.attributes(AxeItem.createAttributes(ModTiers.FROST_METAL, 9, -3f))
properties.attributes(AxeItem.createAttributes(ModTiers.FROST_METAL, 9, -3f))
.component(ModComponents.MERCILESS, Merciless.DEFAULT)
);
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,7 @@ public class FrostMetalHoeItem extends HoeItem {
public FrostMetalHoeItem(Properties properties) {
super(
ModTiers.FROST_METAL,
properties.fireResistant()
.attributes(HoeItem.createAttributes(ModTiers.FROST_METAL, 1, 0))
properties.attributes(HoeItem.createAttributes(ModTiers.FROST_METAL, 1, 0))
.component(ModComponents.MERCILESS, Merciless.DEFAULT)
);
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,7 @@ public class FrostMetalPickaxeItem extends PickaxeItem {
public FrostMetalPickaxeItem(Properties properties) {
super(
ModTiers.FROST_METAL,
properties.fireResistant()
.attributes(PickaxeItem.createAttributes(ModTiers.FROST_METAL, 4, -2.8f))
properties.attributes(PickaxeItem.createAttributes(ModTiers.FROST_METAL, 4, -2.8f))
.component(ModComponents.MERCILESS, Merciless.DEFAULT)
);
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,7 @@ public class FrostMetalShovelItem extends ShovelItem {
public FrostMetalShovelItem(Properties properties) {
super(
ModTiers.FROST_METAL,
properties.fireResistant()
.attributes(ShovelItem.createAttributes(ModTiers.FROST_METAL, 5, -3f))
properties.attributes(ShovelItem.createAttributes(ModTiers.FROST_METAL, 5, -3f))
.component(ModComponents.MERCILESS, Merciless.DEFAULT)
);
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,7 @@ public class FrostMetalSwordItem extends SwordItem {
public FrostMetalSwordItem(Properties properties) {
super(
ModTiers.FROST_METAL,
properties.fireResistant()
.attributes(SwordItem.createAttributes(ModTiers.FROST_METAL, 7, -2.4f))
properties.attributes(SwordItem.createAttributes(ModTiers.FROST_METAL, 7, -2.4f))
.component(ModComponents.MERCILESS, Merciless.DEFAULT)
);
}
Expand Down
4 changes: 1 addition & 3 deletions src/main/java/dev/dubhe/anvilcraft/item/ResonatorItem.java
Original file line number Diff line number Diff line change
Expand Up @@ -70,9 +70,7 @@ public abstract class ResonatorItem extends TieredItem {
public ResonatorItem(Tier tier, Properties properties) {
super(
tier,
properties
.component(DataComponents.TOOL, createToolProperties(tier))
.fireResistant()
properties.component(DataComponents.TOOL, createToolProperties(tier))
);
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ public class TranscendenceResonatorItem extends ResonatorItem {
public TranscendenceResonatorItem(Properties properties) {
super(
ModTiers.TRANSCENDIUM,
properties
properties.fireResistant()
.attributes(ResonatorItem.createAttributes(ModTiers.TRANSCENDIUM, 17, -3f))
.component(ModComponents.MULTIPHASE, new MultiphaseRef())
.component(DataComponents.ITEM_NAME, Multiphase.firstPhaseName(NAME))
Expand Down