Skip to content

Commit 2c0883e

Browse files
committed
Rose gold bomb fixes
1 parent b7d7563 commit 2c0883e

5 files changed

Lines changed: 38 additions & 2 deletions

File tree

CHANGELOG-LATEST.md

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,11 +5,14 @@
55
- Setting in music and sounds menu to control jukebox fade distance.
66
- Config option to disable Ecologics penguins dropping feathers.
77
- Config option to modify Savage & Ravage creeper spore cloud durations.
8+
- Disabled some curative items.
89

910
### Fixed
1011
- Swap Arrows can no longer force Withers into boats.
1112
- Vertical leashes now render properly.
1213
- Leads now connect to the front of boats.
1314
- Boat leash connections persist on world reload.
1415
- A spectator with Bracewalk no longer can break blocks. (Additional Enchantments)
15-
- Aloe Vera blocks can now be harvested with modded shears. (Atmospheric)
16+
- Aloe Vera blocks can now be harvested with modded shears. (Atmospheric)
17+
- Rose Gold bombs now dispense correctly.
18+
- Crash with Pehkui.

src/main/java/cc/cassian/raspberry/items/RoseGoldBombItem.java

Lines changed: 26 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,19 +2,44 @@
22

33
import cc.cassian.raspberry.entity.Ashball;
44
import cc.cassian.raspberry.entity.RoseGoldBombEntity;
5+
import cc.cassian.raspberry.entity.SwapArrowEntity;
56
import cc.cassian.raspberry.registry.RaspberrySoundEvents;
7+
import net.mehvahdjukaar.supplementaries.common.entities.BombEntity;
8+
import net.mehvahdjukaar.supplementaries.common.items.BombItem;
9+
import net.minecraft.core.BlockSource;
10+
import net.minecraft.core.Direction;
11+
import net.minecraft.core.Position;
12+
import net.minecraft.core.dispenser.AbstractProjectileDispenseBehavior;
613
import net.minecraft.sounds.SoundSource;
714
import net.minecraft.stats.Stats;
815
import net.minecraft.world.InteractionHand;
916
import net.minecraft.world.InteractionResultHolder;
1017
import net.minecraft.world.entity.player.Player;
18+
import net.minecraft.world.entity.projectile.AbstractArrow;
19+
import net.minecraft.world.entity.projectile.Projectile;
1120
import net.minecraft.world.item.Item;
1221
import net.minecraft.world.item.ItemStack;
1322
import net.minecraft.world.level.Level;
23+
import net.minecraft.world.level.block.DispenserBlock;
1424

1525
public class RoseGoldBombItem extends Item {
1626
public RoseGoldBombItem(Properties properties) {
1727
super(properties);
28+
DispenserBlock.registerBehavior(this, new AbstractProjectileDispenseBehavior() {
29+
30+
@Override
31+
protected Projectile getProjectile(Level level, Position position, ItemStack stack) {
32+
return new RoseGoldBombEntity(level, position.x(), position.y(), position.z());
33+
}
34+
35+
protected float getUncertainty() {
36+
return 11.0F;
37+
}
38+
39+
protected float getPower() {
40+
return 1.3F;
41+
}
42+
});
1843
}
1944

2045
@Override
@@ -25,7 +50,7 @@ public InteractionResultHolder<ItemStack> use(Level level, Player player, Intera
2550
player.getX(),
2651
player.getY(),
2752
player.getZ(),
28-
RaspberrySoundEvents.ASHBALL_THROW.get(),
53+
RaspberrySoundEvents.ROSE_GOLD_BOMB_THROW.get(),
2954
SoundSource.NEUTRAL,
3055
0.5F,
3156
0.4F / (level.getRandom().nextFloat() * 0.4F + 0.8F)

src/main/java/cc/cassian/raspberry/registry/RaspberrySoundEvents.java

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@ public class RaspberrySoundEvents {
1414
public static final DeferredRegister<SoundEvent> SOUNDS = DeferredRegister.create(ForgeRegistries.SOUND_EVENTS, MOD_ID);
1515

1616
public static final RegistryObject<SoundEvent> ASHBALL_THROW = register("entity.ashball.throw");
17+
public static final RegistryObject<SoundEvent> ROSE_GOLD_BOMB_THROW = register("entity.rose_gold_bomb.throw");
1718
public static final RegistryObject<SoundEvent> CRUNCHY_FRUIT_SOUNDS = register("entity.crunchy_fruit.eat");
1819
public static final RegistryObject<SoundEvent> SOFT_FRUIT_SOUNDS = register("entity.soft_fruit.eat");
1920
public static final RegistryObject<SoundEvent> DRIED_KELP_SOUNDS = register("entity.dried_kelp.eat");

src/main/resources/assets/raspberry/lang/en_us.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -51,6 +51,7 @@
5151

5252

5353
"raspberry.subtitles.entity.ashball.throw": "Ashball flies",
54+
"raspberry.subtitles.entity.rose_gold_bomb.throw": "Bomb flies",
5455
"raspberry.subtitles.player.attack.silver_hit": "Mirror connects",
5556

5657
"subtitles.item.armor.equip_copper": "Copper armor clonks",

src/main/resources/assets/raspberry/sounds.json

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,12 @@
55
],
66
"subtitle": "raspberry.subtitles.entity.ashball.throw"
77
},
8+
"entity.rose_gold_bomb.throw": {
9+
"sounds": [
10+
"random/bow"
11+
],
12+
"subtitle": "raspberry.subtitles.entity.rose_gold_bomb.throw"
13+
},
814
"entity.dried_kelp.eat": {
915
"sounds": [
1016
"raspberry:eat_dried_kelp1",

0 commit comments

Comments
 (0)