Im a newby at programming and I just use Mcreator for my Mod
so may you please tell me where I have to put that in this code?
and where I have to put in the NBT tag of the potion lol, just in brackets right after PotionUtils.getPotionTypeFromNBT ?
.getItemStack((int) (1))).getItem() == PotionUtils.appendEffects(new ItemStack(Items.SPLASH_POTION, (int) (1)),
Arrays.asList(new EffectInstance(Effects.POISON, (int) 900, (int) 1))).getItem()))
&& (((new Object() {
public int getAmount(int sltid) {
if (entity instanceof ServerPlayerEntity) {
Container _current = ((ServerPlayerEntity) entity).openContainer;
if (_current instanceof Supplier) {
Object invobj = ((Supplier) _current).get();
if (invobj instanceof Map) {
ItemStack stack = ((Slot) ((Map) invobj).get(sltid)).getStack();;
if (stack != null)
return stack.getCount();
}
}
}
return 0;