Skip to content

Commit

Permalink
remove lead eating mechanic
Browse files Browse the repository at this point in the history
  • Loading branch information
PssbleTrngle committed Sep 20, 2024
1 parent fc35c1d commit dc4bb19
Show file tree
Hide file tree
Showing 7 changed files with 3 additions and 38 deletions.
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// 1.20.1 2024-09-17T12:51:06.9601625 Oreganized Item Tags
// 1.20.1 2024-09-20T10:43:10.6795167 Oreganized Item Tags
3a2cbf8d34e9bde2e22d59d4437fa80361d53291 data/farmersdelight/tags/items/tools/knives.json
d8d286ea76e30a635512bc93d68815770003ff41 data/forge/tags/items/buckets/molten_lead.json
7a2d68d81bc5ee59f9a2f4ba68ddb39bfd9c875d data/forge/tags/items/glass.json
Expand Down Expand Up @@ -48,7 +48,6 @@ a4acb3623320f801e89e3451f8b7d9e2246f99d0 data/minecraft/tags/items/walls.json
f1dfddab1e3f2dec1e7ed1c3fbf9f6a7f261cf08 data/oreganized/tags/items/crystal_glass_panes.json
bf2ad799074f5c44acee490bdf3d3ae81d56997b data/oreganized/tags/items/gargoyle_snack.json
4d89056c908550931c1f2008f9817f5d3ff7aa68 data/oreganized/tags/items/has_kinetic_damage.json
f7810c755845dc955112f7b0cedf68260ad693cc data/oreganized/tags/items/lead_source.json
376b7c9ff449a4b98cb7b1f65b47d658c4e39428 data/oreganized/tags/items/lighter_than_lead.json
3112fb4a1df2953e2c3572fa47f886bf8e5bd679 data/oreganized/tags/items/stone_types/glance.json
3d43625006347afbc2d100972433d9af9db7ac3e data/shieldexp/tags/items/shields.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
"effects": {
"oreganized:stunning": {
"amplifier": {
"max": 4
"max": 6
}
}
}
Expand Down

This file was deleted.

3 changes: 1 addition & 2 deletions src/main/java/galena/oreganized/data/OAdvancements.java
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
package galena.oreganized.data;

import galena.oreganized.Oreganized;
import galena.oreganized.content.effect.StunningEffect;
import galena.oreganized.data.provider.OLangProvider;
import galena.oreganized.index.OBlocks;
import galena.oreganized.index.OCriteriaTriggers;
Expand Down Expand Up @@ -72,7 +71,7 @@ public void generate(@Nullable HolderLookup.Provider provider, Consumer<Advancem
.display(info(OItems.MOLTEN_LEAD_BUCKET.get(), "profound_brain_damage", FrameType.TASK,
"Profound Brain Damage", "Let your health reach half a heart while having the Brain Damage effect"))
.addCriterion("stunned", EffectsChangedTrigger.TriggerInstance.hasEffects(MobEffectsPredicate.effects()
.and(OEffects.STUNNING.get(), new MobEffectsPredicate.MobEffectInstancePredicate(MinMaxBounds.Ints.atMost(StunningEffect.MAX_AMPLIFIER / 2), MinMaxBounds.Ints.ANY, null, null))))
.and(OEffects.STUNNING.get(), new MobEffectsPredicate.MobEffectInstancePredicate(MinMaxBounds.Ints.atMost(6), MinMaxBounds.Ints.ANY, null, null))))
.save(consumer, "oreganized:story/profound_brain_damage");

var obtainSilver = Advancement.Builder.advancement()
Expand Down
3 changes: 0 additions & 3 deletions src/main/java/galena/oreganized/data/OItemTags.java
Original file line number Diff line number Diff line change
Expand Up @@ -35,9 +35,6 @@ public String getName() {
@Override
protected void addTags(HolderLookup.Provider provider) {
// Oreganized
tag(LEAD_SOURCE).addTags(INGOTS_LEAD, NUGGETS_LEAD, ORES_LEAD).add(
OItems.BUSH_HAMMER.get(), OItems.MOLTEN_LEAD_BUCKET.get()
);
copy(OTags.Blocks.CRYSTAL_GLASS, CRYSTAL_GLASS);
copy(OTags.Blocks.CRYSTAL_GLASS_PANES, CRYSTAL_GLASS_PANES);
tag(LIGHTER_THAN_LEAD).add(Items.IRON_BOOTS);
Expand Down
1 change: 0 additions & 1 deletion src/main/java/galena/oreganized/index/OTags.java
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,6 @@ public class OTags {

public static class Items {

public static final TagKey<Item> LEAD_SOURCE = tag("lead_source");
public static final TagKey<Item> CRYSTAL_GLASS = tag("crystal_glass");
public static final TagKey<Item> CRYSTAL_GLASS_PANES = tag("crystal_glass_panes");
public static final TagKey<Item> LIGHTER_THAN_LEAD = tag("lighter_than_lead");
Expand Down
20 changes: 0 additions & 20 deletions src/main/java/galena/oreganized/world/event/PlayerEvents.java
Original file line number Diff line number Diff line change
Expand Up @@ -109,26 +109,6 @@ public static void blockItemInteractions(final PlayerInteractEvent.RightClickBlo
}
}

@SubscribeEvent
public static void finishUsingItem(final LivingEntityUseItemEvent.Finish event) {
LivingEntity entity = event.getEntity();
ItemStack itemStack = event.getItem();
if (itemStack.isEdible()) {
boolean leadPoisoning = entity.isInFluidType(OFluids.MOLTEN_LEAD_TYPE.get());
if (entity instanceof Player player) {
for (int i = 0; i < 9; i++) {
if (player.getInventory().items.get(i).is(OTags.Items.LEAD_SOURCE))
leadPoisoning = true;
}
}
if ((entity.getOffhandItem().is(OTags.Items.LEAD_SOURCE) || leadPoisoning) && OreganizedConfig.COMMON.leadPoisining.get()) {
if (OreganizedConfig.stunningFromConfig())
entity.addEffect(new MobEffectInstance(OEffects.STUNNING.get(), 40 * 20));
entity.addEffect(new MobEffectInstance(MobEffects.POISON, 200));
}
}
}

@SubscribeEvent
public static void tickPlayer(final TickEvent.PlayerTickEvent event) {
if (event.phase == TickEvent.Phase.START) return;
Expand Down

0 comments on commit dc4bb19

Please sign in to comment.