Skip to content

Commit

Permalink
Add portal loot table
Browse files Browse the repository at this point in the history
  • Loading branch information
IcarussOne committed May 22, 2024
1 parent dbf2b7b commit 9daa02e
Show file tree
Hide file tree
Showing 5 changed files with 230 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@
@EventBusSubscriber(modid = CrimsonRevelations.MODID)
public class LootTableHandler {
public static final ResourceLocation CULTIST = new ResourceLocation(CrimsonRevelations.MODID, ("entities/cultist"));
public static final ResourceLocation LESSER_CULTIST_PORTAL = new ResourceLocation(CrimsonRevelations.MODID, ("entities/lesser_cultist_portal"));

// Bosses
public static final ResourceLocation OVERGROWN_TAINTACLE = new ResourceLocation(CrimsonRevelations.MODID, ("entities/boss/overgrown_taintacle"));
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
package com.mobiusflip.crimsonrevelations.mixin;

import javax.annotation.Nullable;

import org.spongepowered.asm.mixin.Mixin;

import com.mobiusflip.crimsonrevelations.init.LootTableHandler;

import net.minecraft.entity.monster.EntityMob;
import net.minecraft.util.ResourceLocation;
import net.minecraft.world.World;
import thaumcraft.common.entities.monster.cult.EntityCultistPortalLesser;

@Mixin(value = EntityCultistPortalLesser.class, remap = false)
public class EntityCultistPortalLesserMixin extends EntityMob {
public EntityCultistPortalLesserMixin(World world) {
super(world);
}

@Override
@Nullable
protected ResourceLocation getLootTable() {
return LootTableHandler.LESSER_CULTIST_PORTAL;
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@
{
"function": "set_count",
"count": {
"min": 1,
"min": 2,
"max": 4
}
},
Expand All @@ -78,6 +78,55 @@
]
}
]
},
{
"name": "curio",
"rolls": 1,
"conditions": [
{
"condition": "minecraft:random_chance_with_looting",
"chance": 0.7,
"looting_multiplier": 0.1
}
],
"entries": [
{
"type": "item",
"name": "thaumcraft:curio",
"entryName": "arcane_curiosity",
"weight": 1,
"functions": [
{
"function": "set_data",
"data": 0
}
]
},
{
"type": "item",
"name": "thaumcraft:curio",
"entryName": "eldritch_curiosity",
"weight": 1,
"functions": [
{
"function": "set_data",
"data": 3
}
]
},
{
"type": "item",
"name": "thaumcraft:curio",
"entryName": "twisted_curiosity",
"weight": 1,
"functions": [
{
"function": "set_data",
"data": 5
}
]
}
]
}
]
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,153 @@
{
"pools": [
{
"name": "loot_bag",
"rolls": 1,
"entries": [
{
"type": "item",
"name": "thaumcraft:loot_bag",
"weight": 1,
"functions": [
{
"function": "set_data",
"data": 0
}
]
}
]
},
{
"name": "crimson_material",
"rolls": 1,
"entries": [
{
"type": "item",
"name": "crimsonrevelations:crimson_fabric",
"weight": 1,
"conditions": [
{
"condition": "killed_by_player"
}
],
"functions": [
{
"function": "set_count",
"count": {
"min": 2,
"max": 4
}
},
{
"function": "looting_enchant",
"count": {
"min": 0,
"max": 2
}
}
]
},
{
"type": "item",
"name": "crimsonrevelations:crimson_plate",
"weight": 1,
"conditions": [
{
"condition": "killed_by_player"
}
],
"functions": [
{
"function": "set_count",
"count": {
"min": 2,
"max": 4
}
},
{
"function": "looting_enchant",
"count": {
"min": 0,
"max": 2
}
}
]
}
]
},
{
"name": "crimson_rites",
"rolls": 1,
"conditions": [
{
"condition": "minecraft:random_chance_with_looting",
"chance": 0.1,
"looting_multiplier": 0.02
}
],
"entries": [
{
"type": "item",
"name": "thaumcraft:curio",
"entryName": "crimson_rites",
"weight": 1,
"functions": [
{
"function": "set_data",
"data": 6
}
]
}
]
},
{
"name": "curio",
"rolls": 1,
"conditions": [
{
"condition": "minecraft:random_chance_with_looting",
"chance": 0.5,
"looting_multiplier": 0.1
}
],
"entries": [
{
"type": "item",
"name": "thaumcraft:curio",
"entryName": "arcane_curiosity",
"weight": 1,
"functions": [
{
"function": "set_data",
"data": 0
}
]
},
{
"type": "item",
"name": "thaumcraft:curio",
"entryName": "ancient_curiosity",
"weight": 1,
"functions": [
{
"function": "set_data",
"data": 2
}
]
},
{
"type": "item",
"name": "thaumcraft:curio",
"entryName": "illuminating_curiosity",
"weight": 1,
"functions": [
{
"function": "set_data",
"data": 4
}
]
}
]
}
]
}
1 change: 1 addition & 0 deletions src/main/resources/mixins.crimsonrevelations.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
"minVersion": "0.8",
"compatibilityLevel": "JAVA_8",
"mixins": [
"EntityCultistPortalLesserMixin",
"TCEntityEventsMixin"
],
"client": [],
Expand Down

0 comments on commit 9daa02e

Please sign in to comment.