你好!感谢关注 PickMoreBlocks!
PickMoreBlocks 是一款面向客户端的 Fabric 模组,旨在修复我认为原版中鼠标中键点击功能存在的一些小缺陷,让创造模式与生存模式的体验 更加流畅!目前,它改变了掉落物方块、TNT、火焰、下界传送门以及液体的行为,未来还将加入更多内容!
快速上手
由于本模组使用了 BlockPickInteractionAware 和 EntityPickInteractionAware 接口以保持精简,你需要下载 Fabric API 才能使用它。安装完成后,只需将 Fabric API 和 PickMoreBlocks 一起拖入你的 mods 文件夹即可。
目前还没有配置菜单,因为我认为该模组的功能既不明显也不繁多,不值得你去禁用它们。不过,如果你是在服务器上游玩,建议联系服务器管理员确认他们不将此模组视为作弊工具。
功能列表
TNT 与受重力影响的方块
在原版中,像沙子这样受重力影响的方块只能在静止且以方块形态存在时才能通过中键拾取。PickMoreBlocks 修复了这一问题,使其同样适用于 fallingBlock(掉落物)实体!
为了方便起见,TNT 也采用了同样的修复方式。我想这对于那些使用 TNT 的技术型玩家来说非常有用——在当今时代,这个群体远比“零”要大得多!
水与熔岩
自本模组发布以来,我就一直想添加这个功能!如果你的准星瞄准液体但未选中其背后的方块,你将获得与该液体对应的桶——水是水桶,熔岩是岩浆桶。
火焰与传送门
在 PickMoreBlocks 中,中键点击火焰或传送门可以为你获取打火石。之所以实现得如此复杂,是因为打火石并非 Minecraft 中点燃火焰的唯一方式;如果游戏在你的物品栏中找不到打火石但 能 找到火药球,它将转而给你火药球!
如果你在创造模式物品栏中既没有打火石也没有火药球,你将获得一个完全修复的打火石。
想知道代码是如何工作的极客们,请点击这里!
public class CustomPickLogic {
public static ItemStack onPickFire(PlayerEntity player) {
for (int i = 0; i < player.getInventory().size(); i++) {
ItemStack getStackAtSlot = player.getInventory().getStack(i);
遍历玩家物品栏中的每一个槽位。
if (getStackAtSlot.isOf(Items.FLINT_AND_STEEL) || getStackAtSlot.isOf(Items.FIRE_CHARGE))
return getStackAtSlot;
如果该槽位包含打火石或(优先级较低的)火药球,则将其与主手槽位交换……
}
return new ItemStack(Items.FLINT_AND_STEEL);
……或者如果两者都找不到,尝试给玩家一个新的打火石(非创造模式下会失败)!
}
}
Hi there! Thank you for checking out PickMoreBlocks!
PickMoreBlocks is a client-side Fabric mod that attempts to fix what I believe to be small gaps in the vanilla middle mouse click functionality, making the creative and survival experience that little bit smoother! Currently, it affects the behaviour of falling blocks, TNT, fire, nether portals and liquids, with more to come in the future!
Getting Started
Due to the use of BlockPickInteractionAware and EntityPickInteractionAware interfaces to make this mod compact, you will need to download Fabric API in order to use it. Once you have, simply drag both the Fabric API and PickMoreBlocks into your mods folder.
There is no configuration menu at this stage, since I don't deem the features of this mod to be obvious nor plentiful enough for you to want to disable them. However, if you play on a server, consider contacting your server admin to make sure they don't consider this mod to be a cheat.
Feature List
TNT & Gravity-Affected Blocks
In vanilla, gravity-affected blocks like sand can only be pickblocked when they are stationary, in block form. PickMoreBlocks fixes this to work with fallingBlock entities too!
For the sake of inclusion, TNT has also been fixed in the same way. I'd imagine this is only really useful for technical players who work with TNT, a group far larger than 0 these days!
Water & Lava
Ever since this mod released, I have wanted to add this feature! If you're aiming your crosshair at a liquid without selecting a block behind it, you will be given the bucket that corresponds to the liquid--a water bucket for water, and a lava bucket for lava.
Fire & Portals
In PickMoreBlocks, Fire and portals can give you flint and steel when middle-mouse clicked. The reason why this is so complicated is because flint and steel is not the only way to start a fire in Minecraft, so if the game cannot find flint and steel in your inventory but it can find a fire charge, it will give that to you instead!
If you have neither flint and steel nor a fire charge in your creative mode inventory, you will be given a fully repaired flint and steel.
For the nerds who want to know how the code for this works, click here!
public class CustomPickLogic {
public static ItemStack onPickFire(PlayerEntity player) {
for (int i = 0; i < player.getInventory().size(); i++) {
ItemStack getStackAtSlot = player.getInventory().getStack(i);
Iteratively check every slot in the player's inventory.
if (getStackAtSlot.isOf(Items.FLINT_AND_STEEL) || getStackAtSlot.isOf(Items.FIRE_CHARGE))
return getStackAtSlot;
If the slot contains flint and steel or (at a lower priority) a fire charge, swap it with the mainhand slot...
}
return new ItemStack(Items.FLINT_AND_STEEL);
...or if neither can be found, try to give the player a new flint and steel (fails outside of creative mode)!
}
}
评论 0
登录后参与评分
还没有评论,来抢沙发吧