这是一个调整类模组。它会对游戏内容进行微调,并且其功能也由玩家通过配置来定义。如果不进行任何配置,该模组将不会生效。
目前它提供了以下 n 种功能:
任意挤奶
这允许任何物品在与任何实体接触时转变为另一种物品。通常这会用于在整合包中为实体添加异质的“奶”类型,但也可用于其他用途。
mods.alfinivia.Milking.add(@NotNull IIngredient input, @NotNull IEntityDefinition entity, IItemStack output, boolean needsSneaking);
mods.alfinivia.Milking.add(@NotNull IIngredient input, @NotNull IEntityFunction entity, IItemStack output, boolean needsSneaking);
mods.alfinivia.Milking.add(@NotNull IIngredient input, @NotNull IEntityDefinition entity, IMilkFunction output, boolean needsSneaking);
mods.alfinivia.Milking.add(@NotNull IIngredient input, @NotNull IEntityFunction entity, IMilkFunction output, boolean needsSneaking);
例如 IEntityFunction:
function(entity){return true;}
例如 IMilkFunction:
function(entity, itemstack, player){return itemstack;}
示例
mods.alfinivia.Milking.add(<minecraft:fish>,<entity:minecraft:sheep>,<minecraft:sandstone>,false);
液体交互
这允许世界中的任意两种流体相互作用形成方块,前提是它们原本不会发生交互。
mods.alfinivia.LiquidInteraction.add(@NotNull IIngredient fluidA, @NotNull IIngredient fluidB, IItemStack output);
挖掘速度
这允许特定方块的挖掘速度基于多种不同因素而变化。可以通过静态设置、工具、属性或函数来实现。请注意,乘数是累加的,因此如果定义了属性和函数,两个乘数将依次应用。
var builder = mods.alfinivia.BreakSpeedBuilder.get(@NotNull className);
builder.setTool(IIngredient tools);
builder.addTool(IIngredient tools);
builder.addBlock(IItemStack block);
builder.addBlock(IBlockDefinition block, int meta);
builder.addBlocks(IItemStack[] blocks);
builder.setMultiplier(float multiplier); //固定乘数
builder.setAttribute(float defaultValue,float minValue,float maxValue); //这将请求创建一个名为 "break.[className]" 的属性,以影响挖掘速度
builder.setFunction(IBlockSpeedFunction function); //基于运行时值的精细控制(例如随距离出生点的距离缩放等)
builder.build(); //最后调用此方法
例如 IBlockSpeedFunction:
function(player,world,pos){return 1.0;}
示例
var builder = mods.alfinivia.BreakSpeedBuilder.get("stone");
builder.addBlock(<minecraft:stone>);
builder.setMultiplier(2.0);
builder.addTool(<minecraft:stone_pickaxe>);
builder.build();
伤害处理程序
这允许以某种方式修改特定实体从特定来源受到的伤害。
var builder = mods.alfinivia.DamageBuilder.get(@NotNull className);
builder.matchEntity(IEntityFunction entityMatch);
builder.matchSource(IEntityFunction sourceMatch);
builder.matchDamageSource(String damageSource);
builder.setFunction(IDamageFunction function);
builder.multiplyAttribute(float defaultValue, float minValue, float maxValue); //这将请求创建一个名为 "damage.[className]" 的属性,作为伤害的乘数
builder.addAttribute(float defaultValue, float minValue, float maxValue); //与上述相同,但属性的值会被相加而不是相乘。
builder.build(); //最后调用此方法
例如 IDamageFunction:
function(IEntityLivingBase entity, float amount){return 1.0 * amount;}
示例
var builder = mods.alfinivia.DamageBuilder.get("stone");
builder.matchEntity(IEntityFunction.getEntities([<entity:minecraft:sheep>,<entity:minecraft:wolf>]));
builder.matchDamageType("fire");
builder.setFunction(IDamageFunction.multiply(2.5));
builder.build();
迷雾世界
目前仅支持添加可堆肥物品并设置农作物的收获类型。
mods.alfinivia.MistyWorld.addCompostable(IItemStack stack)
mods.alfinivia.MistyWorld.addHarvestType(IBlockDefinition block, int min, int max) //min 和 max 必须在 1 到 3 之间,这会影响生长特定植物所需的土壤透水率(孔隙度)。
//1 - 粘土土壤(花卉、沼泽植物、谷物)
//2 - 森林和热带土壤(蔬菜)
//3 - 沙质和石质土壤(块茎)
mods.alfinivia.MistyWorld.addHarvestType(String block, int min, int max)
沉浸工程
支持从花园温室中移除和添加肥料,向化学喷雾器中添加流体,向Railgun中添加弹杆,以及最后但同样重要的是,左轮手枪/炮塔子弹的构建系统。
mods.alfinivia.ImmersiveEngineering.addChemthrowerEffect(ILiquidStack liquid, boolean isGas, boolean isFlammable, String source, float damage)
mods.alfinivia.ImmersiveEngineering.addChemthrowerEffect(ILiquidStack liquid, boolean isGas, boolean isFlammable, String source, float damage, IPotionEffect[] effects)
mods.alfinivia.ImmersiveEngineering.addChemthrowerEffect(ILiquidStack liquid, boolean isGas, boolean isFlammable, IChemEntityEffect entityEffect, IChemBlockEffect blockEffect)
mods.alfinivia.ImmersiveEngineering.addRailgunBullet(IIngredient item, float damage, float gravity, int[][] colorMap)
mods.alfinivia.ImmersiveEngineering.addRailgunBullet(IIngredient item, float damage, float gravity, IRailgunImpact effect, int[][] colorMap)
mods.alfinivia.ImmersiveEngineering.addLiquidFertilizer(ILiquidStack liquid, float multiplier)
mods.alfinivia.ImmersiveEngineering.addLiquidFertilizer(ILiquidStack liquid, IFluidFertilizerMultiplier multiplier)
mods.alfinivia.ImmersiveEngineering.removeLiquidFertilizer(ILiquidStack liquid)
mods.alfinivia.ImmersiveEngineering.addItemFertilizer(IIngredient item, float multiplier)
mods.alfinivia.ImmersiveEngineering.addItemFertilizer(IIngredient item, IItemFertilizerMultiplier multiplier)
mods.alfinivia.ImmersiveEngineering.removeItemFertilizer(IItemStack item)
例如,针对 IChemBlockEffect:
function(world,pos,side,shooter,throwerstack,fluid){}
例如,针对 IChemEntityEffect:
function(target,shooter,throwerstack,fluid){}
例如,针对 IRailgunImpact:
function(target,shoot){return false;} //在此处返回 true 将跳过其常规伤害
例如,针对 IFluidFertilizerMultiplier:
function(fertilizer,seed,soil){return 1.0;} //fertilizer 是一个 ILiquidStack
例如,针对 IItemFertilizerMultiplier:
function(fertilizer,seed,soil){return 1.0;} //fertilizer 是一个 IItemStack
待办:子弹构建器的文档
This is a tweak mod. It tweaks things, and is tweaked by people. Without any configuration this mod does nothing.
There are currently n things it offers:
Arbitrary Milking
This allows any item to turn into another item on contact with any entity. Normally this would be used to add exotic milktypes for entities in modpacks but can be used for other purposes.
mods.alfinivia.Milking.add(@NotNull IIngredient input, @NotNull IEntityDefinition entity, IItemStack output, boolean needsSneaking);
mods.alfinivia.Milking.add(@NotNull IIngredient input, @NotNull IEntityFunction entity, IItemStack output, boolean needsSneaking);
mods.alfinivia.Milking.add(@NotNull IIngredient input, @NotNull IEntityDefinition entity, IMilkFunction output, boolean needsSneaking);
mods.alfinivia.Milking.add(@NotNull IIngredient input, @NotNull IEntityFunction entity, IMilkFunction output, boolean needsSneaking);
ex. for IEntityFunction:
function(entity){return true;}
ex. for IMilkFunction:
function(entity, itemstack, player){return itemstack;}
ex.
mods.alfinivia.Milking.add(<minecraft:fish>,<entity:minecraft:sheep>,<minecraft:sandstone>,false);
Liquid Interactions
This allows any two fluids to interact in world to form a block, assuming they wouldn't already interact.
mods.alfinivia.LiquidInteraction.add(@NotNull IIngredient fluidA, @NotNull IIngredient fluidB, IItemStack output);
Breakspeed
This allows breakspeed of certain blocks to vary based on several different factors. This can be done static, by tool, by attribute or by function. Note that multipliers are cumulative, so if there's an attribute and a function defined, both multipliers apply consecutively.
var builder = mods.alfinivia.BreakSpeedBuilder.get(@NotNull className);
builder.setTool(IIngredient tools);
builder.addTool(IIngredient tools);
builder.addBlock(IItemStack block);
builder.addBlock(IBlockDefinition block, int meta);
builder.addBlocks(IItemStack[] blocks);
builder.setMultiplier(float multiplier); //Flat multiplier
builder.setAttribute(float defaultValue,float minValue,float maxValue); //This will request an attribute to be created with name "break.[className]" that affects the breakspeed
builder.setFunction(IBlockSpeedFunction function); //Fine control based on values at runtime (ex. scales with distance from spawn or similar)
builder.build(); //Call this last
ex. for IBlockSpeedFunction:
function(player,world,pos){return 1.0;}
ex.
var builder = mods.alfinivia.BreakSpeedBuilder.get("stone");
builder.addBlock(<minecraft:stone>);
builder.setMultiplier(2.0);
builder.addTool(<minecraft:stone_pickaxe>);
builder.build();
Damage Handlers
This allows specific entities to have the damage they take from specific sources modified in some way.
var builder = mods.alfinivia.DamageBuilder.get(@NotNull className);
builder.matchEntity(IEntityFunction entityMatch);
builder.matchSource(IEntityFunction sourceMatch);
builder.matchDamageSource(String damageSource);
builder.setFunction(IDamageFunction function);
builder.multiplyAttribute(float defaultValue, float minValue, float maxValue); //This will request an attribute to be created with name "damage.[className]" that functions as the multiplier for the damage
builder.addAttribute(float defaultValue, float minValue, float maxValue); //Same as above but the value of the attribute is added instead.
builder.build(); //Call this last
ex. for IDamageFunction:
function(IEntityLivingBase entity, float amount){return 1.0 * amount;}
ex.
var builder = mods.alfinivia.DamageBuilder.get("stone");
builder.matchEntity(IEntityFunction.getEntities([<entity:minecraft:sheep>,<entity:minecraft:wolf>]));
builder.matchDamageType("fire");
builder.setFunction(IDamageFunction.multiply(2.5));
builder.build();
Misty World
There's currently only the ability to add compostable items and set the harvest type for crops.
mods.alfinivia.MistyWorld.addCompostable(IItemStack stack)
mods.alfinivia.MistyWorld.addHarvestType(IBlockDefinition block, int min, int max) //min and max must be between 1 and 3, this affects how much water permeability (porosity) of the soil is needed to grow specific plants.
//1 - clay soil (flowering, marsh plants, cereals)
//2 - forest and tropical soils (vegetables)
//3 - sandy and stony soils (tubers)
mods.alfinivia.MistyWorld.addHarvestType(String block, int min, int max)
Immersive Engineering
There is support for removing and adding fertilizers to the garden cloche, adding fluids to the chemsprayer, adding rods to the railgun and last but not least, a builder system for revolver/turret bullets.
mods.alfinivia.ImmersiveEngineering.addChemthrowerEffect(ILiquidStack liquid, boolean isGas, boolean isFlammable, String source, float damage)
mods.alfinivia.ImmersiveEngineering.addChemthrowerEffect(ILiquidStack liquid, boolean isGas, boolean isFlammable, String source, float damage, IPotionEffect[] effects)
mods.alfinivia.ImmersiveEngineering.addChemthrowerEffect(ILiquidStack liquid, boolean isGas, boolean isFlammable, IChemEntityEffect entityEffect, IChemBlockEffect blockEffect)
mods.alfinivia.ImmersiveEngineering.addRailgunBullet(IIngredient item, float damage, float gravity, int[][] colorMap)
mods.alfinivia.ImmersiveEngineering.addRailgunBullet(IIngredient item, float damage, float gravity, IRailgunImpact effect, int[][] colorMap)
mods.alfinivia.ImmersiveEngineering.addLiquidFertilizer(ILiquidStack liquid, float multiplier)
mods.alfinivia.ImmersiveEngineering.addLiquidFertilizer(ILiquidStack liquid, IFluidFertilizerMultiplier multiplier)
mods.alfinivia.ImmersiveEngineering.removeLiquidFertilizer(ILiquidStack liquid)
mods.alfinivia.ImmersiveEngineering.addItemFertilizer(IIngredient item, float multiplier)
mods.alfinivia.ImmersiveEngineering.addItemFertilizer(IIngredient item, IItemFertilizerMultiplier multiplier)
mods.alfinivia.ImmersiveEngineering.removeItemFertilizer(IItemStack item)
ex. for IChemBlockEffect
function(world,pos,side,shooter,throwerstack,fluid){}
ex. for IChemEntityEffect
function(target,shooter,throwerstack,fluid){}
ex. for IRailgunImpact
function(target,shoot){return false;} //returning true here foregoes the regular damage it would do
ex. for IFluidFertilizerMultiplier
function(fertilizer,seed,soil){return 1.0;} //fertilizer is an ILiquidStack
ex. for IItemFertilizerMultiplier
function(fertilizer,seed,soil){return 1.0;} //fertilizer is an IItemStack
todo: docs for the bullet builder
评论 0
登录后参与评分
还没有评论,来抢沙发吧