Jump to content
Search In
  • More options...
Find results that contain...
Find results in...

Parent

Members
  • Posts

    7
  • Joined

  • Last visited

Posts posted by Parent

  1. Hello, I'm once again stuck on the new version. With minimal documentation and support, I can't seem to figure out how I could getPlayerInfoMap() in the new 1.17.1 version of forge.

    Here's where I want it (line 4):

    @SubscribeEvent
        public static void onJoin(final LoggedInEvent event){
        	Entity player = event.getPlayer();
        	if(playerInfoMap().size() > 1) {
        		player.sendMessage(new TextComponent("Cannot be in multiplayer!"),event.getPlayer().getUUID());
        	}
        }

    Any help would be appreciated. 

  2. Hey, I wanted to know how I would link an entity's model file (.java exported from blockbench) and the entity itself. Can't seem to figure that out. 

    Here's my entity code:

    public class headcrabEntity extends ChickenEntity{
    	@SuppressWarnings("unchecked")
    	public static EntityType<headcrabEntity> 
    	TYPE = (EntityType<headcrabEntity>) EntityType.Builder.create(headcrabEntity::new, EntityClassification.MONSTER).build("headcrab").setRegistryName(BaseMod.MODID, "headcrab");
    	public headcrabEntity(World worldIn){ super(TYPE, worldIn); }
    	public headcrabEntity(EntityType type, World worldIn) { super(type, worldIn); }
    	public static Item EGG = EntityUtils.buildEntitySpawnEgg(TYPE, 0xb00101, 0xacbf1f);
    	public static AttributeModifierMap.MutableAttribute setupAttributes() {
    		return EntityUtils.addAttributes(false,40,30.0d,10,0,8.0d,2,10);
    		}
    	
    }

    Thanks

  3. Hello,

     

    I was wondering how I would make an entity a certain model with a provided JSON file and a UV texture (png).

     

    This is my code for now:

    public class headcrabRender extends ChickenRenderer{
    	public headcrabRender(EntityRendererManager manager) {
    		super(manager);
    	}
    	
    	@Override
    	public ResourceLocation getEntityTexture(ChickenEntity entity) {
    		return new ResourceLocation(BaseMod.MODID, "textures/entity/headcrab.png");
    	}
    }
    

    Thanks.

×
×
  • Create New...

Important Information

By using this site, you agree to our Privacy Policy.