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