Skip to content

Commit

Permalink
Fixed entity attribute warnings on newer versions of Forge
Browse files Browse the repository at this point in the history
  • Loading branch information
GirafiStudios committed Feb 25, 2021
1 parent 138f9e4 commit 70410c1
Show file tree
Hide file tree
Showing 4 changed files with 34 additions and 29 deletions.
4 changes: 2 additions & 2 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -81,8 +81,8 @@ dependencies {
compile fg.deobf("mcp.mobius.waila:Hwyla:${hwyla_version}")
compileOnly fg.deobf("com.blamejared.crafttweaker:CraftTweaker-${minecraft_version}:${ct_version}")
compile "mcjty.theoneprobe:TheOneProbe-1.16:${top_version}:api"
runtimeOnly fg.deobf("top.theillusivec4.curios:curios-forge:1.16.4-${curios_version}")
compileOnly fg.deobf("top.theillusivec4.curios:curios-forge:1.16.4-${curios_version}:api")
runtimeOnly fg.deobf("top.theillusivec4.curios:curios-forge:${minecraft_version}-${curios_version}")
compileOnly fg.deobf("top.theillusivec4.curios:curios-forge:${minecraft_version}-${curios_version}:api")
}


Expand Down
6 changes: 3 additions & 3 deletions gradle.properties
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
minecraft_version=1.16.5
forge_version=36.0.13
forge_version=36.0.43
mappings=20201028-1.16.3
mod_version=2.2.0
jei_version=7.6.1.65
hwyla_version=1.10.11-B78_1.16.2
ct_version=7.1.0.102
ct_version=7.1.0.132
top_version=1.16-3.0.6-8
curios_version=4.0.3.5
curios_version=4.0.4.0

org.gradle.jvmargs=-Xmx4G
org.gradle.daemon=false
49 changes: 27 additions & 22 deletions src/main/java/com/teammetallurgy/atum/init/AtumEntities.java
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,8 @@
import net.minecraft.world.IWorld;
import net.minecraft.world.gen.Heightmap;
import net.minecraftforge.common.Tags;
import net.minecraftforge.event.entity.EntityAttributeCreationEvent;
import net.minecraftforge.eventbus.api.SubscribeEvent;
import net.minecraftforge.fml.common.Mod;
import net.minecraftforge.registries.ObjectHolder;

Expand Down Expand Up @@ -114,29 +116,32 @@ public static void registerSpawnPlacement() {
EntitySpawnPlacementRegistry.register(SUNSPEAKER, EntitySpawnPlacementRegistry.PlacementType.ON_GROUND, Heightmap.Type.MOTION_BLOCKING_NO_LEAVES, MobEntity::canSpawnOn);
EntitySpawnPlacementRegistry.register(TARANTULA, EntitySpawnPlacementRegistry.PlacementType.ON_GROUND, Heightmap.Type.MOTION_BLOCKING_NO_LEAVES, TarantulaEntity::canSpawn);
EntitySpawnPlacementRegistry.register(WRAITH, EntitySpawnPlacementRegistry.PlacementType.ON_GROUND, Heightmap.Type.MOTION_BLOCKING_NO_LEAVES, UndeadBaseEntity::canSpawn);
}

GlobalEntityTypeAttributes.put(ASSASSIN, AssassinEntity.getAttributes().create());
GlobalEntityTypeAttributes.put(BANDIT_WARLORD, WarlordEntity.getAttributes().create());
GlobalEntityTypeAttributes.put(BARBARIAN, BarbarianEntity.getAttributes().create());
GlobalEntityTypeAttributes.put(BONESTORM, BonestormEntity.getAttributes().create());
GlobalEntityTypeAttributes.put(BRIGAND, BrigandEntity.getAttributes().create());
GlobalEntityTypeAttributes.put(CAMEL, CamelEntity.getAttributes().create());
GlobalEntityTypeAttributes.put(DESERT_RABBIT, DesertRabbitEntity.getAttributes().create());
GlobalEntityTypeAttributes.put(DESERT_WOLF, DesertWolfEntity.getAttributes().create());
GlobalEntityTypeAttributes.put(FORSAKEN, ForsakenEntity.getAttributes().create());
GlobalEntityTypeAttributes.put(MUMMY, MummyEntity.getAttributes().create());
GlobalEntityTypeAttributes.put(NOMAD, NomadEntity.getAttributes().create());
GlobalEntityTypeAttributes.put(PHARAOH, PharaohEntity.getAttributes().create());
GlobalEntityTypeAttributes.put(QUAIL, QuailEntity.getAttributes().create());
GlobalEntityTypeAttributes.put(SCARAB, ScarabEntity.getAttributes().create());
GlobalEntityTypeAttributes.put(SERGEANT, SergeantEntity.getAttributes().create());
GlobalEntityTypeAttributes.put(STONEGUARD, StoneguardEntity.getAttributes().create());
GlobalEntityTypeAttributes.put(STONEGUARD_FRIENDLY, StoneguardEntity.getAttributes().create());
GlobalEntityTypeAttributes.put(STONEWARDEN, StonewardenEntity.getAttributes().create());
GlobalEntityTypeAttributes.put(STONEWARDEN_FRIENDLY, StoneguardEntity.getAttributes().create());
GlobalEntityTypeAttributes.put(SUNSPEAKER, SunspeakerEntity.getAttributes().create());
GlobalEntityTypeAttributes.put(TARANTULA, TarantulaEntity.getAttributes().create());
GlobalEntityTypeAttributes.put(WRAITH, WraithEntity.getAttributes().create());
@SubscribeEvent
public static void addEntityAttributes(EntityAttributeCreationEvent event) {
event.put(ASSASSIN, AssassinEntity.getAttributes().create());
event.put(BANDIT_WARLORD, WarlordEntity.getAttributes().create());
event.put(BARBARIAN, BarbarianEntity.getAttributes().create());
event.put(BONESTORM, BonestormEntity.getAttributes().create());
event.put(BRIGAND, BrigandEntity.getAttributes().create());
event.put(CAMEL, CamelEntity.getAttributes().create());
event.put(DESERT_RABBIT, DesertRabbitEntity.getAttributes().create());
event.put(DESERT_WOLF, DesertWolfEntity.getAttributes().create());
event.put(FORSAKEN, ForsakenEntity.getAttributes().create());
event.put(MUMMY, MummyEntity.getAttributes().create());
event.put(NOMAD, NomadEntity.getAttributes().create());
event.put(PHARAOH, PharaohEntity.getAttributes().create());
event.put(QUAIL, QuailEntity.getAttributes().create());
event.put(SCARAB, ScarabEntity.getAttributes().create());
event.put(SERGEANT, SergeantEntity.getAttributes().create());
event.put(STONEGUARD, StoneguardEntity.getAttributes().create());
event.put(STONEGUARD_FRIENDLY, StoneguardEntity.getAttributes().create());
event.put(STONEWARDEN, StonewardenEntity.getAttributes().create());
event.put(STONEWARDEN_FRIENDLY, StoneguardEntity.getAttributes().create());
event.put(SUNSPEAKER, SunspeakerEntity.getAttributes().create());
event.put(TARANTULA, TarantulaEntity.getAttributes().create());
event.put(WRAITH, WraithEntity.getAttributes().create());
}

public static boolean canAnimalSpawn(EntityType<? extends AnimalEntity> animal, IWorld world, SpawnReason spawnReason, BlockPos pos, Random random) {
Expand Down
4 changes: 2 additions & 2 deletions src/main/resources/META-INF/mods.toml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
modLoader="javafml"
loaderVersion="[35,)"
loaderVersion="[36,)"
license="All Rights Reserved"

[[mods]]
Expand All @@ -19,7 +19,7 @@ license="All Rights Reserved"
[[dependencies.atum]]
modId="forge"
mandatory=true
versionRange="[35.0.15,)"
versionRange="[36.0.43,)"
ordering="AFTER"
side="BOTH"

Expand Down

0 comments on commit 70410c1

Please sign in to comment.