your current location:首页 > news>Washable minecraft

Washable minecraft

2024-12-15 02:18:24|Myriagame |source:minecraft skins

introduce

Simple laundry API allows items returned after the event definition items are thrown into the refining pot.

Based on 1.19.4, but theoretically, 1.19.x should be universal (the range may be wider).

The library has been integrated into Crafttech-API, so it is no longer maintained independently.

register

 // The most basic example of Washable.event.register (world, state, pos, stack)-> {// Check whether the water is in the water if (builtinregisteries.block.getKey (state.getBlock ()). Getpath (). Equals ("Water_caultron") {// The detection item is iron ore if (stack.getItem () == items.iron_ore) {//Block Return New itemstack (items.iron_block, stack.getCount ()); // The detection item is gold apple} else if (stack.getItem () == items.golden_apple) { // Reduce the amount of water Level.setBlock (POS, POS,State.SetValue (layeredCAuldronBlock.level, 0), State.GetValue (layeredCauldronBlock.Level)-1); // Replace it to the enchanting Golden Apple Return New Itemstack (items.enchant_golden_apple, stack. Attcount ());} // Check whether it is fine snow} else

if (builtInRegistries.block.getkey (state.getBlock ()). Getpath (). Equals ("POWDER_SNOW_CAULDRON" ")) {// The detection items are roasted potatoes if (ST ST acK.getItem () == items.baked_potato) {///Replace it to ordinary potato Return New itemstack (items.potato, stack.getCount ()); // Detecting items is the lower alloy ingot} else if (stack.getITEM () == iTems.nether ITE_INGOT) {// willIt is replaced with a lower alloy fragments Return New itemstack (items.netherite_scrap, stack.getCount ());} // Back to NULL if you do not need to change items.// If you need to disappear the item, return itemstack.empty.Return null;});

Minecraft images

The goal of MC Encyclopedia (MCMOD.CN) is to provide players with a better environment for MOD learning and research, and accept and cultivate more hardcore players.Provide Minecraft (Minecraft) MOD (module) item data introduction, tutorial strategy and MOD download, and is committed to improving the player's game experience.About the encyclopedia Encyclopedia help development log Donate Encyclopedia to follow the encyclopedia B station = "Fa Fa-Anagle-Right"> Opinions feedback Email © CopyRight Mc Encyclopedia 2013-2024 mcmod.cn |

Minecraft images

In addition to other statements, MCMOD.CN, all open public editing content uses the BY-NC-SA 3.0 protocol.

Minecraft images