Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Updating "water_wooden_bucket" to "wooden_water_bucket" Part 2 #233

Open
wants to merge 12 commits into
base: 1.20
Choose a base branch
from
Original file line number Diff line number Diff line change
Expand Up @@ -30,15 +30,15 @@ public interface CauldronBehaviorMixin {

@Inject(at = @At("TAIL"), method = "registerBucketBehavior")
private static void registerWoodenBucketBehavior(Map<Item, CauldronBehavior> behavior, CallbackInfo ci) {
behavior.put(ItemCompendiumKt.getWATER_WOODEN_BUCKET(), (state, world, pos, player, hand, stack) ->
behavior.put(ItemCompendiumKt.getWOODEN_WATER_BUCKET(), (state, world, pos, player, hand, stack) ->
fillCauldronWithWoodenBucket(world, pos, player, hand, stack, Blocks.WATER_CAULDRON.getDefaultState().with(LeveledCauldronBlock.LEVEL, 3), SoundEvents.ITEM_BUCKET_EMPTY)
);
}

@Inject(at = @At("TAIL"), method = "registerBehavior")
private static void registerWoodenBucketBehavior(CallbackInfo ci) {
CauldronBehavior.WATER_CAULDRON_BEHAVIOR.put(ItemCompendiumKt.getWOODEN_BUCKET(), (state, world, pos, player, hand, stack) ->
CauldronBehavior.emptyCauldron(state, world, pos, player, hand, stack, new ItemStack(ItemCompendiumKt.getWATER_WOODEN_BUCKET()), (statex) -> statex.get(LeveledCauldronBlock.LEVEL) == 3, SoundEvents.ITEM_BUCKET_FILL)
CauldronBehavior.emptyCauldron(state, world, pos, player, hand, stack, new ItemStack(ItemCompendiumKt.getWOODEN_WATER_BUCKET()), (statex) -> statex.get(LeveledCauldronBlock.LEVEL) == 3, SoundEvents.ITEM_BUCKET_FILL)
);
}

Expand Down
6 changes: 3 additions & 3 deletions src/main/kotlin/io/github/lucaargolo/kibe/KibeMod.kt
Original file line number Diff line number Diff line change
Expand Up @@ -229,12 +229,12 @@ fun initExtras() {
}
}
FluidStorage.combinedItemApiProvider(WOODEN_BUCKET).register {
EmptyItemFluidStorage(it, WATER_WOODEN_BUCKET, Fluids.WATER, FluidConstants.BUCKET)
EmptyItemFluidStorage(it, WOODEN_WATER_BUCKET, Fluids.WATER, FluidConstants.BUCKET)
}
FluidStorage.GENERAL_COMBINED_PROVIDER.register { context ->
(context.itemVariant.item as? WoodenBucket)?.let { bucketItem ->
val bucketFluid = Fluids.WATER
if (bucketItem == WATER_WOODEN_BUCKET) {
if (bucketItem == WOODEN_WATER_BUCKET) {
return@register FullItemFluidStorage(context, WOODEN_BUCKET, FluidVariant.of(bucketFluid), FluidConstants.BUCKET)
}
}
Expand Down Expand Up @@ -317,4 +317,4 @@ fun initLootTables() {
supplier.pool(poolBuilder)
}
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -176,7 +176,7 @@ val TORCH_SLING = register(Identifier(MOD_ID, "torch_sling"), TorchSling(Settin
val ESCAPE_ROPE = register(Identifier(MOD_ID, "escape_rope"), EscapeRope(Settings().maxCount(1).rarity(Rarity.UNCOMMON)))

val WOODEN_BUCKET = register(Identifier(MOD_ID, "wooden_bucket"), WoodenBucket.Empty(Settings().maxCount(16)))
val WATER_WOODEN_BUCKET = register(Identifier(MOD_ID, "water_wooden_bucket"), WoodenBucket.Water(Settings().maxCount(1)))
val WOODEN_WATER_BUCKET = register(Identifier(MOD_ID, "wooden_water_bucket"), WoodenBucket.Water(Settings().maxCount(1)))

val GLIDER_LEFT_WING = register(Identifier(MOD_ID, "glider_left_wing"), Item(Settings()))
val GLIDER_RIGHT_WING = register(Identifier(MOD_ID, "glider_right_wing"), Item(Settings()))
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
package io.github.lucaargolo.kibe.items.miscellaneous

import io.github.lucaargolo.kibe.items.WATER_WOODEN_BUCKET
import io.github.lucaargolo.kibe.items.WOODEN_WATER_BUCKET
import io.github.lucaargolo.kibe.items.WOODEN_BUCKET
import net.minecraft.advancement.criterion.Criteria
import net.minecraft.block.FluidDrainable
Expand Down Expand Up @@ -47,9 +47,9 @@ open class WoodenBucket(val fluid: Fluid, settings: Settings): Item(settings) {
if (fluid.item == Fluids.WATER.bucketItem) {
user.incrementStat(Stats.USED.getOrCreateStat(this))
user.playSound(SoundEvents.ITEM_BUCKET_FILL, 1.0f, 1.0f)
val itemStack2 = ItemUsage.exchangeStack(itemStack, user, ItemStack(WATER_WOODEN_BUCKET))
val itemStack2 = ItemUsage.exchangeStack(itemStack, user, ItemStack(WOODEN_WATER_BUCKET))
if (!world.isClient) {
Criteria.FILLED_BUCKET.trigger(user as ServerPlayerEntity, ItemStack(WATER_WOODEN_BUCKET))
Criteria.FILLED_BUCKET.trigger(user as ServerPlayerEntity, ItemStack(WOODEN_WATER_BUCKET))
}
return TypedActionResult.success(itemStack2, world.isClient())
}else{
Expand Down Expand Up @@ -84,4 +84,4 @@ open class WoodenBucket(val fluid: Fluid, settings: Settings): Item(settings) {
class Empty(settings: Settings): WoodenBucket(Fluids.EMPTY, settings)
class Water(settings: Settings): WoodenBucket(Fluids.WATER, settings)

}
}
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ private fun appendItems(): List<ItemStack> {
LIGHT_GRAY_GLIDER, CYAN_GLIDER, BLUE_GLIDER, PURPLE_GLIDER, GREEN_GLIDER, BROWN_GLIDER, RED_GLIDER, BLACK_GLIDER,
WHITE_RUNE, ORANGE_RUNE, MAGENTA_RUNE, LIGHT_BLUE_RUNE, YELLOW_RUNE, LIME_RUNE, PINK_RUNE, GRAY_RUNE,
LIGHT_GRAY_RUNE, CYAN_RUNE, BLUE_RUNE, PURPLE_RUNE, GREEN_RUNE, BROWN_RUNE, RED_RUNE, BLACK_RUNE,
VOID_BUCKET, WOODEN_BUCKET, WATER_WOODEN_BUCKET, SLIME_BOOTS, SLIME_SLING, TORCH_SLING, ESCAPE_ROPE, COOLER, BIG_TORCH, HEATER, DEHUMIDIFIER, CHUNK_LOADER, STONE_SPIKES, IRON_SPIKES, GOLD_SPIKES, DIAMOND_SPIKES, MEASURING_TAPE,
VOID_BUCKET, WOODEN_BUCKET, WOODEN_WATER_BUCKET, SLIME_BOOTS, SLIME_SLING, TORCH_SLING, ESCAPE_ROPE, COOLER, BIG_TORCH, HEATER, DEHUMIDIFIER, CHUNK_LOADER, STONE_SPIKES, IRON_SPIKES, GOLD_SPIKES, DIAMOND_SPIKES, MEASURING_TAPE,
COBBLESTONE_GENERATOR_MK1, COBBLESTONE_GENERATOR_MK2, COBBLESTONE_GENERATOR_MK3, COBBLESTONE_GENERATOR_MK4, COBBLESTONE_GENERATOR_MK5,
BASALT_GENERATOR_MK1, BASALT_GENERATOR_MK2, BASALT_GENERATOR_MK3, BASALT_GENERATOR_MK4, BASALT_GENERATOR_MK5,
WHITE_SLEEPING_BAG, ORANGE_SLEEPING_BAG, MAGENTA_SLEEPING_BAG, LIGHT_BLUE_SLEEPING_BAG, YELLOW_SLEEPING_BAG, LIME_SLEEPING_BAG, PINK_SLEEPING_BAG, GRAY_SLEEPING_BAG,
Expand Down
4 changes: 2 additions & 2 deletions src/main/resources/assets/kibe/lang/en_us.json
Original file line number Diff line number Diff line change
Expand Up @@ -149,7 +149,7 @@
"item.kibe.black_glider": "Black Glider",

"item.kibe.wooden_bucket": "Wooden Bucket",
"item.kibe.water_wooden_bucket": "Water Wooden Bucket",
"item.kibe.wooden_water_bucket": "Wooden Water Bucket",
"item.kibe.void_bucket": "Void Bucket",

"block.kibe.liquid_xp": "Liquid Xp",
Expand Down Expand Up @@ -267,4 +267,4 @@
"screen.kibe.entangled_bag": "Entangled Bag",
"screen.kibe.pocket_trash_can": "Pocket Trash Can",
"screen.kibe.pocket_crafting_table": "Pocket Crafting Table"
}
}
4 changes: 2 additions & 2 deletions src/main/resources/assets/kibe/lang/fi_fi.json
Original file line number Diff line number Diff line change
Expand Up @@ -147,7 +147,7 @@
"item.kibe.black_glider": "Musta liidin",

"item.kibe.wooden_bucket": "Puinen ämpäri",
"item.kibe.water_wooden_bucket": "Puinen vesiämpäri",
"item.kibe.wooden_water_bucket": "Puinen vesiämpäri",
"item.kibe.void_bucket": "Tyhjiöämpäri",

"block.kibe.liquid_xp": "Nestemäinen XP",
Expand Down Expand Up @@ -250,4 +250,4 @@
"screen.kibe.entangled_bag": "Sotkeutunut säkki",
"screen.kibe.pocket_trash_can": "Taskuroskapönttö",
"screen.kibe.pocket_crafting_table": "Taskutyöpöytä"
}
}
4 changes: 2 additions & 2 deletions src/main/resources/assets/kibe/lang/pt_br.json
Original file line number Diff line number Diff line change
Expand Up @@ -101,7 +101,7 @@
"item.kibe.black_glider": "Planador Preto",

"item.kibe.wooden_bucket": "Balde de Madeira",
"item.kibe.water_wooden_bucket": "Balde de água de Madeira",
"item.kibe.wooden_water_bucket": "Balde de água de Madeira",
"item.kibe.void_bucket": "Balde do Vazio",

"block.kibe.liquid_xp": "Experiência Liquida",
Expand Down Expand Up @@ -170,4 +170,4 @@
"screen.kibe.entangled_bag": "Mochila Interconectada",
"screen.kibe.pocket_trash_can": "Lixeira Portátil",
"screen.kibe.pocket_crafting_table": "Bancada de Trabalho Portátil"
}
}
2 changes: 1 addition & 1 deletion src/main/resources/assets/kibe/lang/ru_ru.json
Original file line number Diff line number Diff line change
Expand Up @@ -147,7 +147,7 @@
"item.kibe.black_glider": "Черный дельтаплан",

"item.kibe.wooden_bucket": "Деревянное ведро",
"item.kibe.water_wooden_bucket": "Деревянное ведро воды",
"item.kibe.wooden_water_bucket": "Деревянное ведро воды",
"item.kibe.void_bucket": "Ведро пустоты",

"block.kibe.liquid_xp": "Жидкий опыт",
Expand Down
2 changes: 1 addition & 1 deletion src/main/resources/assets/kibe/lang/zh_cn.json
Original file line number Diff line number Diff line change
Expand Up @@ -147,7 +147,7 @@
"item.kibe.black_glider": "黑色滑翔翼",

"item.kibe.wooden_bucket": "木桶",
"item.kibe.water_wooden_bucket": "木制水桶",
"item.kibe.wooden_water_bucket": "木制水桶",
"item.kibe.void_bucket": "虚空桶",

"block.kibe.liquid_xp": "液态经验",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,4 +3,4 @@
"textures": {
"layer0": "kibe:item/water_wooden_bucket"
}
}
}