1.4.87 for 22w44a
This commit is contained in:
1 parent
c51f59c799
commit
4be362e58b
20 files changed
+236
-185
No files matched your search
@@ -200,7 +200,7 @@ public class Auxiliary {
|
||||
}
|
||||
}
|
||||
}
|
||||
ParticleOptions particle = ShapeDispatcher.getParticleData(particleName);
|
||||
ParticleOptions particle = ShapeDispatcher.getParticleData(particleName, world.registryAccess());
|
||||
Vec3 vec = locator.vec;
|
||||
if (player == null)
|
||||
{
|
||||
@@ -225,7 +225,7 @@ public class Auxiliary {
|
||||
CarpetContext cc = (CarpetContext)c;
|
||||
ServerLevel world = cc.s.getLevel();
|
||||
String particleName = lv.get(0).getString();
|
||||
ParticleOptions particle = ShapeDispatcher.getParticleData(particleName);
|
||||
ParticleOptions particle = ShapeDispatcher.getParticleData(particleName, world.registryAccess());
|
||||
Vector3Argument pos1 = Vector3Argument.findIn(lv, 1);
|
||||
Vector3Argument pos2 = Vector3Argument.findIn(lv, pos1.offset);
|
||||
double density = 1.0;
|
||||
@@ -259,14 +259,14 @@ public class Auxiliary {
|
||||
));
|
||||
});
|
||||
|
||||
expression.addUnaryFunction("item_display_name", v -> new FormattedTextValue(ValueConversions.getItemStackFromValue(v, false).getHoverName()));
|
||||
expression.addContextFunction("item_display_name", 1, (c, t, lv) -> new FormattedTextValue(ValueConversions.getItemStackFromValue(lv.get(0), false, ((CarpetContext)c).s.registryAccess() ).getHoverName()));
|
||||
|
||||
expression.addContextFunction("particle_box", -1, (c, t, lv) ->
|
||||
{
|
||||
CarpetContext cc = (CarpetContext)c;
|
||||
ServerLevel world = cc.s.getLevel();
|
||||
String particleName = lv.get(0).getString();
|
||||
ParticleOptions particle = ShapeDispatcher.getParticleData(particleName);
|
||||
ParticleOptions particle = ShapeDispatcher.getParticleData(particleName, world.registryAccess() );
|
||||
Vector3Argument pos1 = Vector3Argument.findIn(lv, 1);
|
||||
Vector3Argument pos2 = Vector3Argument.findIn(lv, pos1.offset);
|
||||
|
||||
|
||||
@@ -4,7 +4,6 @@ import carpet.fakes.IngredientInterface;
|
||||
import carpet.fakes.RecipeManagerInterface;
|
||||
import carpet.script.CarpetContext;
|
||||
import carpet.script.Expression;
|
||||
import carpet.script.argument.BlockArgument;
|
||||
import carpet.script.argument.FunctionArgument;
|
||||
import carpet.script.exception.InternalExpressionException;
|
||||
import carpet.script.exception.ThrowStatement;
|
||||
@@ -40,7 +39,6 @@ import net.minecraft.tags.TagKey;
|
||||
import net.minecraft.world.entity.LivingEntity;
|
||||
import net.minecraft.world.entity.item.ItemEntity;
|
||||
import net.minecraft.world.entity.player.Player;
|
||||
import net.minecraft.world.item.CreativeModeTab;
|
||||
import net.minecraft.world.item.Item;
|
||||
import net.minecraft.world.item.ItemStack;
|
||||
import net.minecraft.world.item.crafting.AbstractCookingRecipe;
|
||||
@@ -50,14 +48,13 @@ import net.minecraft.world.item.crafting.RecipeType;
|
||||
import net.minecraft.world.item.crafting.ShapedRecipe;
|
||||
import net.minecraft.world.item.crafting.ShapelessRecipe;
|
||||
import net.minecraft.world.item.crafting.SingleItemRecipe;
|
||||
import net.minecraft.world.level.block.Block;
|
||||
import net.minecraft.world.phys.Vec3;
|
||||
|
||||
public class Inventories {
|
||||
public static void apply(Expression expression)
|
||||
{
|
||||
expression.addUnaryFunction("stack_limit", v ->
|
||||
new NumericValue(NBTSerializableValue.parseItem(v.getString()).getItem().getMaxStackSize()));
|
||||
expression.addContextFunction("stack_limit", 1, (c, t, lv) ->
|
||||
new NumericValue(NBTSerializableValue.parseItem(lv.get(0).getString(), ((CarpetContext) c).s.registryAccess() ).getItem().getMaxStackSize()));
|
||||
|
||||
expression.addContextFunction("item_category", -1, (c, t, lv) -> {
|
||||
CarpetContext cc = (CarpetContext)c;
|
||||
@@ -91,7 +88,7 @@ public class Inventories {
|
||||
Registry<Item> blocks = cc.s.getServer().registryAccess().registryOrThrow(Registry.ITEM_REGISTRY);
|
||||
if (lv.size() == 0)
|
||||
return ListValue.wrap(blocks.getTagNames().map(ValueConversions::of).collect(Collectors.toList()));
|
||||
Item item = NBTSerializableValue.parseItem(lv.get(0).getString()).getItem();
|
||||
Item item = NBTSerializableValue.parseItem(lv.get(0).getString(), cc.s.registryAccess()).getItem();
|
||||
if (lv.size() == 1)
|
||||
{
|
||||
return ListValue.wrap( blocks.getTags().filter(e -> e.getSecond().stream().anyMatch(h -> (h.value() == item))).map(e -> ValueConversions.of(e.getFirst())).collect(Collectors.toList()));
|
||||
@@ -280,7 +277,7 @@ public class Inventories {
|
||||
else
|
||||
nbt = new NBTSerializableValue(nbtValue.getString()).getCompoundTag();
|
||||
}
|
||||
ItemInput newitem = NBTSerializableValue.parseItem(lv.get(inventoryLocator.offset()+2).getString(), nbt);
|
||||
ItemInput newitem = NBTSerializableValue.parseItem(lv.get(inventoryLocator.offset()+2).getString(), nbt, cc.s.registryAccess());
|
||||
ItemStack previousStack = inventoryLocator.inventory().getItem(slot);
|
||||
try
|
||||
{
|
||||
@@ -305,7 +302,7 @@ public class Inventories {
|
||||
{
|
||||
Value secondArg = lv.get(inventoryLocator.offset()+0);
|
||||
if (!secondArg.isNull())
|
||||
itemArg = NBTSerializableValue.parseItem(secondArg.getString());
|
||||
itemArg = NBTSerializableValue.parseItem(secondArg.getString(), cc.s.registryAccess());
|
||||
}
|
||||
int startIndex = 0;
|
||||
if (lv.size() > inventoryLocator.offset()+1)
|
||||
@@ -330,7 +327,7 @@ public class Inventories {
|
||||
if (inventoryLocator == null) return Value.NULL;
|
||||
if (lv.size() <= inventoryLocator.offset())
|
||||
throw new InternalExpressionException("'inventory_remove' requires at least an item to be removed");
|
||||
ItemInput searchItem = NBTSerializableValue.parseItem(lv.get(inventoryLocator.offset()).getString());
|
||||
ItemInput searchItem = NBTSerializableValue.parseItem(lv.get(inventoryLocator.offset()).getString(), cc.s.registryAccess());
|
||||
int amount = 1;
|
||||
if (lv.size() > inventoryLocator.offset()+1)
|
||||
amount = (int)NumericValue.asNumber(lv.get(inventoryLocator.offset()+1)).getLong();
|
||||
|
||||
@@ -34,7 +34,6 @@ import carpet.script.value.StringValue;
|
||||
import carpet.script.value.Value;
|
||||
import carpet.script.value.ValueConversions;
|
||||
import carpet.utils.BlockInfo;
|
||||
import carpet.utils.CommandHelper;
|
||||
|
||||
import com.mojang.brigadier.exceptions.CommandSyntaxException;
|
||||
import it.unimi.dsi.fastutil.longs.Long2ObjectOpenHashMap;
|
||||
@@ -926,7 +925,7 @@ public class WorldAccess {
|
||||
throw new InternalExpressionException("'create_explosion' requires at least a position to explode");
|
||||
CarpetContext cc = (CarpetContext)c;
|
||||
float powah = 4.0f;
|
||||
Explosion.BlockInteraction mode = Explosion.BlockInteraction.BREAK;
|
||||
Explosion.BlockInteraction mode = Explosion.BlockInteraction.DESTROY; // should probably read the gamerule for default behaviour
|
||||
boolean createFire = false;
|
||||
Entity source = null;
|
||||
LivingEntity attacker = null;
|
||||
@@ -994,7 +993,7 @@ public class WorldAccess {
|
||||
};
|
||||
explosion.explode();
|
||||
explosion.finalizeExplosion(false);
|
||||
if (mode == Explosion.BlockInteraction.NONE) explosion.clearToBlow();
|
||||
if (mode == Explosion.BlockInteraction.KEEP) explosion.clearToBlow();
|
||||
cc.s.getLevel().players().forEach(spe -> {
|
||||
if (spe.distanceToSqr(pos) < 4096.0D)
|
||||
spe.connection.send(new ClientboundExplodePacket(pos.x, pos.y, pos.z, thePowah, explosion.getToBlow(), explosion.getHitPlayers().get(spe)));
|
||||
@@ -1010,7 +1009,7 @@ public class WorldAccess {
|
||||
CarpetContext cc = (CarpetContext) c;
|
||||
String itemString = lv.get(0).getString();
|
||||
Vector3Argument locator = Vector3Argument.findIn(lv, 1);
|
||||
ItemInput stackArg = NBTSerializableValue.parseItem(itemString);
|
||||
ItemInput stackArg = NBTSerializableValue.parseItem(itemString, cc.s.registryAccess());
|
||||
BlockPos where = new BlockPos(locator.vec);
|
||||
String facing;
|
||||
if (lv.size() > locator.offset) {
|
||||
|
||||
@@ -60,7 +60,7 @@ public class BlockArgument extends Argument
|
||||
}
|
||||
if (acceptString && v1 instanceof StringValue)
|
||||
{
|
||||
return new BlockArgument(BlockValue.fromString(v1.getString()), 1 + offset);
|
||||
return new BlockArgument(BlockValue.fromString(v1.getString(), c.s.registryAccess()), 1 + offset);
|
||||
}
|
||||
if (v1 instanceof BlockValue)
|
||||
{
|
||||
|
||||
@@ -1061,8 +1061,7 @@ public abstract class CommandArgument
|
||||
super(suffix, null, suggestFromExamples);
|
||||
try
|
||||
{
|
||||
final CommandBuildContext context = new CommandBuildContext(server.registryAccess(), server.getWorldData().enabledFeatures());
|
||||
context.missingTagAccessPolicy(CommandBuildContext.MissingTagAccessPolicy.RETURN_EMPTY);
|
||||
final CommandBuildContext context = CommandBuildContext.simple(server.registryAccess(), server.getWorldData().enabledFeatures());
|
||||
this.examples = argumentTypeSupplier.get(context).getExamples();
|
||||
}
|
||||
catch (CommandSyntaxException e)
|
||||
@@ -1122,7 +1121,7 @@ public abstract class CommandArgument
|
||||
protected ArgumentType<?> getArgumentType(CarpetScriptHost host) throws CommandSyntaxException
|
||||
{
|
||||
if (argumentTypeSupplier != null) return argumentTypeSupplier.get();
|
||||
CommandBuildContext registryAccess = new CommandBuildContext(host.scriptServer().server.registryAccess(), host.scriptServer().server.getWorldData().enabledFeatures());
|
||||
CommandBuildContext registryAccess = CommandBuildContext.simple(host.scriptServer().server.registryAccess(), host.scriptServer().server.getWorldData().enabledFeatures());
|
||||
return argumentTypeSupplierEx.get(registryAccess);
|
||||
}
|
||||
|
||||
|
||||
@@ -29,8 +29,8 @@ import com.mojang.brigadier.exceptions.CommandSyntaxException;
|
||||
import net.minecraft.commands.arguments.ParticleArgument;
|
||||
import net.minecraft.core.BlockPos;
|
||||
import net.minecraft.core.Direction;
|
||||
import net.minecraft.core.HolderLookup;
|
||||
import net.minecraft.core.Registry;
|
||||
import net.minecraft.core.RegistryAccess;
|
||||
import net.minecraft.core.particles.ParticleOptions;
|
||||
import net.minecraft.nbt.ByteTag;
|
||||
import net.minecraft.nbt.CompoundTag;
|
||||
@@ -172,14 +172,14 @@ public class ShapeDispatcher
|
||||
}
|
||||
}
|
||||
|
||||
public static ParticleOptions getParticleData(String name)
|
||||
public static ParticleOptions getParticleData(String name, RegistryAccess regs)
|
||||
{
|
||||
ParticleOptions particle = particleCache.get(name);
|
||||
ParticleOptions particle = particleCache.get(name); // [SCARY SHIT] cache should be cleared between worlds
|
||||
if (particle != null)
|
||||
return particle;
|
||||
try
|
||||
{
|
||||
particle = ParticleArgument.readParticle(new StringReader(name), HolderLookup.forRegistry(Registry.PARTICLE_TYPE));
|
||||
particle = ParticleArgument.readParticle(new StringReader(name), regs.lookupOrThrow(Registry.PARTICLE_TYPE_REGISTRY));
|
||||
}
|
||||
catch (CommandSyntaxException e)
|
||||
{
|
||||
@@ -388,12 +388,12 @@ public class ShapeDispatcher
|
||||
NumericValue.asNumber( elements.get(2)).getDouble()
|
||||
);
|
||||
}
|
||||
protected ParticleOptions replacementParticle()
|
||||
protected ParticleOptions replacementParticle(RegistryAccess regs)
|
||||
{
|
||||
String particleName = fa ==0 ?
|
||||
String.format(Locale.ROOT , "dust %.1f %.1f %.1f 1.0", r, g, b):
|
||||
String.format(Locale.ROOT , "dust %.1f %.1f %.1f 1.0", fr, fg, fb);
|
||||
return getParticleData(particleName);
|
||||
return getParticleData(particleName, regs);
|
||||
}
|
||||
|
||||
|
||||
@@ -645,19 +645,18 @@ public class ShapeDispatcher
|
||||
|
||||
@Override
|
||||
public Consumer<ServerPlayer> alternative() {
|
||||
ParticleOptions particle;
|
||||
if(this.isitem)
|
||||
{
|
||||
if (Block.byItem(this.item.getItem()).defaultBlockState().isAir()) return p->{};
|
||||
particle = getParticleData("block_marker "+Registry.BLOCK.getKey(Block.byItem(this.item.getItem())));
|
||||
}
|
||||
else
|
||||
{
|
||||
particle = getParticleData("block_marker "+Registry.BLOCK.getKey(this.blockState.getBlock()));
|
||||
}
|
||||
|
||||
|
||||
return p -> {
|
||||
ParticleOptions particle;
|
||||
if(this.isitem)
|
||||
{
|
||||
if (Block.byItem(this.item.getItem()).defaultBlockState().isAir()) return;
|
||||
particle = getParticleData("block_marker "+Registry.BLOCK.getKey(Block.byItem(this.item.getItem())), p.level.registryAccess());
|
||||
}
|
||||
else
|
||||
{
|
||||
particle = getParticleData("block_marker "+Registry.BLOCK.getKey(this.blockState.getBlock()), p.level.registryAccess());
|
||||
}
|
||||
|
||||
Vec3 v = relativiseRender(p.level, this.pos, 0);
|
||||
p.getLevel().sendParticles(p, particle , true, v.x, v.y, v.z, 1,0.0, 0.0, 0.0, 0.0);
|
||||
};
|
||||
@@ -712,7 +711,6 @@ public class ShapeDispatcher
|
||||
@Override
|
||||
public Consumer<ServerPlayer> alternative()
|
||||
{
|
||||
ParticleOptions particle = replacementParticle();
|
||||
double density = Math.max(2.0, from.distanceTo(to) /50/ (a+0.1)) ;
|
||||
return p ->
|
||||
{
|
||||
@@ -720,7 +718,7 @@ public class ShapeDispatcher
|
||||
{
|
||||
particleMesh(
|
||||
Collections.singletonList(p),
|
||||
particle,
|
||||
replacementParticle(p.level.registryAccess()),
|
||||
density,
|
||||
relativiseRender(p.level, from, 0),
|
||||
relativiseRender(p.level, to, 0)
|
||||
@@ -872,10 +870,10 @@ public class ShapeDispatcher
|
||||
}
|
||||
@Override
|
||||
public Consumer<ServerPlayer> alternative() {
|
||||
final ParticleOptions locparticledata = getParticleData(String.format(Locale.ROOT ,"dust %.1f %.1f %.1f %.1f", fr, fg, fb, fa));
|
||||
return p->{
|
||||
if(p.level.dimension() != this.shapeDimension){return;}
|
||||
if(!(fa>0.0f)){return;}
|
||||
final ParticleOptions locparticledata = getParticleData(String.format(Locale.ROOT ,"dust %.1f %.1f %.1f %.1f", fr, fg, fb, fa), p.level.registryAccess());
|
||||
for(Vec3 v : alter_point(p)){
|
||||
p.getLevel().sendParticles(p,locparticledata , true,
|
||||
v.x, v.y, v.z, 1,
|
||||
@@ -973,13 +971,12 @@ public class ShapeDispatcher
|
||||
@Override
|
||||
public Consumer<ServerPlayer> alternative()
|
||||
{
|
||||
ParticleOptions particle = replacementParticle();
|
||||
double density = Math.max(2.0, from.distanceTo(to) /50) / (a+0.1);
|
||||
return p ->
|
||||
{
|
||||
if (p.level.dimension() == shapeDimension) drawParticleLine(
|
||||
Collections.singletonList(p),
|
||||
particle,
|
||||
replacementParticle(p.level.registryAccess()),
|
||||
relativiseRender(p.level, from, 0),
|
||||
relativiseRender(p.level, to, 0),
|
||||
density
|
||||
@@ -1034,10 +1031,11 @@ public class ShapeDispatcher
|
||||
@Override
|
||||
public Consumer<ServerPlayer> alternative() { return p ->
|
||||
{
|
||||
ParticleOptions particle = replacementParticle();
|
||||
|
||||
int partno = Math.min(1000,20*subdivisions);
|
||||
RandomSource rand = p.level.getRandom();
|
||||
ServerLevel world = p.getLevel();
|
||||
ParticleOptions particle = replacementParticle(world.registryAccess());
|
||||
|
||||
Vec3 ccenter = relativiseRender(world, center, 0 );
|
||||
|
||||
@@ -1112,10 +1110,11 @@ public class ShapeDispatcher
|
||||
@Override
|
||||
public Consumer<ServerPlayer> alternative() { return p ->
|
||||
{
|
||||
ParticleOptions particle = replacementParticle();
|
||||
|
||||
int partno = (int)Math.min(1000,Math.sqrt(20*subdivisions*(1+height)));
|
||||
RandomSource rand = p.level.getRandom();
|
||||
ServerLevel world = p.getLevel();
|
||||
ParticleOptions particle = replacementParticle(world.registryAccess());
|
||||
|
||||
Vec3 ccenter = relativiseRender(world, center, 0 );
|
||||
|
||||
@@ -1307,7 +1306,7 @@ public class ShapeDispatcher
|
||||
if(value instanceof BlockValue blv){
|
||||
return value;
|
||||
}
|
||||
return BlockValue.fromString(value.getString());
|
||||
return BlockValue.fromString(value.getString(), server.registryAccess());
|
||||
}
|
||||
@Override
|
||||
public Tag toTag(Value value) {
|
||||
@@ -1342,7 +1341,7 @@ public class ShapeDispatcher
|
||||
@Override
|
||||
public Value validate(Map<String, Value> options, MinecraftServer server, Value value)
|
||||
{
|
||||
ItemStack item=ValueConversions.getItemStackFromValue(value, true);
|
||||
ItemStack item=ValueConversions.getItemStackFromValue(value, true, server.registryAccess());
|
||||
return new NBTSerializableValue(item.save(new CompoundTag()));
|
||||
}
|
||||
@Override
|
||||
|
||||
@@ -18,8 +18,8 @@ import net.minecraft.core.BlockPos;
|
||||
import net.minecraft.core.Direction;
|
||||
import net.minecraft.core.Direction.Axis;
|
||||
import net.minecraft.core.GlobalPos;
|
||||
import net.minecraft.core.HolderLookup;
|
||||
import net.minecraft.core.Registry;
|
||||
import net.minecraft.core.RegistryAccess;
|
||||
import net.minecraft.nbt.CompoundTag;
|
||||
import net.minecraft.nbt.StringTag;
|
||||
import net.minecraft.nbt.Tag;
|
||||
@@ -54,13 +54,13 @@ public class BlockValue extends Value
|
||||
}
|
||||
|
||||
private static final Map<String, BlockValue> bvCache= new HashMap<>();
|
||||
public static BlockValue fromString(String str)
|
||||
public static BlockValue fromString(String str, RegistryAccess regs)
|
||||
{
|
||||
try
|
||||
{
|
||||
BlockValue bv = bvCache.get(str);
|
||||
BlockValue bv = bvCache.get(str); // [SCARY SHIT] persistent caches over server reloads
|
||||
if (bv != null) return bv;
|
||||
BlockStateParser.BlockResult foo = BlockStateParser.parseForBlock(HolderLookup.forRegistry(Registry.BLOCK), new StringReader(str), true );
|
||||
BlockStateParser.BlockResult foo = BlockStateParser.parseForBlock(regs.lookupOrThrow(Registry.BLOCK_REGISTRY), new StringReader(str), true );
|
||||
if (foo.blockState() != null)
|
||||
{
|
||||
CompoundTag bd = foo.nbt();
|
||||
|
||||
@@ -1691,7 +1691,7 @@ public class EntityValue extends Value
|
||||
|
||||
});
|
||||
put("item", (e, v) -> {
|
||||
ItemStack item=ValueConversions.getItemStackFromValue(v, true);
|
||||
ItemStack item=ValueConversions.getItemStackFromValue(v, true, e.level.registryAccess());
|
||||
if(e instanceof ItemEntity itementity)
|
||||
itementity.setItem(item);
|
||||
if(e instanceof ItemFrame itemframe)
|
||||
|
||||
@@ -23,8 +23,8 @@ import net.minecraft.commands.arguments.item.ItemInput;
|
||||
import net.minecraft.commands.arguments.item.ItemParser;
|
||||
import net.minecraft.core.BlockPos;
|
||||
import net.minecraft.core.Holder;
|
||||
import net.minecraft.core.HolderLookup;
|
||||
import net.minecraft.core.Registry;
|
||||
import net.minecraft.core.RegistryAccess;
|
||||
import net.minecraft.nbt.CollectionTag;
|
||||
import net.minecraft.nbt.CompoundTag;
|
||||
import net.minecraft.nbt.EndTag;
|
||||
@@ -290,22 +290,22 @@ public class NBTSerializableValue extends Value implements ContainerValueInterfa
|
||||
|
||||
private static final Map<String,ItemInput> itemCache = new HashMap<>();
|
||||
|
||||
public static ItemInput parseItem(String itemString)
|
||||
public static ItemInput parseItem(String itemString, RegistryAccess regs)
|
||||
{
|
||||
return parseItem(itemString, null);
|
||||
return parseItem(itemString, null, regs);
|
||||
}
|
||||
|
||||
public static ItemInput parseItem(String itemString, CompoundTag customTag)
|
||||
public static ItemInput parseItem(String itemString, CompoundTag customTag, RegistryAccess regs)
|
||||
{
|
||||
try
|
||||
{
|
||||
ItemInput res = itemCache.get(itemString);
|
||||
ItemInput res = itemCache.get(itemString); // [SCARY SHIT] persistent caches over server reloads
|
||||
if (res != null)
|
||||
if (customTag == null)
|
||||
return res;
|
||||
else
|
||||
return new ItemInput(Holder.direct(res.getItem()), customTag);
|
||||
ItemParser.ItemResult parser = ItemParser.parseForItem(HolderLookup.forRegistry(Registry.ITEM), new StringReader(itemString));
|
||||
ItemParser.ItemResult parser = ItemParser.parseForItem(regs.lookupOrThrow(Registry.ITEM_REGISTRY), new StringReader(itemString));
|
||||
res = new ItemInput(parser.item(), parser.nbt());
|
||||
|
||||
itemCache.put(itemString, res);
|
||||
|
||||
@@ -413,7 +413,7 @@ public class ValueConversions
|
||||
);
|
||||
}
|
||||
|
||||
public static ItemStack getItemStackFromValue(Value value, boolean withCount)
|
||||
public static ItemStack getItemStackFromValue(Value value, boolean withCount, RegistryAccess regs)
|
||||
{
|
||||
if (value.isNull())
|
||||
{
|
||||
@@ -444,7 +444,7 @@ public class ValueConversions
|
||||
{
|
||||
name = value.getString();
|
||||
}
|
||||
ItemInput itemInput = NBTSerializableValue.parseItem(name, nbtTag);
|
||||
ItemInput itemInput = NBTSerializableValue.parseItem(name, nbtTag, regs);
|
||||
try
|
||||
{
|
||||
return itemInput.createItemStack(count,false);
|
||||
|
||||
Reference in new issue
Block a user