Rewrites the Vanilla luck application formula so that luck can be applied to items that do not have any quality defined. See: https://luckformula.emc.gs for data and details ----------- The rough summary is: My goal was that in a pool, when luck was applied, the pool rebalances so the percentages for bigger items is lowered and smaller items is boosted. Do this by boosting and then reducing the weight value, so that larger numbers are penalized more than smaller numbers. resulting in a larger reduction of entries for more common items than the reduction on small weights, giving smaller weights more of a chance ----------- This work kind of obsoletes quality, but quality would be useful for 2 items with same weight that you want luck to impact in varying directions. Fishing still falls into that as the weights are closer, so luck will invalidate junk more. This change will result in some major changes to fishing formulas. ----------- I would love to see this change in Vanilla, so Mojang please pull :)
118 lines
2.8 KiB
Bash
Executable file
118 lines
2.8 KiB
Bash
Executable file
#!/usr/bin/env bash
|
|
|
|
(
|
|
set -e
|
|
nms="net/minecraft/server"
|
|
export MODLOG=""
|
|
PS1="$"
|
|
basedir="$(cd "$1" && pwd -P)"
|
|
gitcmd="git -c commit.gpgsign=false"
|
|
|
|
workdir="$basedir/work"
|
|
minecraftversion=$(cat "$workdir/BuildData/info.json" | grep minecraftVersion | cut -d '"' -f 4)
|
|
decompiledir="$workdir/Minecraft/$minecraftversion"
|
|
|
|
export importedmcdev=""
|
|
function import {
|
|
export importedmcdev="$importedmcdev $1"
|
|
file="${1}.java"
|
|
target="$workdir/Spigot/Spigot-Server/src/main/java/$nms/$file"
|
|
base="$decompiledir/$nms/$file"
|
|
|
|
if [[ ! -f "$target" ]]; then
|
|
export MODLOG="$MODLOG Imported $file from mc-dev\n";
|
|
echo "Copying $base to $target"
|
|
cp "$base" "$target"
|
|
else
|
|
echo "UN-NEEDED IMPORT: $file"
|
|
fi
|
|
}
|
|
|
|
(
|
|
cd "$workdir/Spigot/Spigot-Server/"
|
|
lastlog=$($gitcmd log -1 --oneline)
|
|
if [[ "$lastlog" = *"mc-dev Imports"* ]]; then
|
|
$gitcmd reset --hard HEAD^
|
|
fi
|
|
)
|
|
|
|
import AxisAlignedBB
|
|
import BaseBlockPosition
|
|
import BiomeBase
|
|
import BiomeBigHills
|
|
import BiomeJungle
|
|
import BiomeMesa
|
|
import BlockBeacon
|
|
import BlockChest
|
|
import BlockFalling
|
|
import BlockFurnace
|
|
import BlockIceFrost
|
|
import BlockPosition
|
|
import BlockSnowBlock
|
|
import BlockStateEnum
|
|
import ChunkCache
|
|
import ChunkCoordIntPair
|
|
import ChunkProviderFlat
|
|
import ChunkProviderGenerate
|
|
import ChunkProviderHell
|
|
import CommandAbstract
|
|
import CommandScoreboard
|
|
import CommandWhitelist
|
|
import ControllerJump
|
|
import DataBits
|
|
import DataConverterMaterialId
|
|
import DataInspectorBlockEntity
|
|
import DataPalette
|
|
import DefinedStructure
|
|
import DragonControllerLandedFlame
|
|
import EnchantmentManager
|
|
import Enchantments
|
|
import EntityLlama
|
|
import EntitySquid
|
|
import EntityTypes
|
|
import EntityWaterAnimal
|
|
import EntityWitch
|
|
import EnumItemSlot
|
|
import EULA
|
|
import FileIOThread
|
|
import IHopper
|
|
import ItemBlock
|
|
import ItemFireworks
|
|
import ItemMonsterEgg
|
|
import LegacyPingHandler
|
|
import LotoSelectorEntry
|
|
import NavigationAbstract
|
|
import NBTTagCompound
|
|
import NBTTagList
|
|
import PacketPlayInUseEntity
|
|
import PacketPlayOutMapChunk
|
|
import PacketPlayOutPlayerListHeaderFooter
|
|
import PacketPlayOutScoreboardTeam
|
|
import PacketPlayOutTitle
|
|
import PacketPlayOutUpdateTime
|
|
import PathfinderAbstract
|
|
import PathfinderGoal
|
|
import PathfinderGoalFloat
|
|
import PathfinderGoalGotoTarget
|
|
import PathfinderWater
|
|
import PersistentScoreboard
|
|
import PersistentVillage
|
|
import PlayerConnectionUtils
|
|
import RegionFile
|
|
import RegistryBlockID
|
|
import RemoteControlListener
|
|
import ServerPing
|
|
import StructureBoundingBox
|
|
import StructurePiece
|
|
import StructureStart
|
|
import TileEntityEnderChest
|
|
import TileEntityLootable
|
|
import WorldGenStronghold
|
|
import WorldProvider
|
|
|
|
cd "$workdir/Spigot/Spigot-Server/"
|
|
rm -rf nms-patches applyPatches.sh makePatches.sh >/dev/null 2>&1
|
|
$gitcmd add . -A >/dev/null 2>&1
|
|
echo -e "mc-dev Imports\n\n$MODLOG" | $gitcmd commit . -F -
|
|
)
|