Skip to content

Commit

Permalink
update neo, fix pocket watch effects
Browse files Browse the repository at this point in the history
  • Loading branch information
GizmoTheMoonPig committed Feb 5, 2024
1 parent d3ac29b commit 4e1950f
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 3 deletions.
2 changes: 1 addition & 1 deletion gradle.properties
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ base_minecraft_version=1.20
minecraft_version=1.20.4

# NeoForge
neo_version=20.4.140-beta
neo_version=20.4.150-beta

# Deps
jei_version=17.3.0.43
Expand Down
4 changes: 3 additions & 1 deletion src/main/java/twilightforest/item/PocketWatchItem.java
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
import net.minecraft.world.effect.MobEffects;
import net.minecraft.world.entity.Entity;
import net.minecraft.world.entity.LivingEntity;
import net.minecraft.world.entity.player.Inventory;
import net.minecraft.world.item.Item;
import net.minecraft.world.item.ItemStack;
import net.minecraft.world.item.TooltipFlag;
Expand All @@ -25,8 +26,9 @@ public PocketWatchItem(Properties properties) {
@Override
public void inventoryTick(ItemStack stack, Level level, Entity entity, int slot, boolean held) {
if (entity instanceof LivingEntity living) {
if (slot >= 0 && slot <= 8) {
if ((slot >= 0 && slot <= 8) || slot == Inventory.SLOT_OFFHAND) {
living.addEffect(new MobEffectInstance(MobEffects.MOVEMENT_SPEED, 5, 0, false, false, false));
living.addEffect(new MobEffectInstance(MobEffects.JUMP, 5, 0, false, false, false));
}

if (living.isHolding(this)) {
Expand Down
2 changes: 1 addition & 1 deletion src/main/resources/META-INF/mods.toml
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ An enchanted forest dimension.
[[dependencies.twilightforest]]
modId="neoforge"
type="required"
versionRange="[20.4.140-beta,)"
versionRange="[20.4.150-beta,)"
ordering="NONE"
side="BOTH"

Expand Down

0 comments on commit 4e1950f

Please sign in to comment.