Skip to content

Commit

Permalink
guess who forgot to call the whole RuntimeEvents
Browse files Browse the repository at this point in the history
  • Loading branch information
mrsterner committed Dec 6, 2024
1 parent f1f740f commit a22c8ed
Show file tree
Hide file tree
Showing 20 changed files with 135 additions and 11 deletions.
2 changes: 1 addition & 1 deletion build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -121,7 +121,7 @@ dependencies {
modCompileOnly("me.shedaniel:RoughlyEnoughItems-default-plugin-fabric:${property("rei_version")}")

// Trinkets Dependency
modImplementation("dev.emi:trinkets:${property("trinkets_version")}") { isTransitive = false }
modImplementation("dev.emi:trinkets:${property("trinkets_version")}")

//modImplementation("team.lodestar.lodestone:lodestone:${property("minecraft_version")}-${property("lodestone_version")}-fabric")
modImplementation("maven.modrinth:lodestonelib:${property("minecraft_version")}-${property("lodestone_version")}-fabric")
Expand Down
2 changes: 1 addition & 1 deletion gradle.properties
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ mod_description=A dark magic mod focused on soul and spirit magic.
# Mod Dependency Versions


lodestone_version=1.7.0.5
lodestone_version=1.7.0.6
jei_version=19.21.0.247
emi_version=1.1.18+1.21.1
rei_version=16.0.788
Expand Down
Binary file added lib/lodestonelib-1.21.1-1.7.0.6-fabric.jar
Binary file not shown.
3 changes: 3 additions & 0 deletions src/main/java/com/sammy/malum/MalumMod.java
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
import com.sammy.malum.common.capability.MalumPlayerDataCapability;
import com.sammy.malum.compability.farmersdelight.*;
import com.sammy.malum.config.*;
import com.sammy.malum.core.events.RuntimeEvents;
import com.sammy.malum.core.handlers.*;
import com.sammy.malum.core.listeners.MalignantConversionReloadListener;
import com.sammy.malum.core.listeners.ReapingDataReloadListener;
Expand Down Expand Up @@ -79,6 +80,8 @@ public void onInitialize() {
MobEffectRegistry.registerBrewingRecipes();
ArmorSkinRegistry.registerItemSkins();

RuntimeEvents.init();

FarmersDelightCompat.init();

ResourceManagerHelper.get(PackType.SERVER_DATA).registerReloadListener(new SpiritDataReloadListenerFabricImpl());
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
import java.util.Map;
import java.util.function.Consumer;

public class MalumCurioItem extends AbstractMalumCurioItem implements Trinket {
public class MalumCurioItem extends AbstractMalumCurioItem {

public MalumCurioItem(Properties properties, MalumTrinketType type) {
super(properties, type);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
import com.sammy.malum.core.systems.events.*;
import com.sammy.malum.registry.common.AttributeRegistry;
import dev.emi.trinkets.api.SlotReference;
import dev.emi.trinkets.api.TrinketsApi;
import net.minecraft.core.Holder;
import net.minecraft.network.chat.Component;
import net.minecraft.world.entity.LivingEntity;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -206,15 +206,14 @@ public static void renderHiddenBladeCooldown(GuiGraphics guiGraphics, DeltaTrack
builder.setAlpha((80 - fadeOut) / (hasEffect ? 10f : 60f));
}
builder.setPosColorTexLightmapDefaultFormat()
.overrideBufferBuilder(Tesselator.getInstance().begin(VertexFormat.Mode.QUADS, DefaultVertexFormat.POSITION_COLOR_TEX_LIGHTMAP))
.setPositionWithWidth(left, top, size, size)
.setUVWithWidth(xOffset, yOffset, 16, 16, 64)
.draw(poseStack);
;//.draw(poseStack);
if (fadeOut > 0 && fadeOut < 20) {
float glow = (10 - Math.abs(10 - fadeOut)) / 10f;
RenderSystem.blendFunc(GL11.GL_SRC_ALPHA, GL11.GL_ONE);

builder.setAlpha(glow).draw(poseStack);
//builder.setAlpha(glow).draw(poseStack);
}

shaderInstance.setUniformDefaults();
Expand Down
10 changes: 5 additions & 5 deletions src/main/java/com/sammy/malum/core/events/RuntimeEvents.java
Original file line number Diff line number Diff line change
Expand Up @@ -15,14 +15,13 @@
import com.sammy.malum.core.handlers.*;
import com.sammy.malum.core.listeners.*;
import dev.architectury.event.EventResult;
import dev.architectury.event.events.common.EntityEvent;
import dev.architectury.event.events.common.ExplosionEvent;
import io.github.fabricators_of_create.porting_lib.entity.events.EntityJoinLevelEvent;
import io.github.fabricators_of_create.porting_lib.entity.events.living.*;
import io.github.fabricators_of_create.porting_lib.entity.events.player.PlayerEvent;
import io.github.fabricators_of_create.porting_lib.entity.events.player.PlayerInteractEvent;
import io.github.fabricators_of_create.porting_lib.entity.events.tick.EntityTickEvent;
import io.github.fabricators_of_create.porting_lib.entity.events.tick.PlayerTickEvent;
import io.github.fabricators_of_create.porting_lib.event.common.ExplosionEvents;
import net.minecraft.core.*;
import net.minecraft.world.entity.Entity;
import net.minecraft.world.entity.LivingEntity;
Expand All @@ -41,7 +40,8 @@
public class RuntimeEvents {

public static void init() {
EntityEvent.LIVING_CHECK_SPAWN.register(RuntimeEvents::onEntityJoin);
EntityJoinLevelEvent.EVENT.register(RuntimeEvents::onEntityJoin);
//EntityEvent.LIVING_CHECK_SPAWN.register(RuntimeEvents::onEntityJoin);
EntityJoinLevelEvent.EVENT.register(RuntimeEvents::onEntityJoin);
PlayerInteractEvent.LeftClickBlock.EVENT.register(RuntimeEvents::playerLeftClick);
LivingFallEvent.EVENT.register(RuntimeEvents::onEntityFall);
Expand All @@ -60,11 +60,11 @@ public static void init() {
LivingDeathEvent.EVENT.register(RuntimeEvents::onDeath);
LivingDropsEvent.EVENT.register(RuntimeEvents::onDrops);
LodestoneItemEvent.EXPIRE.register(RuntimeEvents::onItemExpire);
ExplosionEvent.DETONATE.register(RuntimeEvents::onExplosionDetonate);
ExplosionEvents.DETONATE.register(RuntimeEvents::onExplosionDetonate);

}

private static void onExplosionDetonate(Level level, Explosion explosion, List<Entity> entities) {
private static void onExplosionDetonate(Level level, Explosion explosion, List<Entity> entities, double v) {
CurioProspectorBelt.processExplosion(level, explosion, entities);
NitrateExplosion.processExplosion(level, explosion, entities);
}
Expand Down
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
14 changes: 14 additions & 0 deletions src/main/resources/data/trinkets/entities/malum.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
{
"entities": [
"player"
],
"slots": [
"hand/ring",
"offhand/ring",
"legs/belt",
"chest/necklace",
"head/charm",
"legs/rune",
"chest/brooch"
]
}
3 changes: 3 additions & 0 deletions src/main/resources/data/trinkets/slots/chest/brooch.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
{
"icon": "malum:slot/empty_brooch_slot"
}
3 changes: 3 additions & 0 deletions src/main/resources/data/trinkets/slots/head/charm.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
{
"icon": "malum:slot/empty_charm_slot"
}
3 changes: 3 additions & 0 deletions src/main/resources/data/trinkets/slots/legs/rune.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
{
"icon": "malum:slot/empty_rune_slot"
}
8 changes: 8 additions & 0 deletions src/main/resources/data/trinkets/tags/item/chest/brooch.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
{
"values": [
"malum:runic_brooch",
"malum:elaborate_brooch",
"malum:glass_brooch",
"malum:gluttonous_brooch"
]
}
12 changes: 12 additions & 0 deletions src/main/resources/data/trinkets/tags/item/chest/necklace.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
{
"replace": false,
"values": [
"malum:ornate_necklace",
"malum:necklace_of_the_mystic_mirror",
"malum:necklace_of_tidal_affinity",
"malum:necklace_of_the_narrow_edge",
"malum:necklace_of_blissful_harmony",
"malum:necklace_of_the_hidden_blade",
"malum:necklace_of_the_watcher"
]
}
17 changes: 17 additions & 0 deletions src/main/resources/data/trinkets/tags/item/hand/ring.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
{
"replace": false,
"values": [
"malum:gilded_ring",
"malum:ornate_ring",
"malum:ring_of_esoteric_spoils",
"malum:ring_of_curative_talent",
"malum:ring_of_arcane_prowess",
"malum:ring_of_alchemical_mastery",
"malum:ring_of_desperate_voracity",
"malum:ring_of_the_hoarder",
"malum:ring_of_the_demolitionist",
"malum:ring_of_the_endless_well",
"malum:ring_of_growing_flesh",
"malum:ring_of_gruesome_concentration"
]
}
6 changes: 6 additions & 0 deletions src/main/resources/data/trinkets/tags/item/head/charm.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
{
"values": [
"malum:tophat",
"malum:token_of_gratitude"
]
}
10 changes: 10 additions & 0 deletions src/main/resources/data/trinkets/tags/item/legs/belt.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
{
"replace": false,
"values": [
"malum:gilded_belt",
"malum:belt_of_the_starved",
"malum:belt_of_the_prospector",
"malum:belt_of_the_magebane",
"malum:belt_of_the_limitless"
]
}
28 changes: 28 additions & 0 deletions src/main/resources/data/trinkets/tags/item/legs/rune.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
{
"values": [
"malum:rune_of_idle_restoration",
"malum:rune_of_culling",
"malum:rune_of_reinforcement",
"malum:rune_of_volatile_distortion",
"malum:rune_of_dexterity",
"malum:rune_of_aliment_cleansing",
"malum:rune_of_reactive_shielding",
"malum:rune_of_fervor",
"malum:rune_of_motion",
"malum:rune_of_loyalty",
"malum:rune_of_warding",
"malum:rune_of_haste",
"malum:rune_of_the_aether",
"malum:rune_of_the_seas",
"malum:rune_of_the_arena",
"malum:rune_of_the_hells",
"malum:rune_of_bolstering",
"malum:rune_of_sacrificial_empowerment",
"malum:rune_of_spell_mastery",
"malum:rune_of_the_heretic",
"malum:rune_of_unnatural_stamina",
"malum:rune_of_twinned_duration",
"malum:rune_of_toughness",
"malum:rune_of_igneous_solace"
]
}
17 changes: 17 additions & 0 deletions src/main/resources/data/trinkets/tags/item/offhand/ring.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
{
"replace": false,
"values": [
"malum:gilded_ring",
"malum:ornate_ring",
"malum:ring_of_esoteric_spoils",
"malum:ring_of_curative_talent",
"malum:ring_of_arcane_prowess",
"malum:ring_of_alchemical_mastery",
"malum:ring_of_desperate_voracity",
"malum:ring_of_the_hoarder",
"malum:ring_of_the_demolitionist",
"malum:ring_of_the_endless_well",
"malum:ring_of_growing_flesh",
"malum:ring_of_gruesome_concentration"
]
}

0 comments on commit a22c8ed

Please sign in to comment.