Fixed furnaces consuming buckets
parent
6a3de4f59d
commit
0e3132549c
14
README.md
14
README.md
|
@ -171,10 +171,20 @@ After:
|
|||
<details><summary>Fixes saddled pigs not dropping their saddles on death</summary>
|
||||
|
||||
Before:
|
||||
![pig not dropping its saddle on death](https://i.imgur.com/PVLRNn5.mp4)
|
||||
<video controls src="https://i.imgur.com/PVLRNn5.mp4"/>
|
||||
|
||||
After:
|
||||
![pig dropping its saddle on death](https://i.imgur.com/0yHHfxB.mp4)
|
||||
<video controls src="https://i.imgur.com/0yHHfxB.mp4" />
|
||||
|
||||
</details>
|
||||
|
||||
<details><summary>Fixes furnaces consuming the buckets as well when using lava buckets</summary>
|
||||
|
||||
Before:
|
||||
<video controls src="https://i.imgur.com/BY0t3iG.mp4"/>
|
||||
|
||||
After:
|
||||
<video controls src="https://i.imgur.com/4O7Fo8V.mp4" />
|
||||
|
||||
</details>
|
||||
|
||||
|
|
|
@ -24,9 +24,9 @@ public class WyHelper {
|
|||
Random rand = new Random();
|
||||
// player.level.playSound(player, "random.break", 1, (rand.nextFloat() - rand.nextFloat()) * 0.2F + 1.0F);
|
||||
|
||||
// player.dropItem(new ItemInstance(ItemType.saddle, 1), false);
|
||||
// player.dropItem(new ItemInstance(ItemType.pickaxeGold, 1), false);
|
||||
//
|
||||
// player.dropItem(new ItemInstance(Tile.GOLD_ORE, 64), false);
|
||||
|
||||
// player.dropItem(new ItemInstance(ItemType.bow, 1), false);
|
||||
// player.dropItem(new ItemInstance(ItemType.arrow, 64), false);
|
||||
// player.dropItem(new ItemInstance(Tile.STONE, 64), false);
|
||||
|
|
|
@ -0,0 +1,26 @@
|
|||
package xyz.pixelatedw.finalbeta.mixin;
|
||||
|
||||
import org.spongepowered.asm.mixin.Mixin;
|
||||
import org.spongepowered.asm.mixin.Shadow;
|
||||
import org.spongepowered.asm.mixin.injection.At;
|
||||
import org.spongepowered.asm.mixin.injection.Inject;
|
||||
import org.spongepowered.asm.mixin.injection.callback.CallbackInfo;
|
||||
|
||||
import net.minecraft.entity.FurnaceEntity;
|
||||
import net.minecraft.item.ItemInstance;
|
||||
import net.minecraft.item.ItemType;
|
||||
|
||||
@Mixin(FurnaceEntity.class)
|
||||
public class FurnaceEntityMixin {
|
||||
|
||||
@Shadow
|
||||
private ItemInstance[] contents;
|
||||
|
||||
@Inject(method = "tick", at = @At(value = "INVOKE", target = "Lnet/minecraft/entity/FurnaceEntity;getFuelTime(Lnet/minecraft/item/ItemInstance;)I", shift = At.Shift.BY, by = 5), cancellable = true)
|
||||
public void tick(CallbackInfo ci) {
|
||||
if(this.contents[1] != null && this.contents[1].itemId == ItemType.bucketLava.id) {
|
||||
ci.cancel();
|
||||
this.contents[1] = new ItemInstance(ItemType.bucket);
|
||||
}
|
||||
}
|
||||
}
|
|
@ -57,7 +57,7 @@ public class MinecartMixin {
|
|||
}
|
||||
|
||||
if (speed >= 0.01D && ModConfig.ADD_MORE_SOUNDS.get()) {
|
||||
if (minecart.field_1645 % 34 == 1) {
|
||||
if (minecart.field_1645 % 33 == 1) {
|
||||
minecart.level.playSound(x, y, z, "minecart.base", volume, pitch);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -23,7 +23,8 @@
|
|||
"LivingEntityRendererMixin",
|
||||
"FishHookMixin",
|
||||
"TileRendererMixin",
|
||||
"LivingEntityMixin"
|
||||
"LivingEntityMixin",
|
||||
"FurnaceEntityMixin"
|
||||
],
|
||||
"injectors": {
|
||||
"defaultRequire": 1
|
||||
|
|
Loading…
Reference in New Issue