Skip to content

Commit

Permalink
Revert Data operator names to use NBT
Browse files Browse the repository at this point in the history
  • Loading branch information
rubensworks committed Jul 12, 2024
1 parent ddc6e5f commit 53a807d
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 17 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -1523,7 +1523,7 @@ public IValue evaluate(OperatorBase.SafeVariablesGetter variables) throws Evalua
* If the data components of the given stacks are equal.
*/
public static final IOperator OBJECT_ITEMSTACK_ISDATAEQUAL = REGISTRY.register(OperatorBuilders.ITEMSTACK_2
.output(ValueTypes.BOOLEAN).symbol("=DATA=").operatorName("isdataequal").interactName("isDataEqual")
.output(ValueTypes.BOOLEAN).symbol("=NBT=").operatorName("isnbtequal").interactName("isNbtEqual")
.function(variables -> {
ValueObjectTypeItemStack.ValueItemStack valueStack0 = variables.getValue(0, ValueTypes.OBJECT_ITEMSTACK);
ValueObjectTypeItemStack.ValueItemStack valueStack1 = variables.getValue(1, ValueTypes.OBJECT_ITEMSTACK);
Expand All @@ -1542,7 +1542,7 @@ public IValue evaluate(OperatorBase.SafeVariablesGetter variables) throws Evalua
* If the raw items of the given stacks are equal, ignoring data components but including damage value.
*/
public static final IOperator OBJECT_ITEMSTACK_ISITEMEQUALNODATA = REGISTRY.register(OperatorBuilders.ITEMSTACK_2
.output(ValueTypes.BOOLEAN).symbol("=NoData=").operatorName("isitemequalnodata").interactName("isEqualNonData")
.output(ValueTypes.BOOLEAN).symbol("=NoNBT=").operatorName("isitemequalnonbt").interactName("isEqualNonNbt")
.function(variables -> {
ValueObjectTypeItemStack.ValueItemStack valueStack0 = variables.getValue(0, ValueTypes.OBJECT_ITEMSTACK);
ValueObjectTypeItemStack.ValueItemStack valueStack1 = variables.getValue(1, ValueTypes.OBJECT_ITEMSTACK);
Expand Down Expand Up @@ -1805,7 +1805,7 @@ public IValue evaluate(OperatorBase.SafeVariablesGetter variables) throws Evalua
* Item Stack size operator with one input itemstack and one output NBT tag.
*/
public static final IOperator OBJECT_ITEMSTACK_DATA = REGISTRY.register(OperatorBuilders.ITEMSTACK_1_SUFFIX_LONG
.output(ValueTypes.NBT).symbol("Data()").operatorName("data").interactName("data")
.output(ValueTypes.NBT).symbol("NBT()").operatorName("nbt").interactName("nbt")
.function(input -> {
ValueObjectTypeItemStack.ValueItemStack itemStack = input.getValue(0, ValueTypes.OBJECT_ITEMSTACK);
// Explicitly check for item emptiness first, because vanilla sometimes persists NBT when setting stacks to empty
Expand All @@ -1815,10 +1815,10 @@ public IValue evaluate(OperatorBase.SafeVariablesGetter variables) throws Evalua
}).build());

/**
* Item Stack has_data operator with one input itemstack and one output boolean.
* Item Stack has_nbt operator with one input itemstack and one output boolean.
*/
public static final IOperator OBJECT_ITEMSTACK_HASDATA = REGISTRY.register(OperatorBuilders.ITEMSTACK_1_PREFIX_LONG
.output(ValueTypes.BOOLEAN).symbol("has_data").operatorName("hasdata").interactName("hasData")
.output(ValueTypes.BOOLEAN).symbol("has_nbt").operatorName("hasnbt").interactName("hasNbt")
.function(OperatorBuilders.FUNCTION_ITEMSTACK_TO_BOOLEAN.build(
itemStack -> !itemStack.isEmpty() && itemStack.getComponents().stream().anyMatch(t -> !t.type().isTransient())
)).build());
Expand Down Expand Up @@ -2519,7 +2519,7 @@ public IValue evaluate(OperatorBase.SafeVariablesGetter variables) throws Evalua
* The tag of the given fluidstack.
*/
public static final IOperator OBJECT_FLUIDSTACK_DATA = REGISTRY.register(OperatorBuilders.FLUIDSTACK_1_SUFFIX_LONG
.output(ValueTypes.NBT).symbol("Data()").operatorInteract("data")
.output(ValueTypes.NBT).symbol("NBT()").operatorInteract("nbt")
.function(input -> {
ValueObjectTypeFluidStack.ValueFluidStack fluidStack = input.getValue(0, ValueTypes.OBJECT_FLUIDSTACK);
if (fluidStack.getRawValue().getComponentsPatch().isEmpty()) {
Expand Down
22 changes: 11 additions & 11 deletions src/main/resources/assets/integrateddynamics/lang/en_us.json
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@
"gui.integrateddynamics.mechanical_squeezer.togglefluidautoeject.info": "Push to adjacent tanks.",
"gui.integrateddynamics.input_short": "Input",
"gui.integrateddynamics.output_short": "Output",
"gui.integrateddynamics.recipe.strictnbt": "Strict data",
"gui.integrateddynamics.recipe.strictnbt": "Strict NBT",
"gui.integrateddynamics.recipe.tagvariants": "Item tag variants",
"gui.integrateddynamics.recipe.reusable": "Reusable",
"gui.integrateddynamics.operator.globalname": "Global name: %s",
Expand Down Expand Up @@ -1181,10 +1181,10 @@
"operator.integrateddynamics.itemstack.fluidstack.info": "The fluid from the given item",
"operator.integrateddynamics.itemstack.fluidstackcapacity": "Fluid Capacity",
"operator.integrateddynamics.itemstack.fluidstackcapacity.info": "The fluid capacity of the given item in mB",
"operator.integrateddynamics.itemstack.isdataequal": "Data equals",
"operator.integrateddynamics.itemstack.isdataequal.info": "If the data components of the given items are equal",
"operator.integrateddynamics.itemstack.isitemequalnodata": "Raw item equals no data",
"operator.integrateddynamics.itemstack.isitemequalnodata.info": "If the raw items of the given stacks are equal, ignoring data components but including damage value.",
"operator.integrateddynamics.itemstack.isnbtequal": "NBT equals",
"operator.integrateddynamics.itemstack.isnbtequal.info": "If the data components of the given items are equal",
"operator.integrateddynamics.itemstack.isitemequalnonbt": "Raw item equals no NBT",
"operator.integrateddynamics.itemstack.isitemequalnonbt.info": "If the raw items of the given stacks are equal, ignoring data components but including damage value.",
"operator.integrateddynamics.itemstack.israwitemequal": "Raw item equals",
"operator.integrateddynamics.itemstack.israwitemequal.info": "If the raw items of the given items are equal, ignoring NBT and damage value.",
"operator.integrateddynamics.itemstack.mod": "Mod",
Expand All @@ -1209,10 +1209,10 @@
"operator.integrateddynamics.itemstack.itembyname.info": "Get the item corresponding to the given unique name, add space+number for indicating the metadata.",
"operator.integrateddynamics.itemstack.itemlistcount": "Item List Count",
"operator.integrateddynamics.itemstack.itemlistcount.info": "Get the total item count of exactly the given item in a list.",
"operator.integrateddynamics.itemstack.data": "Item data",
"operator.integrateddynamics.itemstack.data.info": "Get the data of the given item as NBT.",
"operator.integrateddynamics.itemstack.hasdata": "Has data",
"operator.integrateddynamics.itemstack.hasdata.info": "If the item stack has data components.",
"operator.integrateddynamics.itemstack.nbt": "Item NBT",
"operator.integrateddynamics.itemstack.nbt.info": "Get the data of the given item as NBT.",
"operator.integrateddynamics.itemstack.hasnbt": "Has NBT",
"operator.integrateddynamics.itemstack.hasnbt.info": "If the item stack has data components.",

"operator.integrateddynamics.entity": "Entity",
"operator.integrateddynamics.entity.basename": "Entity %s",
Expand Down Expand Up @@ -1330,8 +1330,8 @@
"operator.integrateddynamics.fluidstack.israwfluidequal.info": "If the raw fluids are equal",
"operator.integrateddynamics.fluidstack.mod": "Mod",
"operator.integrateddynamics.fluidstack.mod.info": "The name of the mod owning the given fluid",
"operator.integrateddynamics.fluidstack.data": "Fluid data",
"operator.integrateddynamics.fluidstack.data.info": "Get the data of the given fluid as NBT.",
"operator.integrateddynamics.fluidstack.nbt": "Fluid NBT",
"operator.integrateddynamics.fluidstack.nbt.info": "Get the data of the given fluid as NBT.",
"operator.integrateddynamics.fluidstack.with_amount": "Fluid With Amount",
"operator.integrateddynamics.fluidstack.with_amount.info": "Copy the given fluid with the given amount",

Expand Down

0 comments on commit 53a807d

Please sign in to comment.