Jump to content

How do i automatically place maps in all item frames in range of the player?


North

Recommended Posts

I'm currently trying to make a mod that automatically places maps from the player's hand into item frames.
I currently have a for loop for checking if there are any item frames in the player's render distance. is this the correct/best way to do it? And how do i get the item frames in the players range?
This is the code i have so far:


    @SubscribeEvent
    public void onUpdate(LivingEvent.LivingUpdateEvent event) {
        if(nullCheck())
            return;
        
        
        for(Entity entity : mc.world.loadedEntityList) {
            
            if(entity instanceof EntityItemFrame) {
                
            }
        }
    }

And another thing. How do i place the maps into the item frames once i have a list of frames in the players range?
All help will be greatly appreciated. Thanks

Link to comment
Share on other sites

Guest
This topic is now closed to further replies.

Announcements



×
×
  • Create New...

Important Information

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