Skip to content
Draft
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
21 changes: 19 additions & 2 deletions src/generated/resources/assets/anvilcraft/lang/en_ud.json
Original file line number Diff line number Diff line change
Expand Up @@ -221,6 +221,8 @@
"anvilcraft.configuration.show_multiphase_stored_id.tooltip": "ᗡI pǝɹoʇs ǝsɐɥdᴉʇꞁnɯ sʍoɥs ʇɐɥʇ ǝuᴉꞁ dᴉʇꞁooʇ ɐ ppⱯ",
"anvilcraft.configuration.sliding_rail_stick_to_each_other": "ɹǝɥʇO ɥɔɐƎ o⟘ ʞɔᴉʇS ꞁᴉɐᴚ ᵷuᴉpᴉꞁS",
"anvilcraft.configuration.sliding_rail_stick_to_each_other.tooltip": "sꞁᴉɐɹ ɹǝɥʇo oʇ uᴉɐɥɔ ꞁꞁᴉʍ ꞁᴉɐɹ ᵷuᴉpᴉꞁs ɐ ᵷuᴉꞁꞁnd ɹo ᵷuᴉɥsnԀ",
"anvilcraft.configuration.storage_recover_max_size": "ǝzᴉS xɐW ɹǝʌoɔǝᴚ ǝᵷɐɹoʇS",
"anvilcraft.configuration.storage_recover_max_size.tooltip": "uoᴉʇɐʇs ɹǝʌoɔǝɹ ,sǝᵷɐɹoʇs uᴉ sǝᴉɹʇuǝ ǝɥʇ ɟo ǝzᴉs xɐɯ ǝɥ⟘",
"anvilcraft.configuration.title": "uoᴉʇɐɹnᵷᴉɟuoƆ ʇɟɐɹɔꞁᴉʌuⱯ",
"anvilcraft.configuration.transcendence_anvil_beyond_max_level": "ꞁǝʌǝꞀ xɐW puoʎǝᗺ ꞁᴉʌuⱯ ǝɔuǝpuǝɔsuɐɹ⟘",
"anvilcraft.configuration.transcendence_anvil_beyond_max_level.tooltip": "ꞁᴉʌuⱯ ǝɔuǝpuǝɔsuɐɹ⟘ uᴉ ꞁǝʌǝꞁ xɐɯ puoʎǝq sʞooᗺ pǝʇuɐɥɔuƎ ɥʇᴉʍ sɯǝʇᴉ ᵷuᴉuᴉqɯoƆ",
Expand Down Expand Up @@ -567,12 +569,16 @@
"block.anvilcraft.zinc_block": "ɔuᴉZ ɟo ʞɔoꞁᗺ",
"block.anvilcraft.zinc_pressure_plate": "ǝʇɐꞁԀ ǝɹnssǝɹԀ ɔuᴉZ",
"book.anvilcraft.material_list.missing_header": ":ᵷuᴉssᴉW",
"category.anvilcraft.block": "sɯǝʇI ʞɔoꞁᗺ",
"category.anvilcraft.enchanted": "sɯǝʇI pǝʇuɐɥɔuƎ",
"category.anvilcraft.foods_and_drinks": "sʞuᴉɹᗡ puɐ spooℲ",
"category.anvilcraft.filter": "ʎɹoᵷǝʇɐƆ ʍǝN",
"category.anvilcraft.food_and_drink": "sʞuᴉɹᗡ puɐ spooℲ",
"category.anvilcraft.namespace": "sɯǝʇI %s",
"category.anvilcraft.namespace.anvilcraft": "ʇɟɐɹƆꞁᴉʌuⱯ",
"category.anvilcraft.namespace.minecraft": "ʇɟɐɹɔǝuᴉW",
"category.anvilcraft.redstone": "sɯǝʇI ǝuoʇspǝᴚ",
"category.anvilcraft.unknown_namespace": "<%s> uʍouʞu∩",
"category.anvilcraft.unstackable": "sɯǝʇI ǝꞁqɐʞɔɐʇsu∩",
"command.anvilcraft.multiBlock.multi_block_pos": " sᴉ sod ʇɹɐd uᴉɐW",
"command.anvilcraft.multiBlock.not_multi_block": "ʞɔoꞁq-ᴉʇꞁnɯ ɐ ʇou sᴉ ʞɔoꞁq sᴉɥ⟘",
"command.anvilcraft.multiphase.apply.not_player": "ɹǝʎɐꞁd ʇou sᴉ ɹǝuunɹ puɐɯɯoƆ",
Expand Down Expand Up @@ -1403,6 +1409,15 @@
"screen.anvilcraft.smithing_template.transcendium_upgrade_smithing_template.applies_to": "poᴚ uoᵷɐɹᗡ ɹǝqɯƎ 'ɹǝɯɯɐH ꞁᴉʌuⱯ ɹǝqɯƎ 'ꞁᴉʌuⱯ ꞁɐʇǝW ɹǝqɯƎ",
"screen.anvilcraft.smithing_template.transcendium_upgrade_smithing_template.base_slot_description": "ɯǝʇᴉ ǝꞁqɐpɐɹᵷdn ʇnԀ",
"screen.anvilcraft.smithing_template.transcendium_upgrade_smithing_template.upgrade_ingredients": "ʞɔoꞁᗺ ɯnᴉpuǝɔsuɐɹ⟘ ɹo ʇoᵷuI ɯnᴉpuǝɔsuɐɹ⟘",
"screen.anvilcraft.storage.category.add": "ʎɹoᵷǝʇɐɔ ɯoʇsnɔ ppɐ oʇ ɹǝʇꞁᴉℲ ᵷuᴉpꞁoɥ uǝɥʍ ʞɔᴉꞁɔ ʇɟǝꞀ",
"screen.anvilcraft.storage.category.alternate.removable": "ʎɹoᵷǝʇɐɔ sᴉɥʇ ǝʇǝꞁǝp oʇ ʞɔᴉꞁɔ ʇɥᵷᴉɹ 'ʇɔǝꞁǝs oʇ ʞɔᴉꞁɔ ʇɟǝꞀ",
"screen.anvilcraft.storage.category.alternate.unremovable": "ʇɔǝꞁǝs oʇ ʞɔᴉꞁɔ ʇɟǝꞀ",
"screen.anvilcraft.storage.category.mode": "%s :ǝpoW",
"screen.anvilcraft.storage.category.mode.allowlist": "ʎɐꞁdsᴉᗡ ʍoꞁꞁⱯ",
"screen.anvilcraft.storage.category.mode.blocklist": "ʎɐꞁdsᴉᗡ ʞɔoꞁᗺ",
"screen.anvilcraft.storage.category.mode.unlimited": "pǝʇᴉɯᴉꞁu∩",
"screen.anvilcraft.storage.category.name": "%s :ǝɯɐN",
"screen.anvilcraft.storage.category.tooltip": "doʇ oʇ uᴉd oʇ ʞɔᴉꞁɔ ʇɥᵷᴉɹ 'sǝʇɐuɹǝʇꞁɐ oʇ ǝʌoɯ oʇ ʞɔᴉꞁɔ ʇɟǝꞀ",
"screen.anvilcraft.structure_scanner.info_title": "oɟuI ǝɹnʇɔnɹʇS",
"screen.anvilcraft.structure_scanner.ready": "ʎpɐǝɹ uɐɔS",
"screen.anvilcraft.structure_scanner.tooltip.large_structure": "pǝʌɐs ǝq ꞁꞁᴉʇs uɐɔ ʇnq 'ɹǝɔɐꞁԀ ʞɔoꞁᗺ ʇɹɐɯS ǝɥʇ ʎq pǝɔɐꞁd ǝq ʇouuɐɔ puɐ ǝᵷɹɐꞁ sᴉ ǝɹnʇɔnɹʇs sᴉɥ⟘",
Expand Down Expand Up @@ -1802,6 +1817,8 @@
"tooltip.anvilcraft.property.multiphase.suffix.3": "δ-",
"tooltip.anvilcraft.property.providence": "sǝɯᴉʇ ǝꞁdᴉʇꞁnɯ sʇuǝɯʇuɐɥɔuǝ [%s pꞁoH] ɹǝᵷᵷᴉɹʇ oʇ ǝɔuɐɥɔ sɐɥ :ǝɔuǝpᴉʌoɹԀ",
"tooltip.anvilcraft.property.providence.shifting": "sǝɯᴉʇ ǝꞁdᴉʇꞁnɯ sʇuǝɯʇuɐɥɔuǝ (%s) ɹǝᵷᵷᴉɹʇ oʇ ǝɔuɐɥɔ sɐɥ :ǝɔuǝpᴉʌoɹԀ",
"tooltip.anvilcraft.property.storage.id": "%s :ᗡI ǝᵷɐɹoʇS",
"tooltip.anvilcraft.property.storage.id.null": "ᵷuᴉɔɐꞁd uǝɥʍ ǝʇɐǝɹɔ ꞁꞁᴉʍ 'ʇǝʎ ǝuoN",
"tooltip.anvilcraft.property.stored_energy": "%s :ʎᵷɹǝuƎ ᵷuᴉuᴉɐɯǝᴚ",
"tooltip.anvilcraft.redstone.output_mode": "%s :ǝpoW ʇndʇnO ",
"tooltip.anvilcraft.redstone.output_mode.compare": "ǝɹɐdɯoƆ",
Expand All @@ -1816,4 +1833,4 @@
"tooltip.anvilcraft.working_progress.progress": "%%%2$s %1$s ",
"tooltip.anvilcraft.working_progress.time": "%2$s / %1$s ",
"tooltip.anvilcraft.working_progress.title": ":ssǝɹᵷoɹd ᵷuᴉʞɹoM"
}
}
21 changes: 19 additions & 2 deletions src/generated/resources/assets/anvilcraft/lang/en_us.json
Original file line number Diff line number Diff line change
Expand Up @@ -221,6 +221,8 @@
"anvilcraft.configuration.show_multiphase_stored_id.tooltip": "Add a tooltip line that shows multiphase stored ID",
"anvilcraft.configuration.sliding_rail_stick_to_each_other": "Sliding Rail Stick To Each Other",
"anvilcraft.configuration.sliding_rail_stick_to_each_other.tooltip": "Pushing or pulling a sliding rail will chain to other rails",
"anvilcraft.configuration.storage_recover_max_size": "Storage Recover Max Size",
"anvilcraft.configuration.storage_recover_max_size.tooltip": "The max size of the entries in storages' recover station",
"anvilcraft.configuration.title": "Anvilcraft Configuration",
"anvilcraft.configuration.transcendence_anvil_beyond_max_level": "Transcendence Anvil Beyond Max Level",
"anvilcraft.configuration.transcendence_anvil_beyond_max_level.tooltip": "Combining items with Enchanted Books beyond max level in Transcendence Anvil",
Expand Down Expand Up @@ -567,12 +569,16 @@
"block.anvilcraft.zinc_block": "Block of Zinc",
"block.anvilcraft.zinc_pressure_plate": "Zinc Pressure Plate",
"book.anvilcraft.material_list.missing_header": "Missing:",
"category.anvilcraft.block": "Block Items",
"category.anvilcraft.enchanted": "Enchanted Items",
"category.anvilcraft.foods_and_drinks": "Foods and Drinks",
"category.anvilcraft.filter": "New Category",
"category.anvilcraft.food_and_drink": "Foods and Drinks",
"category.anvilcraft.namespace": "%s Items",
"category.anvilcraft.namespace.anvilcraft": "AnvilCraft",
"category.anvilcraft.namespace.minecraft": "Minecraft",
"category.anvilcraft.redstone": "Redstone Items",
"category.anvilcraft.unknown_namespace": "Unknown <%s>",
"category.anvilcraft.unstackable": "Unstackable Items",
"command.anvilcraft.multiBlock.multi_block_pos": "Main part pos is ",
"command.anvilcraft.multiBlock.not_multi_block": "This block is not a multi-block",
"command.anvilcraft.multiphase.apply.not_player": "Command runner is not player",
Expand Down Expand Up @@ -1403,6 +1409,15 @@
"screen.anvilcraft.smithing_template.transcendium_upgrade_smithing_template.applies_to": "Ember Metal Anvil, Ember Anvil Hammer, Ember Dragon Rod",
"screen.anvilcraft.smithing_template.transcendium_upgrade_smithing_template.base_slot_description": "Put upgradable item",
"screen.anvilcraft.smithing_template.transcendium_upgrade_smithing_template.upgrade_ingredients": "Transcendium Ingot or Transcendium Block",
"screen.anvilcraft.storage.category.add": "Left click when holding Filter to add custom category",
"screen.anvilcraft.storage.category.alternate.removable": "Left click to select, right click to delete this category",
"screen.anvilcraft.storage.category.alternate.unremovable": "Left click to select",
"screen.anvilcraft.storage.category.mode": "Mode: %s",
"screen.anvilcraft.storage.category.mode.allowlist": "Allow Display",
"screen.anvilcraft.storage.category.mode.blocklist": "Block Display",
"screen.anvilcraft.storage.category.mode.unlimited": "Unlimited",
"screen.anvilcraft.storage.category.name": "Name: %s",
"screen.anvilcraft.storage.category.tooltip": "Left click to move to alternates, right click to pin to top",
"screen.anvilcraft.structure_scanner.info_title": "Structure Info",
"screen.anvilcraft.structure_scanner.ready": "Scan ready",
"screen.anvilcraft.structure_scanner.tooltip.large_structure": "This structure is large and cannot be placed by the Smart Block Placer, but can still be saved",
Expand Down Expand Up @@ -1802,6 +1817,8 @@
"tooltip.anvilcraft.property.multiphase.suffix.3": "-δ",
"tooltip.anvilcraft.property.providence": "Providence: has chance to trigger [Hold %s] enchantments multiple times",
"tooltip.anvilcraft.property.providence.shifting": "Providence: has chance to trigger (%s) enchantments multiple times",
"tooltip.anvilcraft.property.storage.id": "Storage ID: %s",
"tooltip.anvilcraft.property.storage.id.null": "None yet, will create when placing",
"tooltip.anvilcraft.property.stored_energy": "Remaining Energy: %s",
"tooltip.anvilcraft.redstone.output_mode": " Output Mode: %s",
"tooltip.anvilcraft.redstone.output_mode.compare": "Compare",
Expand All @@ -1816,4 +1833,4 @@
"tooltip.anvilcraft.working_progress.progress": " %1$s %2$s%%",
"tooltip.anvilcraft.working_progress.time": " %1$s / %2$s",
"tooltip.anvilcraft.working_progress.title": "Working progress:"
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
{
"type": "anvilcraft:block"
}
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,8 @@
"translate": "category.anvilcraft.enchanted"
},
"predicates": {
"anvilcraft:disabled_enchantments": {},
"anvilcraft:merciless_enchantments": {},
"anvilcraft:disabled_enchantment": [],
"anvilcraft:merciless_enchantment": [],
"minecraft:enchantments": [],
"minecraft:stored_enchantments": []
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
"id": "minecraft:apple"
},
"name": {
"translate": "category.anvilcraft.foods_and_drinks"
"translate": "category.anvilcraft.food_and_drink"
},
"predicates": {
"minecraft:food": {},
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
{
"type": "anvilcraft:namespace",
"icon": {
"id": "minecraft:grass_block"
},
"name": {
"translate": "category.anvilcraft.namespace",
"with": [
{
"mod_id": "minecraft"
}
]
},
"namespace": "minecraft"
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
{
"type": "anvilcraft:unstackable"
}
Original file line number Diff line number Diff line change
Expand Up @@ -173,6 +173,10 @@ public int getMaxStackSize() {
return this.getItem().getMaxStackSize(this.toStack());
}

public boolean isStackable() {
return this.getMaxStackSize() > 1 && (!this.stack.isDamageableItem() || !this.stack.isDamaged());
}

public UnlimitedItemStack copy() {
return new UnlimitedItemStack(this.stack, this.count);
}
Expand Down
3 changes: 3 additions & 0 deletions src/main/java/dev/dubhe/anvilcraft/AnvilCraft.java
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,9 @@
import dev.dubhe.anvilcraft.init.recipe.ModRecipeTypes;
import dev.dubhe.anvilcraft.init.recipe.ModResultModifierTypes;
import dev.dubhe.anvilcraft.init.storage.ModCategoryTypes;
import dev.dubhe.anvilcraft.mixin.invoker.BaseMappedRegistryInvoker;
import lombok.Getter;
import net.minecraft.core.registries.BuiltInRegistries;
import net.minecraft.resources.Identifier;
import net.neoforged.bus.api.IEventBus;
import net.neoforged.fml.ModContainer;
Expand Down Expand Up @@ -174,6 +176,7 @@ public static void loadComplete(FMLLoadCompleteEvent event) {
CONFIG.emberAnvilBeyondMaxLevel = true;
CONFIG.transcendenceAnvilBeyondMaxLevel = true;
}
Util.<BaseMappedRegistryInvoker>cast(BuiltInRegistries.DATA_COMPONENT_PREDICATE_TYPE).invokeSetSync(true);
});
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@
import org.jspecify.annotations.Nullable;

import java.util.List;
import java.util.Objects;
import java.util.Optional;

@Getter(AccessLevel.PROTECTED)
Expand Down Expand Up @@ -94,4 +95,15 @@ public MutableComponent resolve(ResolutionContext context, int recursionDepth) t
public MapCodec<? extends ComponentContents> codec() {
return ModNameContents.CODEC;
}

@Override
public boolean equals(Object o) {
if (!(o instanceof ModNameContents that)) return false;
return Objects.equals(this.getId(), that.getId());
}

@Override
public int hashCode() {
return Objects.hashCode(this.getId());
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
package dev.dubhe.anvilcraft.api.energy;

import net.minecraft.core.Direction;
import net.neoforged.neoforge.transfer.energy.EnergyHandler;
import org.jspecify.annotations.Nullable;

/// 持有 EnergyHandler 的
public interface IEnergyHandlerHolder {
@Nullable EnergyHandler getEnergyHandler(@Nullable Direction direction);
}
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
import net.neoforged.neoforge.transfer.ResourceHandler;
import net.neoforged.neoforge.transfer.fluid.FluidResource;

/// 持有FluidTank的
/// 持有 FluidTank 的
public interface IFluidHandlerHolder {
ResourceHandler<FluidResource> getFluidHandler();
}
Loading
Loading