Jump to content

Recommended Posts

Posted

Hey, I want to create a bench(gui), which allows you to combine your sword with a specific potion, but how can I make that it has to be a specific potion for a specific sword, instead of any potion working for that specific sword?

Posted

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;

Posted

my bad, wrong code. I meant to use this code

.getItemStack((int) (1))).getItem() == new ItemStack(Items.SPLASH_POTION, (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;

  • Guest locked this topic
Guest
This topic is now closed to further replies.

Announcements



  • Recently Browsing

    • No registered users viewing this page.
  • Posts

    • I've used both java 21, 24 and 17 separately and 24 isn't needed but both 21 and 17 are.    Removing modernfix doesn't work just gives separate errors (can't access rn, not home)
    • Omg, tens of tutorials, tweaks, uninstalls and reinstalls, java versions, java arguments, system variables. You. You did it. I bow in awe.
    • I fall into the void if I fly the rocket to the earth, and dying or respawning just brings me back to the moon.   Error Code:  Found matching world (0) for name: Overworld [00:22:40] [Client thread/INFO]:Adding world access to world net.minecraft.client.multiplayer.WorldClient@73fa708 [00:22:41] [CraftPresence/ERROR]:Asset name "overworld" does not exist, attempting to use an alternative icon "galacticscience"... [00:22:41] [CraftPresence/INFO]:To add support for this icon, please request for this icon to be added to the default Client ID or add the icon under the following name: "overworld". [00:22:41] [CraftPresence/INFO]:Fallback icon for "overworld" found! Using a fallback icon with the name "galacticscience"! [00:22:42] [Server thread/INFO]:Server attempting to transfer player IcyBlues9 to dimension 0 [00:22:42] [Server thread/ERROR]:"Silently" catching entity tracking error.   How can i fix it?      
    • If you remove armorchroma does it still crash?
    • Hello everyone!   I’ve launched a Christian Minecraft server today called “Acolyte”. Although it’s a Christian server, it’s open to anyone, but the main goal of me pursuing this was to combine two things that I love and make an area where people can talk about faith and build some cool castles. The server is meant for Java edition, 1.21.5, and has plugins such as land claiming, economy, shops, terrain generation, etc. It’s a survival / smp world, and the server address is: acolyte.mcsrv.pro   There’s a Discord server linked to it as well. It’s a place to hangout, talk about the game, have theological discussions, and hopefully meet some pretty cool people. The invite is available on the Minecraft server. I’m still new to a lot of this, and so please forgive any downtime or tweaks that I make to the server, and please give any feedback or criticism if you come up with some ideas. I truly hope you all enjoy it if you get the chance to join.   - ChedduhCheese   acolyte.mcsrv.pro
×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.