Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: add EntityUndeadComponent #432

Merged
merged 11 commits into from
Oct 10, 2024
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
package org.allaymc.api.entity.component;

public interface EntityUndeadComponent extends EntityBaseComponent {
heyhey123-git marked this conversation as resolved.
Show resolved Hide resolved
/**
* Check if the entity will catch fire under sunlight.
*
* @return {@code true} if the entity will catch fire under sunlight, otherwise {@code false}.
*/
boolean getCatchesFireUnderSunlight();

/**
* Set if the entity will catch fire under sunlight.
*
* @param catchesFireUnderSunlight whether the entity will catch fire under sunlight.
*/
void setCatchesFireUnderSunlight(boolean catchesFireUnderSunlight);
heyhey123-git marked this conversation as resolved.
Show resolved Hide resolved
}
Original file line number Diff line number Diff line change
Expand Up @@ -257,7 +257,7 @@ public enum EntityId {

ZOMBIE_HORSE("minecraft:zombie_horse", 27),

ZOMBIE_PIGMAN("minecraft:zombie_pigman", 36),
ZOMBIFIED_PIGLIN("minecraft:zombie_pigman", 36),
heyhey123-git marked this conversation as resolved.
Show resolved Hide resolved

ZOMBIE_VILLAGER("minecraft:zombie_villager", 44),

Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
package org.allaymc.api.entity.interfaces;

import org.allaymc.api.entity.Entity;
import org.allaymc.api.entity.component.EntityUndeadComponent;

public interface EntityBogged extends Entity {
public interface EntityBogged extends Entity, EntityUndeadComponent {
}
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
package org.allaymc.api.entity.interfaces;

import org.allaymc.api.entity.Entity;
import org.allaymc.api.entity.component.EntityUndeadComponent;

public interface EntityDrowned extends Entity {
public interface EntityDrowned extends Entity, EntityUndeadComponent {

}
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
package org.allaymc.api.entity.interfaces;

import org.allaymc.api.entity.Entity;
import org.allaymc.api.entity.component.EntityUndeadComponent;

public interface EntityHusk extends Entity {
public interface EntityHusk extends Entity, EntityUndeadComponent {

}
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
package org.allaymc.api.entity.interfaces;

import org.allaymc.api.entity.Entity;
import org.allaymc.api.entity.component.EntityUndeadComponent;

public interface EntityPhantom extends Entity {
public interface EntityPhantom extends Entity, EntityUndeadComponent {

}
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
package org.allaymc.api.entity.interfaces;

import org.allaymc.api.entity.Entity;
import org.allaymc.api.entity.component.EntityUndeadComponent;

public interface EntitySkeleton extends Entity {
public interface EntitySkeleton extends Entity, EntityUndeadComponent {

}
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
package org.allaymc.api.entity.interfaces;

import org.allaymc.api.entity.Entity;
import org.allaymc.api.entity.component.EntityUndeadComponent;

public interface EntitySkeletonHorse extends Entity {
public interface EntitySkeletonHorse extends Entity, EntityUndeadComponent {

}
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
package org.allaymc.api.entity.interfaces;

import org.allaymc.api.entity.Entity;
import org.allaymc.api.entity.component.EntityUndeadComponent;

public interface EntityStray extends Entity {
public interface EntityStray extends Entity, EntityUndeadComponent {

}
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
package org.allaymc.api.entity.interfaces;

import org.allaymc.api.entity.Entity;
import org.allaymc.api.entity.component.EntityUndeadComponent;

public interface EntityWither extends Entity {
public interface EntityWither extends Entity, EntityUndeadComponent {

}
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
package org.allaymc.api.entity.interfaces;

import org.allaymc.api.entity.Entity;
import org.allaymc.api.entity.component.EntityUndeadComponent;

public interface EntityWitherSkeleton extends Entity {
public interface EntityWitherSkeleton extends Entity, EntityUndeadComponent {

}
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
package org.allaymc.api.entity.interfaces;

import org.allaymc.api.entity.Entity;
import org.allaymc.api.entity.component.EntityUndeadComponent;

public interface EntityZoglin extends Entity {
public interface EntityZoglin extends Entity, EntityUndeadComponent {

}
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
package org.allaymc.api.entity.interfaces;

import org.allaymc.api.entity.Entity;
import org.allaymc.api.entity.component.EntityUndeadComponent;

public interface EntityZombie extends Entity {
public interface EntityZombie extends Entity, EntityUndeadComponent {

}
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
package org.allaymc.api.entity.interfaces;

import org.allaymc.api.entity.Entity;
import org.allaymc.api.entity.component.EntityUndeadComponent;

public interface EntityZombieHorse extends Entity {
public interface EntityZombieHorse extends Entity, EntityUndeadComponent {

}

This file was deleted.

Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
package org.allaymc.api.entity.interfaces;

import org.allaymc.api.entity.Entity;
import org.allaymc.api.entity.component.EntityUndeadComponent;

public interface EntityZombieVillager extends Entity {
public interface EntityZombieVillager extends Entity, EntityUndeadComponent {

}
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
package org.allaymc.api.entity.interfaces;

import org.allaymc.api.entity.Entity;
import org.allaymc.api.entity.component.EntityUndeadComponent;

public interface EntityZombieVillagerV2 extends Entity {
public interface EntityZombieVillagerV2 extends Entity, EntityUndeadComponent {

}
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
package org.allaymc.api.entity.interfaces;

import org.allaymc.api.entity.Entity;
import org.allaymc.api.entity.component.EntityUndeadComponent;

public interface EntityZombifiedPiglin extends Entity, EntityUndeadComponent {

}
Original file line number Diff line number Diff line change
Expand Up @@ -253,7 +253,7 @@ public final class EntityTypes {

public static EntityType<EntityZombieHorse> ZOMBIE_HORSE;

public static EntityType<EntityZombiePigman> ZOMBIE_PIGMAN;
public static EntityType<EntityZombifiedPiglin> ZOMBIFIED_PIGLIN;
heyhey123-git marked this conversation as resolved.
Show resolved Hide resolved

public static EntityType<EntityZombieVillager> ZOMBIE_VILLAGER;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1008,11 +1008,11 @@ public static void initZombieHorse() {
.build();
}

public static void initZombiePigman() {
if (EntityTypes.ZOMBIE_PIGMAN != null) return;
EntityTypes.ZOMBIE_PIGMAN = AllayEntityType
.builder(EntityZombiePigman.class)
.vanillaEntity(EntityId.ZOMBIE_PIGMAN)
public static void initZombifiedPiglin() {
heyhey123-git marked this conversation as resolved.
Show resolved Hide resolved
if (EntityTypes.ZOMBIFIED_PIGLIN != null) return;
EntityTypes.ZOMBIFIED_PIGLIN = AllayEntityType
.builder(EntityZombifiedPiglin.class)
.vanillaEntity(EntityId.ZOMBIFIED_PIGLIN)
.build();
}

Expand Down