Skip to content

Commit

Permalink
fix ci again, fix aqueduct crash, fix zombified piglins not having th…
Browse files Browse the repository at this point in the history
…e right stuff, make soul clay discs more common
  • Loading branch information
eerussianguy committed Oct 3, 2024
1 parent 27f1aac commit 67ce8de
Show file tree
Hide file tree
Showing 9 changed files with 346 additions and 14 deletions.
8 changes: 4 additions & 4 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -53,11 +53,11 @@ jobs:
if: ${{ steps.version.outputs.result != 'alpha' && success() }}
uses: Kir-Antipov/[email protected]
with:
# modrinth-id: beneath
# modrinth-token: ${{ secrets.MODRINTH_API_KEY }}
modrinth-id: beneath
modrinth-token: ${{ secrets.MODRINTH_API_KEY }}

# curseforge-id: 1113980
# curseforge-token: ${{ secrets.CURSEFORGE_API_KEY }}
curseforge-id: 1113980
curseforge-token: ${{ secrets.CURSEFORGE_API_KEY }}

github-tag: ${{ github.ref }}
github-draft: true
Expand Down
Binary file modified docs/crimson.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified docs/warped.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
2 changes: 1 addition & 1 deletion resources/data.py
Original file line number Diff line number Diff line change
Expand Up @@ -226,7 +226,7 @@ def generate(rm: ResourceManager):
rm.entity_loot('minecraft:piglin', '1-2 tfc:food/pork', '1-3 minecraft:bone')
rm.entity_loot('minecraft:strider', '1-2 minecraft:bone', 'beneath:cursed_hide')
rm.entity_loot('minecraft:zoglin', '1-3 minecraft:bone', '1-3 minecraft:rotten_flesh', 'beneath:cursed_hide')
rm.entity_loot('minecraft:zombie_piglin', '1-3 minecraft:bone', '1-3 minecraft:rotten_flesh')
rm.entity_loot('minecraft:zombified_piglin', '1-3 minecraft:bone', '1-3 minecraft:rotten_flesh')

### BLOCK TAGS ###
rm.block_tag('breaks_slowly', 'minecraft:netherrack', 'minecraft:soul_sand', 'minecraft:soul_soil', 'minecraft:magma_block', 'minecraft:warped_nylium', 'minecraft:crimson_nylium')
Expand Down
2 changes: 1 addition & 1 deletion resources/world_gen.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ def generate(rm: ResourceManager):
configured_placed_feature(rm, 'blackstone_boulders', 'beneath:nether_boulders', {'blocks': weighted_list([('minecraft:blackstone', 50), ('minecraft:basalt', 10), ('minecraft:gilded_blackstone', 1)])}, decorate_chance(24), decorate_every_layer(1), decorate_flat_enough(0.4, 2, 4), decorate_biome())
configured_placed_feature(rm, 'cobble_boulders', 'beneath:nether_boulders', {'blocks': weighted_list([('minecraft:netherrack', 10), ('beneath:cobblerack', 20), ('beneath:fungal_cobblerack', 10)])}, decorate_chance(24), decorate_every_layer(1), decorate_flat_enough(0.4, 3, 4), decorate_biome())
configured_placed_feature(rm, 'amethyst_geode', 'tfc:geode', {'outer': 'minecraft:blackstone', 'middle': 'tfc:rock/raw/quartzite', 'inner': [{'data': 'tfc:ore/amethyst/quartzite', 'weight': 1}, {'data': 'tfc:rock/raw/quartzite', 'weight': 2}]}, decorate_chance(100), decorate_above_lava_level(), decorate_square())
configured_placed_feature(rm, 'soul_clay_disc', 'tfc:soil_disc', {'states': [{'replace': 'minecraft:soul_sand', 'with': 'beneath:soul_clay'}], 'min_radius': 3, 'max_radius': 5, 'height': 3}, decorate_chance(20), decorate_every_layer(1), decorate_flat_enough(0.4, 2, 4))
configured_placed_feature(rm, 'soul_clay_disc', 'tfc:soil_disc', {'states': [{'replace': 'minecraft:soul_sand', 'with': 'beneath:soul_clay'}], 'min_radius': 3, 'max_radius': 5, 'height': 3}, decorate_chance(15), decorate_every_layer(1), decorate_flat_enough(0.3, 2, 4))
configured_placed_feature(rm, 'delta', 'minecraft:delta_feature', {'contents': utils.block_state('minecraft:lava[level=0]'), 'rim': utils.block_state('tfc:rock/magma/basalt'), 'rim_size': uniform_int(3, 7), 'size': uniform_int(0, 2)}, decorate_every_layer(40), decorate_biome())
configured_placed_feature(rm, 'gleamflower', 'minecraft:simple_block', {'to_place': simple_state_provider('beneath:gleamflower')}, decorate_replaceable(), decorate_would_survive('beneath:gleamflower'), decorate_air())
configured_placed_feature(rm, 'gleamflower_patch', 'minecraft:random_patch', random_config('beneath:gleamflower', 5, 5, 1), decorate_chance(4), decorate_every_layer(1), decorate_biome())
Expand Down
19 changes: 18 additions & 1 deletion src/main/java/com/eerussianguy/beneath/ForgeEvents.java
Original file line number Diff line number Diff line change
Expand Up @@ -14,11 +14,14 @@
import net.minecraft.core.BlockPos;
import net.minecraft.server.level.ServerPlayer;
import net.minecraft.world.InteractionHand;
import net.minecraft.world.entity.AgeableMob;
import net.minecraft.world.entity.Entity;
import net.minecraft.world.entity.EntityType;
import net.minecraft.world.entity.EquipmentSlot;
import net.minecraft.world.entity.LivingEntity;
import net.minecraft.world.entity.animal.Animal;
import net.minecraft.world.entity.monster.Strider;
import net.minecraft.world.entity.monster.hoglin.Hoglin;
import net.minecraft.world.entity.projectile.LargeFireball;
import net.minecraft.world.item.Item;
import net.minecraft.world.item.ItemStack;
Expand Down Expand Up @@ -71,6 +74,7 @@ public static void init()
bus.addListener(ForgeEvents::onEntityJoinLevel);
bus.addListener(ForgeEvents::onSpawnCheck);
bus.addListener(ForgeEvents::onFireStart);
bus.addListener(ForgeEvents::onEntityInteract);
bus.addListener(BeneathEntities::onSpawnPlacement);
bus.addListener(PortalUtil::onLivingDeath);
bus.addListener(EventPriority.LOWEST, true, ForgeEvents::onPlayerRightClickBlockLowestPriority);
Expand Down Expand Up @@ -130,6 +134,19 @@ else if (block == BeneathBlocks.CURSECOAL_PILE.get() && state.getValue(Cursecoal
}
}

public static void onEntityInteract(PlayerInteractEvent.EntityInteract event)
{
Entity target = event.getTarget();
if ((target instanceof Strider || target instanceof Hoglin))
{
final Animal animal = (Animal) target;
if (animal.isFood(event.getItemStack()))
{
event.setCanceled(true);
}
}
}

public static void onPlayerRightClickBlockLowestPriority(PlayerInteractEvent.RightClickBlock event)
{
if (NetherFertilizer.get(event.getItemStack()) != null)
Expand All @@ -148,7 +165,7 @@ private static void onEntityJoinLevel(EntityJoinLevelEvent event)
if (entity instanceof LivingEntity living)
{
final Item main = living.getMainHandItem().getItem();
if (type == EntityType.PIGLIN || type == EntityType.PIGLIN_BRUTE)
if (type == EntityType.PIGLIN || type == EntityType.PIGLIN_BRUTE || type == EntityType.ZOMBIFIED_PIGLIN)
{
if (main == Items.GOLDEN_SWORD)
{
Expand Down
Loading

0 comments on commit 67ce8de

Please sign in to comment.