diff --git a/README.md b/README.md index 0e31adf..89256be 100644 --- a/README.md +++ b/README.md @@ -20,23 +20,25 @@ Extension Mod for [gnembon's fabric-carpet](https://github.com/gnembon/fabric-ca - [`SURVIVAL`](markdown/SURVIVAL_Category.md) ## Index -Count: 56 +Count: 64 - [anvilledBlueIce](#anvilledblueice) - [anvilledIce](#anvilledice) - [anvilledPackedIce](#anvilledpackedice) -- [cactusFurnaceXP](#cactusfurnacexp) +- [cactusFurnaceXp](#cactusfurnacexp) +- [campSleeping](#campsleeping) - [concreteConvertOnCauldron](#concreteconvertoncauldron) - [craftableCobwebs](#craftablecobwebs) - [craftableHorseArmor](#craftablehorsearmor) - [craftableNameTags](#craftablenametags) - [craftableNotchApple](#craftablenotchapple) -- [dragonDropsElytra](#dragondropselytra) +- [dragonDrops](#dragondrops) - [dragonEggConvertsCobbleToEndstone](#dragoneggconvertscobbletoendstone) +- [dragonXpDrop](#dragonxpdrop) +- [easyBlueIceCrafting](#easyblueicecrafting) - [easyBoneBlockCrafting](#easyboneblockcrafting) - [easyChestCrafting](#easychestcrafting) - [easyDispenserCrafting](#easydispensercrafting) - [easyHarvesting](#easyharvesting) -- [easyHarvestingRequireHoe](#easyharvestingrequirehoe) - [easyMinecartsCrafting](#easyminecartscrafting) - [easyRepeaterCrafting](#easyrepeatercrafting) - [easyStickCrafting](#easystickcrafting) @@ -45,13 +47,17 @@ Count: 56 - [edibleMagmaCream](#ediblemagmacream) - [edibleNetheriteScraps](#ediblenetheritescraps) - [edibleSlimeBalls](#edibleslimeballs) +- [eggWaterDrag](#eggwaterdrag) - [enderPearlDamage](#enderpearldamage) +- [enderPearlWaterDrag](#enderpearlwaterdrag) - [foodInstantHeal](#foodinstantheal) - [honeyCombStickiness](#honeycombstickiness) - [infinityNeedsArrow](#infinityneedsarrow) +- [kelpBlockHardness](#kelpblockhardness) - [lilyPadsOnCauldron](#lilypadsoncauldron) - [longerRepeaters](#longerrepeaters) - [moreBarkCrafting](#morebarkcrafting) +- [moreFortressSpawningBlocks](#morefortressspawningblocks) - [newShulkerBehavior](#newshulkerbehavior) - [noCreeperGriefing](#nocreepergriefing) - [noEndermanGriefing](#noendermangriefing) @@ -67,6 +73,8 @@ Count: 56 - [silkTouchFarmland](#silktouchfarmland) - [silkTouchPathBlocks](#silktouchpathblocks) - [silkTouchSpawners](#silktouchspawners) +- [slimeChunkPercentage](#slimechunkpercentage) +- [snowballWaterDrag](#snowballwaterdrag) - [stonecutterDamage](#stonecutterdamage) - [strictShulkerShells](#strictshulkershells) - [universalDyeing](#universaldyeing) @@ -110,7 +118,7 @@ Custom amount of ice crushed by falling anvils make one packed ice. - You must choose a value from 0 to 32 - From [QuickCarpet](https://github.com/DeadlyMC/QuickCarpet114) -### cactusFurnaceXP +### cactusFurnaceXp Amount of XP a Cactus smelted in a furnace gives 1 XP per Cactus seems to be a bug, as in Bedrock Edition it's only 0.2, which fits more in line with other items - Type: `double` @@ -120,6 +128,13 @@ Amount of XP a Cactus smelted in a furnace gives - Additional notes: - You must choose a value from 0 to 1 +### campSleeping +Allows players to sleep in a Bed without setting their spawn point by entering while sneaking +- Type: `boolean` +- Default value: `false` +- Required options: `true`, `false` +- Categories: `EXPERIMENTAL`, `FEATURE`, `RUG`, `SURVIVAL` + ### concreteConvertOnCauldron Concrete powder converts to concrete blocks when on top of a filled cauldron - Type: `boolean` @@ -128,11 +143,11 @@ Concrete powder converts to concrete blocks when on top of a filled cauldron - Categories: `FEATURE`, `RUG` ### craftableCobwebs -Cobwebs can be crafted out of 5 Strings in a cross pattern +Cobwebs can be crafted with 5 Strings in a cross pattern or with a 3x3 full area Expect a lag spike when changing the value -- Type: `boolean` -- Default value: `false` -- Required options: `true`, `false` +- Type: `String` +- Default value: `off` +- Required options: `off`, `cross`, `full` - Categories: `CRAFTING`, `RUG`, `SURVIVAL` ### craftableHorseArmor @@ -144,11 +159,11 @@ Expect a lag spike when changing the value - Categories: `CRAFTING`, `RUG`, `SURVIVAL` ### craftableNameTags -Name Tags can be crafted with Paper and Iron +Name Tags can be crafted with Paper and Iron or String or both Expect a lag spike when changing the value -- Type: `boolean` -- Default value: `false` -- Required options: `true`, `false` +- Type: `String` +- Default value: `off` +- Required options: `off`, `with_iron`, `with_string`, `with_both` - Categories: `CRAFTING`, `RUG`, `SURVIVAL` ### craftableNotchApple @@ -159,11 +174,11 @@ Expect a lag spike when changing the value - Required options: `true`, `false` - Categories: `CRAFTING`, `RUG`, `SURVIVAL` -### dragonDropsElytra +### dragonDrops Ender Dragon drops an Elytra when killed -- Type: `boolean` -- Default value: `false` -- Required options: `true`, `false` +- Type: `String` +- Default value: `none` +- Required options: `none`, `dragon_egg`, `elytra`, `both` - Categories: `FEATURE`, `RUG`, `SURVIVAL` - Additional notes: - Idea from [VanillaTweaks](https://vanillatweaks.net/picker/datapacks/) @@ -175,6 +190,24 @@ Dragon Eggs will convert Cobble under them to Endstone either on set event - Required options: `off`, `on_teleport`, `on_landing`, `both` - Categories: `EXPERIMENTAL`, `FEATURE`, `RUG` +### dragonXpDrop +Amount of XP dropped by later Dragons. The first Dragon always drops 12000 +- Type: `int` +- Default value: `500` +- Suggested options: `500`, `1200`, `12000` +- Categories: `CLIENT`, `EXPERIMENTAL`, `RUG` +- Additional notes: + - You must choose a value from 0 to 12000 + - [Idea from Neubulae](https://github.com/gnembon/carpet-extra/issues/171) + +### easyBlueIceCrafting +Blue Ice can be crafted from Ice and Blue Dye +Expect a lag spike when changing the value +- Type: `boolean` +- Default value: `false` +- Required options: `true`, `false` +- Categories: `CRAFTING`, `RUG`, `SURVIVAL` + ### easyBoneBlockCrafting Bone Blocks can be crafted out of Bones Expect a lag spike when changing the value @@ -204,17 +237,9 @@ Expect a lag spike when changing the value ### easyHarvesting Right clicking on fully grown crops harvests and immediately replants it Works on: Wheat, Potatoes, Carrots, Beetroots, Nether Warts and Cocoa Beans -- Type: `boolean` -- Default value: `false` -- Required options: `true`, `false` -- Categories: `EXPERIMENTAL`, `FEATURE`, `RUG`, `SURVIVAL` - -### easyHarvestingRequireHoe -The easyHarvesting feature requires the player to hold a hoe in his main hand -Requires easyHarvesting to be enabled -- Type: `boolean` -- Default value: `true` -- Required options: `true`, `false` +- Type: `String` +- Default value: `off` +- Required options: `off`, `normal`, `require_hoe` - Categories: `EXPERIMENTAL`, `FEATURE`, `RUG`, `SURVIVAL` ### easyMinecartsCrafting @@ -281,6 +306,16 @@ Works server side only, but eating animation is only rendered if the mod is on t - Required options: `true`, `false` - Categories: `CLIENT`, `EXPERIMENTAL`, `FEATURE`, `RUG`, `SURVIVAL` +### eggWaterDrag +How fast thrown Eggs can travel under water. 0.99 is the default for above water and for Tridents +Thrown Egg will stutter on client when mod is only on server +- Type: `double` +- Default value: `0.8` +- Suggested options: `0.8`, `0.9`, `0.99` +- Categories: `CLIENT`, `EXPERIMENTAL`, `RUG` +- Additional notes: + - You must choose a value from 0.5 to 0.99 + ### enderPearlDamage Amount of damage dealt by Ender Pearls - Type: `int` @@ -290,6 +325,16 @@ Amount of damage dealt by Ender Pearls - Additional notes: - You must choose a value from 0 to 10 +### enderPearlWaterDrag +How fast thrown Ender Pearls can travel under water. 0.99 is the default for above water and for Tridents +Thrown Pearl will stutter on client when mod is only on server +- Type: `double` +- Default value: `0.8` +- Suggested options: `0.8`, `0.9`, `0.99` +- Categories: `CLIENT`, `EXPERIMENTAL`, `RUG` +- Additional notes: + - You must choose a value from 0.5 to 0.99 + ### foodInstantHeal Food heals hearts not hunger like in the first MC versions and naturalRegeneration is off Recommended using with peacefulHunger @@ -308,7 +353,7 @@ Will render Ghost Blocks on the Client when mod is only Server Side - Required options: `both`, `honey`, `slime`, `none` - Categories: `CLIENT`, `EXPERIMENTAL`, `FEATURE`, `RUG` - Additional notes: - - Suggestion by DragonEggBedrockBreaking#0034 + - [Idea from DragonEggBedrockBreaking#0034](https://discord.com/channels/211786369951989762/573613501164159016/816793720011358208) on the [SciCraft Discord](https://discord.gg/scicraft) ### infinityNeedsArrow A Bow enchanted with Infinity needs the player to have an arrow in his inventory @@ -317,6 +362,16 @@ A Bow enchanted with Infinity needs the player to have an arrow in his inventory - Required options: `true`, `false` - Categories: `BUGFIX`, `EXPERIMENTAL`, `RUG`, `SURVIVAL` +### kelpBlockHardness +How long Kelp Blocks take to mine in survival +Any value other than 0 will behave like 0.5 for clients without this mod +- Type: `double` +- Default value: `0.5` +- Suggested options: `0`, `0.25`, `0.5` +- Categories: `CLIENT`, `EXPERIMENTAL`, `RUG`, `SURVIVAL` +- Additional notes: + - You must choose a value from 0 to 0.5 + ### lilyPadsOnCauldron Lily Pads can be placed on Cauldrons - Type: `boolean` @@ -339,6 +394,16 @@ Expect a lag spike when changing the value - Required options: `true`, `false` - Categories: `CRAFTING`, `RUG`, `SURVIVAL` +### moreFortressSpawningBlocks +What blocks Fortress mobs can spawn on inside the bigger Bounding Box +o +- Type: `String` +- Default value: `off` +- Required options: `off`, `more`, `all` +- Categories: `EXPERIMENTAL`, `FEATURE`, `RUG` +- Additional notes: + - [Idea from DragonEggBedrockBreaking](https://github.com/gnembon/carpet-extra/issues/182) + ### newShulkerBehavior Makes shulkers behave like in the current 1.17 snapshots Shulkers hit by a shulker bullet have a chance to spawn a new shulker and teleport @@ -385,10 +450,10 @@ Players do not lose any hunger like in peaceful mode - Suggestion by [real_zockerhopper](https://www.curseforge.com/members/real_zockerhopper) ### playerHeadDrops -Players drop their head when killed by a player -- Type: `boolean` -- Default value: `false` -- Required options: `true`, `false` +Players drop their head +- Type: `String` +- Default value: `off` +- Required options: `off`, `on_death`, `on_killed_by_player` - Categories: `FEATURE`, `RUG`, `SURVIVAL` - Additional notes: - Idea from [VanillaTweaks](https://vanillatweaks.net/picker/datapacks/) @@ -462,6 +527,26 @@ Mining Spawners with a Silk Touch tool will drop itself - Required options: `true`, `false` - Categories: `EXPERIMENTAL`, `FEATURE`, `RUG`, `SURVIVAL` +### slimeChunkPercentage +The percentage of chunks that are Slime chinks +- Type: `int` +- Default value: `10` +- Suggested options: `0`, `10`, `50`, `100` +- Categories: `EXPERIMENTAL`, `RUG` +- Additional notes: + - You must choose a value from 0 to 100 that is a multiple of 10 + - [Idea from Philipp766](https://github.com/gnembon/carpet-extra/issues/161) + +### snowballWaterDrag +How fast thrown Snowballs can travel under water. 0.99 is the default for above water and for Tridents +Thrown Snowball will stutter on client when mod is only on server +- Type: `double` +- Default value: `0.8` +- Suggested options: `0.8`, `0.9`, `0.99` +- Categories: `CLIENT`, `EXPERIMENTAL`, `RUG` +- Additional notes: + - You must choose a value from 0.5 to 0.99 + ### stonecutterDamage How much damage Stonecutters deal when stepping on them - Type: `int` diff --git a/gradle.properties b/gradle.properties index 506e44b..9f09807 100644 --- a/gradle.properties +++ b/gradle.properties @@ -10,7 +10,7 @@ org.gradle.jvmargs=-Xmx2G carpet_core_version=1.4.23+v210115 # Mod Properties - mod_version = 1.1.1 + mod_version = 1.1.2 maven_group = com.rubixdev.rug archives_base_name = fabric-rug diff --git a/markdown/BUGFIX_Category.md b/markdown/BUGFIX_Category.md index 1d5c26d..5c2c467 100644 --- a/markdown/BUGFIX_Category.md +++ b/markdown/BUGFIX_Category.md @@ -3,13 +3,13 @@ For a list of all implemented Rules go [here](../README.md) ## Index Count: 3 -- [cactusFurnaceXP](#cactusfurnacexp) +- [cactusFurnaceXp](#cactusfurnacexp) - [infinityNeedsArrow](#infinityneedsarrow) - [stonecutterDamage](#stonecutterdamage) ## Rules in BUGFIX Category -### cactusFurnaceXP +### cactusFurnaceXp Amount of XP a Cactus smelted in a furnace gives 1 XP per Cactus seems to be a bug, as in Bedrock Edition it's only 0.2, which fits more in line with other items - Type: `double` diff --git a/markdown/CLIENT_Category.md b/markdown/CLIENT_Category.md index 609d6b0..d248088 100644 --- a/markdown/CLIENT_Category.md +++ b/markdown/CLIENT_Category.md @@ -2,16 +2,31 @@ For a list of all implemented Rules go [here](../README.md) ## Index -Count: 6 +Count: 11 +- [dragonXpDrop](#dragonxpdrop) - [edibleGoldIngots](#ediblegoldingots) - [edibleMagmaCream](#ediblemagmacream) - [edibleNetheriteScraps](#ediblenetheritescraps) - [edibleSlimeBalls](#edibleslimeballs) +- [eggWaterDrag](#eggwaterdrag) +- [enderPearlWaterDrag](#enderpearlwaterdrag) - [honeyCombStickiness](#honeycombstickiness) +- [kelpBlockHardness](#kelpblockhardness) - [reachDistance](#reachdistance) +- [snowballWaterDrag](#snowballwaterdrag) ## Rules in CLIENT Category +### dragonXpDrop +Amount of XP dropped by later Dragons. The first Dragon always drops 12000 +- Type: `int` +- Default value: `500` +- Suggested options: `500`, `1200`, `12000` +- Categories: `CLIENT`, `EXPERIMENTAL`, `RUG` +- Additional notes: + - You must choose a value from 0 to 12000 + - [Idea from Neubulae](https://github.com/gnembon/carpet-extra/issues/171) + ### edibleGoldIngots Butter is finally edible. Keep in mind 250g of pure butter are not that healthy Works server side only, but eating animation is only rendered if the mod is on the client too @@ -44,6 +59,26 @@ Works server side only, but eating animation is only rendered if the mod is on t - Required options: `true`, `false` - Categories: `CLIENT`, `EXPERIMENTAL`, `FEATURE`, `RUG`, `SURVIVAL` +### eggWaterDrag +How fast thrown Eggs can travel under water. 0.99 is the default for above water and for Tridents +Thrown Egg will stutter on client when mod is only on server +- Type: `double` +- Default value: `0.8` +- Suggested options: `0.8`, `0.9`, `0.99` +- Categories: `CLIENT`, `EXPERIMENTAL`, `RUG` +- Additional notes: + - You must choose a value from 0.5 to 0.99 + +### enderPearlWaterDrag +How fast thrown Ender Pearls can travel under water. 0.99 is the default for above water and for Tridents +Thrown Pearl will stutter on client when mod is only on server +- Type: `double` +- Default value: `0.8` +- Suggested options: `0.8`, `0.9`, `0.99` +- Categories: `CLIENT`, `EXPERIMENTAL`, `RUG` +- Additional notes: + - You must choose a value from 0.5 to 0.99 + ### honeyCombStickiness Honey Comb only sticks to selected Blocks Will render Ghost Blocks on the Client when mod is only Server Side @@ -52,7 +87,17 @@ Will render Ghost Blocks on the Client when mod is only Server Side - Required options: `both`, `honey`, `slime`, `none` - Categories: `CLIENT`, `EXPERIMENTAL`, `FEATURE`, `RUG` - Additional notes: - - Suggestion by DragonEggBedrockBreaking#0034 + - [Idea from DragonEggBedrockBreaking#0034](https://discord.com/channels/211786369951989762/573613501164159016/816793720011358208) on the [SciCraft Discord](https://discord.gg/scicraft) + +### kelpBlockHardness +How long Kelp Blocks take to mine in survival +Any value other than 0 will behave like 0.5 for clients without this mod +- Type: `double` +- Default value: `0.5` +- Suggested options: `0`, `0.25`, `0.5` +- Categories: `CLIENT`, `EXPERIMENTAL`, `RUG`, `SURVIVAL` +- Additional notes: + - You must choose a value from 0 to 0.5 ### reachDistance Reach in which you can place and break blocks. Value will be 0.5 higher in creative @@ -63,3 +108,13 @@ Mod needed on server and client for this feature to work - Categories: `CLIENT`, `CREATIVE`, `EXPERIMENTAL`, `RUG` - Additional notes: - You must choose a value from 0 to 100 + +### snowballWaterDrag +How fast thrown Snowballs can travel under water. 0.99 is the default for above water and for Tridents +Thrown Snowball will stutter on client when mod is only on server +- Type: `double` +- Default value: `0.8` +- Suggested options: `0.8`, `0.9`, `0.99` +- Categories: `CLIENT`, `EXPERIMENTAL`, `RUG` +- Additional notes: + - You must choose a value from 0.5 to 0.99 diff --git a/markdown/CRAFTING_Category.md b/markdown/CRAFTING_Category.md index c0c5f39..6555472 100644 --- a/markdown/CRAFTING_Category.md +++ b/markdown/CRAFTING_Category.md @@ -2,11 +2,12 @@ For a list of all implemented Rules go [here](../README.md) ## Index -Count: 20 +Count: 21 - [craftableCobwebs](#craftablecobwebs) - [craftableHorseArmor](#craftablehorsearmor) - [craftableNameTags](#craftablenametags) - [craftableNotchApple](#craftablenotchapple) +- [easyBlueIceCrafting](#easyblueicecrafting) - [easyBoneBlockCrafting](#easyboneblockcrafting) - [easyChestCrafting](#easychestcrafting) - [easyDispenserCrafting](#easydispensercrafting) @@ -27,11 +28,11 @@ Count: 20 ## Rules in CRAFTING Category ### craftableCobwebs -Cobwebs can be crafted out of 5 Strings in a cross pattern +Cobwebs can be crafted with 5 Strings in a cross pattern or with a 3x3 full area Expect a lag spike when changing the value -- Type: `boolean` -- Default value: `false` -- Required options: `true`, `false` +- Type: `String` +- Default value: `off` +- Required options: `off`, `cross`, `full` - Categories: `CRAFTING`, `RUG`, `SURVIVAL` ### craftableHorseArmor @@ -43,15 +44,23 @@ Expect a lag spike when changing the value - Categories: `CRAFTING`, `RUG`, `SURVIVAL` ### craftableNameTags -Name Tags can be crafted with Paper and Iron +Name Tags can be crafted with Paper and Iron or String or both +Expect a lag spike when changing the value +- Type: `String` +- Default value: `off` +- Required options: `off`, `with_iron`, `with_string`, `with_both` +- Categories: `CRAFTING`, `RUG`, `SURVIVAL` + +### craftableNotchApple +Enchanted Golden Apples can be crafted with 8 Gold Blocks again Expect a lag spike when changing the value - Type: `boolean` - Default value: `false` - Required options: `true`, `false` - Categories: `CRAFTING`, `RUG`, `SURVIVAL` -### craftableNotchApple -Enchanted Golden Apples can be crafted with 8 Gold Blocks again +### easyBlueIceCrafting +Blue Ice can be crafted from Ice and Blue Dye Expect a lag spike when changing the value - Type: `boolean` - Default value: `false` diff --git a/markdown/EXPERIMENTAL_Category.md b/markdown/EXPERIMENTAL_Category.md index 3a2162b..4060b68 100644 --- a/markdown/EXPERIMENTAL_Category.md +++ b/markdown/EXPERIMENTAL_Category.md @@ -2,27 +2,34 @@ For a list of all implemented Rules go [here](../README.md) ## Index -Count: 21 +Count: 28 - [anvilledBlueIce](#anvilledblueice) - [anvilledIce](#anvilledice) - [anvilledPackedIce](#anvilledpackedice) +- [campSleeping](#campsleeping) - [dragonEggConvertsCobbleToEndstone](#dragoneggconvertscobbletoendstone) +- [dragonXpDrop](#dragonxpdrop) - [easyHarvesting](#easyharvesting) -- [easyHarvestingRequireHoe](#easyharvestingrequirehoe) - [edibleGoldIngots](#ediblegoldingots) - [edibleMagmaCream](#ediblemagmacream) - [edibleNetheriteScraps](#ediblenetheritescraps) - [edibleSlimeBalls](#edibleslimeballs) +- [eggWaterDrag](#eggwaterdrag) +- [enderPearlWaterDrag](#enderpearlwaterdrag) - [foodInstantHeal](#foodinstantheal) - [honeyCombStickiness](#honeycombstickiness) - [infinityNeedsArrow](#infinityneedsarrow) +- [kelpBlockHardness](#kelpblockhardness) - [longerRepeaters](#longerrepeaters) +- [moreFortressSpawningBlocks](#morefortressspawningblocks) - [newShulkerBehavior](#newshulkerbehavior) - [peacefulHunger](#peacefulhunger) - [reachDistance](#reachdistance) - [silkTouchFarmland](#silktouchfarmland) - [silkTouchPathBlocks](#silktouchpathblocks) - [silkTouchSpawners](#silktouchspawners) +- [slimeChunkPercentage](#slimechunkpercentage) +- [snowballWaterDrag](#snowballwaterdrag) - [zeroTickPlants](#zerotickplants) ## Rules in EXPERIMENTAL Category @@ -57,6 +64,13 @@ Custom amount of ice crushed by falling anvils make one packed ice. - You must choose a value from 0 to 32 - From [QuickCarpet](https://github.com/DeadlyMC/QuickCarpet114) +### campSleeping +Allows players to sleep in a Bed without setting their spawn point by entering while sneaking +- Type: `boolean` +- Default value: `false` +- Required options: `true`, `false` +- Categories: `EXPERIMENTAL`, `FEATURE`, `RUG`, `SURVIVAL` + ### dragonEggConvertsCobbleToEndstone Dragon Eggs will convert Cobble under them to Endstone either on set event - Type: `String` @@ -64,20 +78,22 @@ Dragon Eggs will convert Cobble under them to Endstone either on set event - Required options: `off`, `on_teleport`, `on_landing`, `both` - Categories: `EXPERIMENTAL`, `FEATURE`, `RUG` +### dragonXpDrop +Amount of XP dropped by later Dragons. The first Dragon always drops 12000 +- Type: `int` +- Default value: `500` +- Suggested options: `500`, `1200`, `12000` +- Categories: `CLIENT`, `EXPERIMENTAL`, `RUG` +- Additional notes: + - You must choose a value from 0 to 12000 + - [Idea from Neubulae](https://github.com/gnembon/carpet-extra/issues/171) + ### easyHarvesting Right clicking on fully grown crops harvests and immediately replants it Works on: Wheat, Potatoes, Carrots, Beetroots, Nether Warts and Cocoa Beans -- Type: `boolean` -- Default value: `false` -- Required options: `true`, `false` -- Categories: `EXPERIMENTAL`, `FEATURE`, `RUG`, `SURVIVAL` - -### easyHarvestingRequireHoe -The easyHarvesting feature requires the player to hold a hoe in his main hand -Requires easyHarvesting to be enabled -- Type: `boolean` -- Default value: `true` -- Required options: `true`, `false` +- Type: `String` +- Default value: `off` +- Required options: `off`, `normal`, `require_hoe` - Categories: `EXPERIMENTAL`, `FEATURE`, `RUG`, `SURVIVAL` ### edibleGoldIngots @@ -112,6 +128,26 @@ Works server side only, but eating animation is only rendered if the mod is on t - Required options: `true`, `false` - Categories: `CLIENT`, `EXPERIMENTAL`, `FEATURE`, `RUG`, `SURVIVAL` +### eggWaterDrag +How fast thrown Eggs can travel under water. 0.99 is the default for above water and for Tridents +Thrown Egg will stutter on client when mod is only on server +- Type: `double` +- Default value: `0.8` +- Suggested options: `0.8`, `0.9`, `0.99` +- Categories: `CLIENT`, `EXPERIMENTAL`, `RUG` +- Additional notes: + - You must choose a value from 0.5 to 0.99 + +### enderPearlWaterDrag +How fast thrown Ender Pearls can travel under water. 0.99 is the default for above water and for Tridents +Thrown Pearl will stutter on client when mod is only on server +- Type: `double` +- Default value: `0.8` +- Suggested options: `0.8`, `0.9`, `0.99` +- Categories: `CLIENT`, `EXPERIMENTAL`, `RUG` +- Additional notes: + - You must choose a value from 0.5 to 0.99 + ### foodInstantHeal Food heals hearts not hunger like in the first MC versions and naturalRegeneration is off Recommended using with peacefulHunger @@ -130,7 +166,7 @@ Will render Ghost Blocks on the Client when mod is only Server Side - Required options: `both`, `honey`, `slime`, `none` - Categories: `CLIENT`, `EXPERIMENTAL`, `FEATURE`, `RUG` - Additional notes: - - Suggestion by DragonEggBedrockBreaking#0034 + - [Idea from DragonEggBedrockBreaking#0034](https://discord.com/channels/211786369951989762/573613501164159016/816793720011358208) on the [SciCraft Discord](https://discord.gg/scicraft) ### infinityNeedsArrow A Bow enchanted with Infinity needs the player to have an arrow in his inventory @@ -139,6 +175,16 @@ A Bow enchanted with Infinity needs the player to have an arrow in his inventory - Required options: `true`, `false` - Categories: `BUGFIX`, `EXPERIMENTAL`, `RUG`, `SURVIVAL` +### kelpBlockHardness +How long Kelp Blocks take to mine in survival +Any value other than 0 will behave like 0.5 for clients without this mod +- Type: `double` +- Default value: `0.5` +- Suggested options: `0`, `0.25`, `0.5` +- Categories: `CLIENT`, `EXPERIMENTAL`, `RUG`, `SURVIVAL` +- Additional notes: + - You must choose a value from 0 to 0.5 + ### longerRepeaters Repeaters on top of Redstone BLocks multiply their delay by set amount - Type: `int` @@ -146,6 +192,16 @@ Repeaters on top of Redstone BLocks multiply their delay by set amount - Required options: `1`, `2`, `3`, `4` - Categories: `EXPERIMENTAL`, `FEATURE`, `RUG` +### moreFortressSpawningBlocks +What blocks Fortress mobs can spawn on inside the bigger Bounding Box +o +- Type: `String` +- Default value: `off` +- Required options: `off`, `more`, `all` +- Categories: `EXPERIMENTAL`, `FEATURE`, `RUG` +- Additional notes: + - [Idea from DragonEggBedrockBreaking](https://github.com/gnembon/carpet-extra/issues/182) + ### newShulkerBehavior Makes shulkers behave like in the current 1.17 snapshots Shulkers hit by a shulker bullet have a chance to spawn a new shulker and teleport @@ -194,6 +250,26 @@ Mining Spawners with a Silk Touch tool will drop itself - Required options: `true`, `false` - Categories: `EXPERIMENTAL`, `FEATURE`, `RUG`, `SURVIVAL` +### slimeChunkPercentage +The percentage of chunks that are Slime chinks +- Type: `int` +- Default value: `10` +- Suggested options: `0`, `10`, `50`, `100` +- Categories: `EXPERIMENTAL`, `RUG` +- Additional notes: + - You must choose a value from 0 to 100 that is a multiple of 10 + - [Idea from Philipp766](https://github.com/gnembon/carpet-extra/issues/161) + +### snowballWaterDrag +How fast thrown Snowballs can travel under water. 0.99 is the default for above water and for Tridents +Thrown Snowball will stutter on client when mod is only on server +- Type: `double` +- Default value: `0.8` +- Suggested options: `0.8`, `0.9`, `0.99` +- Categories: `CLIENT`, `EXPERIMENTAL`, `RUG` +- Additional notes: + - You must choose a value from 0.5 to 0.99 + ### zeroTickPlants Brings back the ability to force grow certain plants using 0-ticks - Type: `boolean` diff --git a/markdown/FEATURE_Category.md b/markdown/FEATURE_Category.md index 6dd83dd..725edcf 100644 --- a/markdown/FEATURE_Category.md +++ b/markdown/FEATURE_Category.md @@ -2,15 +2,15 @@ For a list of all implemented Rules go [here](../README.md) ## Index -Count: 25 +Count: 26 - [anvilledBlueIce](#anvilledblueice) - [anvilledIce](#anvilledice) - [anvilledPackedIce](#anvilledpackedice) +- [campSleeping](#campsleeping) - [concreteConvertOnCauldron](#concreteconvertoncauldron) -- [dragonDropsElytra](#dragondropselytra) +- [dragonDrops](#dragondrops) - [dragonEggConvertsCobbleToEndstone](#dragoneggconvertscobbletoendstone) - [easyHarvesting](#easyharvesting) -- [easyHarvestingRequireHoe](#easyharvestingrequirehoe) - [edibleGoldIngots](#ediblegoldingots) - [edibleMagmaCream](#ediblemagmacream) - [edibleNetheriteScraps](#ediblenetheritescraps) @@ -20,6 +20,7 @@ Count: 25 - [honeyCombStickiness](#honeycombstickiness) - [lilyPadsOnCauldron](#lilypadsoncauldron) - [longerRepeaters](#longerrepeaters) +- [moreFortressSpawningBlocks](#morefortressspawningblocks) - [newShulkerBehavior](#newshulkerbehavior) - [peacefulHunger](#peacefulhunger) - [playerHeadDrops](#playerheaddrops) @@ -61,6 +62,13 @@ Custom amount of ice crushed by falling anvils make one packed ice. - You must choose a value from 0 to 32 - From [QuickCarpet](https://github.com/DeadlyMC/QuickCarpet114) +### campSleeping +Allows players to sleep in a Bed without setting their spawn point by entering while sneaking +- Type: `boolean` +- Default value: `false` +- Required options: `true`, `false` +- Categories: `EXPERIMENTAL`, `FEATURE`, `RUG`, `SURVIVAL` + ### concreteConvertOnCauldron Concrete powder converts to concrete blocks when on top of a filled cauldron - Type: `boolean` @@ -68,11 +76,11 @@ Concrete powder converts to concrete blocks when on top of a filled cauldron - Required options: `true`, `false` - Categories: `FEATURE`, `RUG` -### dragonDropsElytra +### dragonDrops Ender Dragon drops an Elytra when killed -- Type: `boolean` -- Default value: `false` -- Required options: `true`, `false` +- Type: `String` +- Default value: `none` +- Required options: `none`, `dragon_egg`, `elytra`, `both` - Categories: `FEATURE`, `RUG`, `SURVIVAL` - Additional notes: - Idea from [VanillaTweaks](https://vanillatweaks.net/picker/datapacks/) @@ -87,17 +95,9 @@ Dragon Eggs will convert Cobble under them to Endstone either on set event ### easyHarvesting Right clicking on fully grown crops harvests and immediately replants it Works on: Wheat, Potatoes, Carrots, Beetroots, Nether Warts and Cocoa Beans -- Type: `boolean` -- Default value: `false` -- Required options: `true`, `false` -- Categories: `EXPERIMENTAL`, `FEATURE`, `RUG`, `SURVIVAL` - -### easyHarvestingRequireHoe -The easyHarvesting feature requires the player to hold a hoe in his main hand -Requires easyHarvesting to be enabled -- Type: `boolean` -- Default value: `true` -- Required options: `true`, `false` +- Type: `String` +- Default value: `off` +- Required options: `off`, `normal`, `require_hoe` - Categories: `EXPERIMENTAL`, `FEATURE`, `RUG`, `SURVIVAL` ### edibleGoldIngots @@ -159,7 +159,7 @@ Will render Ghost Blocks on the Client when mod is only Server Side - Required options: `both`, `honey`, `slime`, `none` - Categories: `CLIENT`, `EXPERIMENTAL`, `FEATURE`, `RUG` - Additional notes: - - Suggestion by DragonEggBedrockBreaking#0034 + - [Idea from DragonEggBedrockBreaking#0034](https://discord.com/channels/211786369951989762/573613501164159016/816793720011358208) on the [SciCraft Discord](https://discord.gg/scicraft) ### lilyPadsOnCauldron Lily Pads can be placed on Cauldrons @@ -175,6 +175,16 @@ Repeaters on top of Redstone BLocks multiply their delay by set amount - Required options: `1`, `2`, `3`, `4` - Categories: `EXPERIMENTAL`, `FEATURE`, `RUG` +### moreFortressSpawningBlocks +What blocks Fortress mobs can spawn on inside the bigger Bounding Box +o +- Type: `String` +- Default value: `off` +- Required options: `off`, `more`, `all` +- Categories: `EXPERIMENTAL`, `FEATURE`, `RUG` +- Additional notes: + - [Idea from DragonEggBedrockBreaking](https://github.com/gnembon/carpet-extra/issues/182) + ### newShulkerBehavior Makes shulkers behave like in the current 1.17 snapshots Shulkers hit by a shulker bullet have a chance to spawn a new shulker and teleport @@ -193,10 +203,10 @@ Players do not lose any hunger like in peaceful mode - Suggestion by [real_zockerhopper](https://www.curseforge.com/members/real_zockerhopper) ### playerHeadDrops -Players drop their head when killed by a player -- Type: `boolean` -- Default value: `false` -- Required options: `true`, `false` +Players drop their head +- Type: `String` +- Default value: `off` +- Required options: `off`, `on_death`, `on_killed_by_player` - Categories: `FEATURE`, `RUG`, `SURVIVAL` - Additional notes: - Idea from [VanillaTweaks](https://vanillatweaks.net/picker/datapacks/) diff --git a/markdown/SURVIVAL_Category.md b/markdown/SURVIVAL_Category.md index 79c9107..642ff4c 100644 --- a/markdown/SURVIVAL_Category.md +++ b/markdown/SURVIVAL_Category.md @@ -2,18 +2,19 @@ For a list of all implemented Rules go [here](../README.md) ## Index -Count: 44 -- [cactusFurnaceXP](#cactusfurnacexp) +Count: 46 +- [cactusFurnaceXp](#cactusfurnacexp) +- [campSleeping](#campsleeping) - [craftableCobwebs](#craftablecobwebs) - [craftableHorseArmor](#craftablehorsearmor) - [craftableNameTags](#craftablenametags) - [craftableNotchApple](#craftablenotchapple) -- [dragonDropsElytra](#dragondropselytra) +- [dragonDrops](#dragondrops) +- [easyBlueIceCrafting](#easyblueicecrafting) - [easyBoneBlockCrafting](#easyboneblockcrafting) - [easyChestCrafting](#easychestcrafting) - [easyDispenserCrafting](#easydispensercrafting) - [easyHarvesting](#easyharvesting) -- [easyHarvestingRequireHoe](#easyharvestingrequirehoe) - [easyMinecartsCrafting](#easyminecartscrafting) - [easyRepeaterCrafting](#easyrepeatercrafting) - [easyStickCrafting](#easystickcrafting) @@ -25,6 +26,7 @@ Count: 44 - [enderPearlDamage](#enderpearldamage) - [foodInstantHeal](#foodinstantheal) - [infinityNeedsArrow](#infinityneedsarrow) +- [kelpBlockHardness](#kelpblockhardness) - [moreBarkCrafting](#morebarkcrafting) - [noCreeperGriefing](#nocreepergriefing) - [noEndermanGriefing](#noendermangriefing) @@ -50,7 +52,7 @@ Count: 44 ## Rules in SURVIVAL Category -### cactusFurnaceXP +### cactusFurnaceXp Amount of XP a Cactus smelted in a furnace gives 1 XP per Cactus seems to be a bug, as in Bedrock Edition it's only 0.2, which fits more in line with other items - Type: `double` @@ -60,12 +62,19 @@ Amount of XP a Cactus smelted in a furnace gives - Additional notes: - You must choose a value from 0 to 1 -### craftableCobwebs -Cobwebs can be crafted out of 5 Strings in a cross pattern -Expect a lag spike when changing the value +### campSleeping +Allows players to sleep in a Bed without setting their spawn point by entering while sneaking - Type: `boolean` - Default value: `false` - Required options: `true`, `false` +- Categories: `EXPERIMENTAL`, `FEATURE`, `RUG`, `SURVIVAL` + +### craftableCobwebs +Cobwebs can be crafted with 5 Strings in a cross pattern or with a 3x3 full area +Expect a lag spike when changing the value +- Type: `String` +- Default value: `off` +- Required options: `off`, `cross`, `full` - Categories: `CRAFTING`, `RUG`, `SURVIVAL` ### craftableHorseArmor @@ -77,11 +86,11 @@ Expect a lag spike when changing the value - Categories: `CRAFTING`, `RUG`, `SURVIVAL` ### craftableNameTags -Name Tags can be crafted with Paper and Iron +Name Tags can be crafted with Paper and Iron or String or both Expect a lag spike when changing the value -- Type: `boolean` -- Default value: `false` -- Required options: `true`, `false` +- Type: `String` +- Default value: `off` +- Required options: `off`, `with_iron`, `with_string`, `with_both` - Categories: `CRAFTING`, `RUG`, `SURVIVAL` ### craftableNotchApple @@ -92,15 +101,23 @@ Expect a lag spike when changing the value - Required options: `true`, `false` - Categories: `CRAFTING`, `RUG`, `SURVIVAL` -### dragonDropsElytra +### dragonDrops Ender Dragon drops an Elytra when killed -- Type: `boolean` -- Default value: `false` -- Required options: `true`, `false` +- Type: `String` +- Default value: `none` +- Required options: `none`, `dragon_egg`, `elytra`, `both` - Categories: `FEATURE`, `RUG`, `SURVIVAL` - Additional notes: - Idea from [VanillaTweaks](https://vanillatweaks.net/picker/datapacks/) +### easyBlueIceCrafting +Blue Ice can be crafted from Ice and Blue Dye +Expect a lag spike when changing the value +- Type: `boolean` +- Default value: `false` +- Required options: `true`, `false` +- Categories: `CRAFTING`, `RUG`, `SURVIVAL` + ### easyBoneBlockCrafting Bone Blocks can be crafted out of Bones Expect a lag spike when changing the value @@ -130,17 +147,9 @@ Expect a lag spike when changing the value ### easyHarvesting Right clicking on fully grown crops harvests and immediately replants it Works on: Wheat, Potatoes, Carrots, Beetroots, Nether Warts and Cocoa Beans -- Type: `boolean` -- Default value: `false` -- Required options: `true`, `false` -- Categories: `EXPERIMENTAL`, `FEATURE`, `RUG`, `SURVIVAL` - -### easyHarvestingRequireHoe -The easyHarvesting feature requires the player to hold a hoe in his main hand -Requires easyHarvesting to be enabled -- Type: `boolean` -- Default value: `true` -- Required options: `true`, `false` +- Type: `String` +- Default value: `off` +- Required options: `off`, `normal`, `require_hoe` - Categories: `EXPERIMENTAL`, `FEATURE`, `RUG`, `SURVIVAL` ### easyMinecartsCrafting @@ -233,6 +242,16 @@ A Bow enchanted with Infinity needs the player to have an arrow in his inventory - Required options: `true`, `false` - Categories: `BUGFIX`, `EXPERIMENTAL`, `RUG`, `SURVIVAL` +### kelpBlockHardness +How long Kelp Blocks take to mine in survival +Any value other than 0 will behave like 0.5 for clients without this mod +- Type: `double` +- Default value: `0.5` +- Suggested options: `0`, `0.25`, `0.5` +- Categories: `CLIENT`, `EXPERIMENTAL`, `RUG`, `SURVIVAL` +- Additional notes: + - You must choose a value from 0 to 0.5 + ### moreBarkCrafting Crafting Logs to Wood gives 4 instead of 3 Expect a lag spike when changing the value @@ -279,10 +298,10 @@ Players do not lose any hunger like in peaceful mode - Suggestion by [real_zockerhopper](https://www.curseforge.com/members/real_zockerhopper) ### playerHeadDrops -Players drop their head when killed by a player -- Type: `boolean` -- Default value: `false` -- Required options: `true`, `false` +Players drop their head +- Type: `String` +- Default value: `off` +- Required options: `off`, `on_death`, `on_killed_by_player` - Categories: `FEATURE`, `RUG`, `SURVIVAL` - Additional notes: - Idea from [VanillaTweaks](https://vanillatweaks.net/picker/datapacks/) diff --git a/src/main/java/com/rubixdev/rug/RugServer.java b/src/main/java/com/rubixdev/rug/RugServer.java index a231ae8..65af20a 100644 --- a/src/main/java/com/rubixdev/rug/RugServer.java +++ b/src/main/java/com/rubixdev/rug/RugServer.java @@ -52,7 +52,7 @@ public void onGameStarted() { @Override public void onServerLoaded(MinecraftServer server) { UseBlockCallback.EVENT.register(((player, world, hand, hitResult) -> { - if (!RugSettings.easyHarvesting || world.isClient() || hand != Hand.MAIN_HAND) { + if (RugSettings.easyHarvesting.equals("off") || world.isClient() || hand != Hand.MAIN_HAND) { return ActionResult.PASS; } @@ -62,7 +62,7 @@ public void onServerLoaded(MinecraftServer server) { if (isMature(state)) { ItemStack tool = player != null ? player.getStackInHand(hand) : ItemStack.EMPTY; - if (RugSettings.easyHarvestingRequireHoe && !(tool.getItem() instanceof HoeItem)) { + if (RugSettings.easyHarvesting.equals("require_hoe") && !(tool.getItem() instanceof HoeItem)) { return ActionResult.PASS; } List droppedItems = Block.getDroppedStacks(state, (ServerWorld) world, pos, null, player, tool); diff --git a/src/main/java/com/rubixdev/rug/RugSettings.java b/src/main/java/com/rubixdev/rug/RugSettings.java index f236295..3a975d7 100644 --- a/src/main/java/com/rubixdev/rug/RugSettings.java +++ b/src/main/java/com/rubixdev/rug/RugSettings.java @@ -85,18 +85,20 @@ public String description() { public static boolean noGhastGriefing = false; @Rule( - desc = "Players drop their head when killed by a player", + desc = "Players drop their head", + options = {"off", "on_death", "on_killed_by_player"}, category = {FEATURE, SURVIVAL, RUG} ) - public static boolean playerHeadDrops = false; + public static String playerHeadDrops = "off"; // playerHeadDropsAdditional: Idea from [VanillaTweaks](https://vanillatweaks.net/picker/datapacks/) @Rule( desc = "Ender Dragon drops an Elytra when killed", + options = {"none", "dragon_egg", "elytra", "both"}, category = {FEATURE, SURVIVAL, RUG} ) - public static boolean dragonDropsElytra = false; - // dragonDropsElytraAdditional: Idea from [VanillaTweaks](https://vanillatweaks.net/picker/datapacks/) + public static String dragonDrops = "none"; + // dragonDropsAdditional: Idea from [VanillaTweaks](https://vanillatweaks.net/picker/datapacks/) public static class validatorStrictShulkerShells extends Validator { @@ -150,16 +152,10 @@ public String description() { @Rule( desc = "Right clicking on fully grown crops harvests and immediately replants it", extra = "Works on: Wheat, Potatoes, Carrots, Beetroots, Nether Warts and Cocoa Beans", + options = {"off", "normal", "require_hoe"}, category = {EXPERIMENTAL, FEATURE, SURVIVAL, RUG} ) - public static boolean easyHarvesting = false; - - @Rule( - desc = "The easyHarvesting feature requires the player to hold a hoe in his main hand", - extra = "Requires easyHarvesting to be enabled", - category = {EXPERIMENTAL, FEATURE, SURVIVAL, RUG} - ) - public static boolean easyHarvestingRequireHoe = true; + public static String easyHarvesting = "off"; @Rule( desc = "Makes Netherite Scraps edible, because, let's be honest, they kinda look like chocolate", @@ -270,7 +266,7 @@ public String description() { ) public static boolean edibleGoldIngots = false; - public static class validatorCactusFurnaceXP extends Validator { + public static class validatorCactusFurnaceXp extends Validator { @Override public Double validate(ServerCommandSource source, ParsedRule currentRule, Double newValue, String string) { @@ -288,10 +284,10 @@ public String description() { extra = "1 XP per Cactus seems to be a bug, as in Bedrock Edition it's only 0.2, which fits more in line with other items", options = {"0.1", "0.2", "0.5", "1"}, strict = false, - validate = validatorCactusFurnaceXP.class, + validate = validatorCactusFurnaceXp.class, category = {BUGFIX, SURVIVAL, RUG} ) - public static double cactusFurnaceXP = 1; + public static double cactusFurnaceXp = 1; @Rule( desc = "Mining Farmland with a Silk Touch tool will drop itself", @@ -427,14 +423,15 @@ public String description() { public static boolean easyRepeaterCrafting = false; @CraftingRule( - recipes = {"name_tag.json"} + recipes = {"craftable_name_tag"} ) @Rule( - desc = "Name Tags can be crafted with Paper and Iron", + desc = "Name Tags can be crafted with Paper and Iron or String or both", extra = "Expect a lag spike when changing the value", + options = {"off", "with_iron", "with_string", "with_both"}, category = {CRAFTING, SURVIVAL, RUG} ) - public static boolean craftableNameTags = false; + public static String craftableNameTags = "off"; @CraftingRule( recipes = { @@ -672,14 +669,15 @@ public String description() { public static int unpackableIce = 0; @CraftingRule( - recipes = {"cobweb.json"} + recipes = {"craftable_cobweb"} ) @Rule( - desc = "Cobwebs can be crafted out of 5 Strings in a cross pattern", + desc = "Cobwebs can be crafted with 5 Strings in a cross pattern or with a 3x3 full area", extra = "Expect a lag spike when changing the value", + options = {"off", "cross", "full"}, category = {CRAFTING, SURVIVAL, RUG} ) - public static boolean craftableCobwebs = false; + public static String craftableCobwebs = "off"; @CraftingRule( recipes = {"easy_trapped_chest_crafting.json"} @@ -784,7 +782,7 @@ public String description() { category = {EXPERIMENTAL, CLIENT, FEATURE, RUG} ) public static String honeyCombStickiness = "both"; - // honeyCombStickinessAdditional: Suggestion by DragonEggBedrockBreaking#0034 + // honeyCombStickinessAdditional: [Idea from DragonEggBedrockBreaking#0034](https://discord.com/channels/211786369951989762/573613501164159016/816793720011358208) on the [SciCraft Discord](https://discord.gg/scicraft) @Rule( desc = "Dragon Eggs will convert Cobble under them to Endstone either on set event", @@ -792,6 +790,143 @@ public String description() { category = {EXPERIMENTAL, FEATURE, RUG} ) public static String dragonEggConvertsCobbleToEndstone = "off"; + + public static class validatorThrownItemWaterDrag extends Validator { + + @Override + public Double validate(ServerCommandSource source, ParsedRule currentRule, Double newValue, String string) { + return newValue >= 0.5 && newValue <= 0.99 ? newValue : null; + } + + @Override + public String description() { + return "You must choose a value from 0.5 to 0.99"; + } + } + + @Rule( + desc = "How fast thrown Ender Pearls can travel under water. 0.99 is the default for above water and for Tridents", + extra = "Thrown Pearl will stutter on client when mod is only on server", + options = {"0.8", "0.9", "0.99"}, + strict = false, + validate = validatorThrownItemWaterDrag.class, + category = {EXPERIMENTAL, CLIENT, RUG} + ) + public static double enderPearlWaterDrag = 0.8; + + public static class validatorKelpBlockHardness extends Validator { + + @Override + public Double validate(ServerCommandSource source, ParsedRule currentRule, Double newValue, String string) { + return newValue >= 0 && newValue <= 0.5 ? newValue : null; + } + + @Override + public String description() { + return "You must choose a value from 0 to 0.5"; + } + } + + @Rule( + desc = "How long Kelp Blocks take to mine in survival", + extra = "Any value other than 0 will behave like 0.5 for clients without this mod", + options = {"0", "0.25", "0.5"}, + strict = false, + validate = validatorKelpBlockHardness.class, + category = {EXPERIMENTAL, CLIENT, SURVIVAL, RUG} + ) + public static double kelpBlockHardness = 0.5; + + @Rule( + desc = "Allows players to sleep in a Bed without setting their spawn point by entering while sneaking", + category = {EXPERIMENTAL, FEATURE, SURVIVAL, RUG} + ) + public static boolean campSleeping = false; + + @Rule( + desc = "How fast thrown Snowballs can travel under water. 0.99 is the default for above water and for Tridents", + extra = "Thrown Snowball will stutter on client when mod is only on server", + options = {"0.8", "0.9", "0.99"}, + strict = false, + validate = validatorThrownItemWaterDrag.class, + category = {EXPERIMENTAL, CLIENT, RUG} + ) + public static double snowballWaterDrag = 0.8; + + @Rule( + desc = "How fast thrown Eggs can travel under water. 0.99 is the default for above water and for Tridents", + extra = "Thrown Egg will stutter on client when mod is only on server", + options = {"0.8", "0.9", "0.99"}, + strict = false, + validate = validatorThrownItemWaterDrag.class, + category = {EXPERIMENTAL, CLIENT, RUG} + ) + public static double eggWaterDrag = 0.8; + + public static class validatorDragonXpDrop extends Validator { + + @Override + public Integer validate(ServerCommandSource source, ParsedRule currentRule, Integer newValue, String string) { + return newValue >= 0 && newValue <= 12000 ? newValue : null; + } + + @Override + public String description() { + return "You must choose a value from 0 to 12000"; + } + } + + @Rule( + desc = "Amount of XP dropped by later Dragons. The first Dragon always drops 12000", + options = {"500", "1200", "12000"}, + strict = false, + validate = validatorDragonXpDrop.class, + category = {EXPERIMENTAL, CLIENT, RUG} + ) + public static int dragonXpDrop = 500; + // dragonXpDropAdditional: [Idea from Neubulae](https://github.com/gnembon/carpet-extra/issues/171) + + @Rule( + desc = "What blocks Fortress mobs can spawn on inside the bigger Bounding Box", + extra = "off = nether bricks only | more = (red) nether bricks, netherrack, soul sand/soil, packed/blue ice, gravel, magma blocks | all = all", + options = {"off", "more", "all"}, + category = {EXPERIMENTAL, FEATURE, RUG} + ) + public static String moreFortressSpawningBlocks = "off"; + // moreFortressSpawningBlocksAdditional: [Idea from DragonEggBedrockBreaking](https://github.com/gnembon/carpet-extra/issues/182) + + @CraftingRule( + recipes = {"easy_blue_ice_crafting.json"} + ) + @Rule( + desc = "Blue Ice can be crafted from Ice and Blue Dye", + extra = "Expect a lag spike when changing the value", + category = {CRAFTING, SURVIVAL, RUG} + ) + public static boolean easyBlueIceCrafting = false; + + public static class validatorSlimeChunkPercentage extends Validator { + + @Override + public Integer validate(ServerCommandSource source, ParsedRule currentRule, Integer newValue, String string) { + return (newValue >= 0 && newValue <= 100) && newValue % 10 == 0 ? newValue : null; + } + + @Override + public String description() { + return "You must choose a value from 0 to 100 that is a multiple of 10"; + } + } + + @Rule( + desc = "The percentage of chunks that are Slime chinks", + options = {"0", "10", "50", "100"}, + strict = false, + validate = validatorSlimeChunkPercentage.class, + category = {EXPERIMENTAL, RUG} + ) + public static int slimeChunkPercentage = 10; + // slimeChunkPercentageAdditional: [Idea from Philipp766](https://github.com/gnembon/carpet-extra/issues/161) } // BUGFIX @@ -805,3 +940,4 @@ public String description() { // SCARPET // SURVIVAL // TNT +// CRAFTING diff --git a/src/main/java/com/rubixdev/rug/mixins/AbsractBlockStateMixin.java b/src/main/java/com/rubixdev/rug/mixins/AbsractBlockStateMixin.java new file mode 100644 index 0000000..e81aea6 --- /dev/null +++ b/src/main/java/com/rubixdev/rug/mixins/AbsractBlockStateMixin.java @@ -0,0 +1,20 @@ +package com.rubixdev.rug.mixins; + +import com.rubixdev.rug.RugSettings; +import net.minecraft.block.Blocks; +import net.minecraft.util.math.BlockPos; +import net.minecraft.world.BlockView; +import org.spongepowered.asm.mixin.Mixin; +import org.spongepowered.asm.mixin.injection.At; +import org.spongepowered.asm.mixin.injection.Inject; +import org.spongepowered.asm.mixin.injection.callback.CallbackInfoReturnable; + +@Mixin(targets = {"net/minecraft/block/AbstractBlock$AbstractBlockState"}) +public class AbsractBlockStateMixin { + @Inject(method = "getHardness", at = @At("HEAD"), cancellable = true) + private void onGetHardness(BlockView world, BlockPos pos, CallbackInfoReturnable cir) { + if (world.getBlockState(pos).getBlock().is(Blocks.DRIED_KELP_BLOCK)) { + cir.setReturnValue((float) RugSettings.kelpBlockHardness); + } + } +} diff --git a/src/main/java/com/rubixdev/rug/mixins/AbstractFurnaceBlockEntityMixin.java b/src/main/java/com/rubixdev/rug/mixins/AbstractFurnaceBlockEntityMixin.java index 8964a76..adfb7e1 100644 --- a/src/main/java/com/rubixdev/rug/mixins/AbstractFurnaceBlockEntityMixin.java +++ b/src/main/java/com/rubixdev/rug/mixins/AbstractFurnaceBlockEntityMixin.java @@ -46,7 +46,7 @@ private static void onSyntheticMethod_17761(List list, World world, Vec3d vec3d, ) ) private static void onSyntheticMethod_17761(World world, Vec3d vec3d, int i, float f) { - dropExperience(world, vec3d, i, isCactusRecipe ? (float) RugSettings.cactusFurnaceXP : f); + dropExperience(world, vec3d, i, isCactusRecipe ? (float) RugSettings.cactusFurnaceXp : f); isCactusRecipe = false; } } diff --git a/src/main/java/com/rubixdev/rug/mixins/EnderDragonEntityMixin.java b/src/main/java/com/rubixdev/rug/mixins/EnderDragonEntityMixin.java index f488fce..188cfa6 100644 --- a/src/main/java/com/rubixdev/rug/mixins/EnderDragonEntityMixin.java +++ b/src/main/java/com/rubixdev/rug/mixins/EnderDragonEntityMixin.java @@ -10,7 +10,9 @@ import net.minecraft.world.World; import org.spongepowered.asm.mixin.Mixin; import org.spongepowered.asm.mixin.injection.At; +import org.spongepowered.asm.mixin.injection.Constant; import org.spongepowered.asm.mixin.injection.Inject; +import org.spongepowered.asm.mixin.injection.ModifyConstant; import org.spongepowered.asm.mixin.injection.callback.CallbackInfo; @Mixin(EnderDragonEntity.class) @@ -23,9 +25,20 @@ public EnderDragonEntityMixin(EntityType type, World world) { at = @At(value = "INVOKE", target = "Lnet/minecraft/entity/boss/dragon/EnderDragonEntity;awardExperience(I)V", ordinal = 1)) - private void onAwardExperience(CallbackInfo ci) { - if (RugSettings.dragonDropsElytra && this.world.getGameRules().getBoolean(GameRules.DO_MOB_LOOT)) { - this.dropStack(new ItemStack(Items.ELYTRA)); + private void onUpdatePostDeath(CallbackInfo ci) { + String rugSetting = RugSettings.dragonDrops; + if (!rugSetting.equals("none") && this.world.getGameRules().getBoolean(GameRules.DO_MOB_LOOT)) { + if (rugSetting.equals("elytra") || rugSetting.equals("both")) { + this.dropStack(new ItemStack(Items.ELYTRA)); + } + if (rugSetting.equals("dragon_egg") || rugSetting.equals("both")) { + this.dropStack(new ItemStack(Items.DRAGON_EGG)); + } } } + + @ModifyConstant(method = "updatePostDeath", constant = @Constant(intValue = 500)) + private int overwriteXP(final int baseValue) { + return RugSettings.dragonXpDrop; + } } diff --git a/src/main/java/com/rubixdev/rug/mixins/ServerPlayerEntityMixin.java b/src/main/java/com/rubixdev/rug/mixins/ServerPlayerEntityMixin.java index 3fd134a..650e4e5 100644 --- a/src/main/java/com/rubixdev/rug/mixins/ServerPlayerEntityMixin.java +++ b/src/main/java/com/rubixdev/rug/mixins/ServerPlayerEntityMixin.java @@ -9,9 +9,13 @@ import net.minecraft.nbt.CompoundTag; import net.minecraft.nbt.NbtHelper; import net.minecraft.server.network.ServerPlayerEntity; +import net.minecraft.server.world.ServerWorld; +import net.minecraft.tag.BlockTags; import net.minecraft.util.math.BlockPos; +import net.minecraft.util.registry.RegistryKey; import net.minecraft.world.World; import org.spongepowered.asm.mixin.Mixin; +import org.spongepowered.asm.mixin.Shadow; import org.spongepowered.asm.mixin.injection.At; import org.spongepowered.asm.mixin.injection.Inject; import org.spongepowered.asm.mixin.injection.callback.CallbackInfo; @@ -19,16 +23,26 @@ @Mixin(ServerPlayerEntity.class) public abstract class ServerPlayerEntityMixin extends PlayerEntity { + @Shadow public abstract ServerWorld getServerWorld(); + public ServerPlayerEntityMixin(World world, BlockPos pos, float yaw, GameProfile profile) { super(world, pos, yaw, profile); } @Inject(method = "onDeath", at = @At(value = "INVOKE", target = "Lnet/minecraft/server/network/ServerPlayerEntity;drop(Lnet/minecraft/entity/damage/DamageSource;)V")) private void onOnDeath(DamageSource damageSource, CallbackInfo ci) { - if (RugSettings.playerHeadDrops && damageSource.getAttacker() instanceof PlayerEntity) { + if ((RugSettings.playerHeadDrops.equals("on_killed_by_player") && damageSource.getAttacker() instanceof PlayerEntity) + || (RugSettings.playerHeadDrops.equals("on_death"))) { ItemStack stack = new ItemStack(Items.PLAYER_HEAD); stack.getOrCreateTag().put("SkullOwner", NbtHelper.fromGameProfile(new CompoundTag(), this.getGameProfile())); this.dropStack(stack); } } + + @Inject(method = "setSpawnPoint", at = @At("HEAD"), cancellable = true) + private void onSetSpawnPoint(RegistryKey dimension, BlockPos pos, float angle, boolean spawnPointSet, boolean bl, CallbackInfo ci) { + if (RugSettings.campSleeping && bl && this.isSneaking() && this.getServerWorld().getBlockState(pos).getBlock().isIn(BlockTags.BEDS)) { + ci.cancel(); + } + } } diff --git a/src/main/java/com/rubixdev/rug/mixins/SlimeEntityMixin.java b/src/main/java/com/rubixdev/rug/mixins/SlimeEntityMixin.java new file mode 100644 index 0000000..8c635fa --- /dev/null +++ b/src/main/java/com/rubixdev/rug/mixins/SlimeEntityMixin.java @@ -0,0 +1,36 @@ +package com.rubixdev.rug.mixins; + +import com.rubixdev.rug.RugSettings; +import net.minecraft.entity.EntityType; +import net.minecraft.entity.SpawnReason; +import net.minecraft.entity.mob.SlimeEntity; +import net.minecraft.util.math.BlockPos; +import net.minecraft.util.math.ChunkPos; +import net.minecraft.world.StructureWorldAccess; +import net.minecraft.world.WorldAccess; +import net.minecraft.world.gen.ChunkRandom; +import org.spongepowered.asm.mixin.Mixin; +import org.spongepowered.asm.mixin.injection.At; +import org.spongepowered.asm.mixin.injection.Inject; +import org.spongepowered.asm.mixin.injection.ModifyVariable; +import org.spongepowered.asm.mixin.injection.callback.CallbackInfoReturnable; + +import java.util.Random; + +@Mixin(SlimeEntity.class) +public class SlimeEntityMixin { + private static BlockPos blockPos; + private static WorldAccess worldAccess; + + @Inject(method = "canSpawn", at = @At("HEAD")) + private static void getParams(EntityType type, WorldAccess world, SpawnReason spawnReason, BlockPos pos, Random random, CallbackInfoReturnable cir) { + blockPos = pos; + worldAccess = world; + } + + @ModifyVariable(method = "canSpawn", name = "bl", at = @At("STORE")) + private static boolean overwriteChance(boolean original) { + ChunkPos chunkPos = new ChunkPos(blockPos); + return ChunkRandom.getSlimeRandom(chunkPos.x, chunkPos.z, ((StructureWorldAccess)worldAccess).getSeed(), 987234911L).nextInt(10) < RugSettings.slimeChunkPercentage / 10; + } +} diff --git a/src/main/java/com/rubixdev/rug/mixins/SpawnHelperMixin.java b/src/main/java/com/rubixdev/rug/mixins/SpawnHelperMixin.java new file mode 100644 index 0000000..c531704 --- /dev/null +++ b/src/main/java/com/rubixdev/rug/mixins/SpawnHelperMixin.java @@ -0,0 +1,43 @@ +package com.rubixdev.rug.mixins; + +import com.google.common.collect.Lists; +import com.rubixdev.rug.RugSettings; +import net.minecraft.block.Block; +import net.minecraft.block.BlockState; +import net.minecraft.block.Blocks; +import net.minecraft.world.SpawnHelper; +import org.spongepowered.asm.mixin.Mixin; +import org.spongepowered.asm.mixin.injection.At; +import org.spongepowered.asm.mixin.injection.Redirect; + +import java.util.List; + +@Mixin(SpawnHelper.class) +public class SpawnHelperMixin { + @Redirect(method = "method_29950", at = @At(value = "INVOKE", target = "Lnet/minecraft/block/BlockState;getBlock()Lnet/minecraft/block/Block;")) + private static Block allowMoreSpawnableFortressBlocks(BlockState blockState) { + Block block = blockState.getBlock(); + + Block allow = Blocks.NETHER_BRICKS; + if (RugSettings.moreFortressSpawningBlocks.equals("all")) { + return allow; + } + + List allowedBlocks = Lists.newArrayList( + allow, + Blocks.NETHERRACK, + Blocks.SOUL_SAND, + Blocks.SOUL_SOIL, + Blocks.PACKED_ICE, + Blocks.BLUE_ICE, + Blocks.GRAVEL, + Blocks.MAGMA_BLOCK, + Blocks.RED_NETHER_BRICKS + ); + if (RugSettings.moreFortressSpawningBlocks.equals("more") && allowedBlocks.contains(block)) { + return allow; + } + + return block; + } +} diff --git a/src/main/java/com/rubixdev/rug/mixins/ThrownEntityMixin.java b/src/main/java/com/rubixdev/rug/mixins/ThrownEntityMixin.java new file mode 100644 index 0000000..cde4da7 --- /dev/null +++ b/src/main/java/com/rubixdev/rug/mixins/ThrownEntityMixin.java @@ -0,0 +1,26 @@ +package com.rubixdev.rug.mixins; + +import com.rubixdev.rug.RugSettings; +import net.minecraft.entity.projectile.thrown.EggEntity; +import net.minecraft.entity.projectile.thrown.EnderPearlEntity; +import net.minecraft.entity.projectile.thrown.SnowballEntity; +import net.minecraft.entity.projectile.thrown.ThrownEntity; +import org.spongepowered.asm.mixin.Mixin; +import org.spongepowered.asm.mixin.injection.Constant; +import org.spongepowered.asm.mixin.injection.ModifyConstant; + +@Mixin(ThrownEntity.class) +public class ThrownEntityMixin { + @SuppressWarnings("ConstantConditions") + @ModifyConstant(method = "tick", constant = @Constant(floatValue = 0.8F)) + private float onTick(final float baseValue) { + if ((Object) this instanceof EnderPearlEntity) { + return (float) RugSettings.enderPearlWaterDrag; + } else if ((Object) this instanceof SnowballEntity) { + return (float) RugSettings.snowballWaterDrag; + } else if ((Object) this instanceof EggEntity) { + return (float) RugSettings.eggWaterDrag; + } + return baseValue; + } +} diff --git a/src/main/resources/assets/rug/Rug_flexibleDataStorage/rug/recipes/cobweb.json b/src/main/resources/assets/rug/Rug_flexibleDataStorage/rug/recipes/craftable_cobweb_cross.json similarity index 100% rename from src/main/resources/assets/rug/Rug_flexibleDataStorage/rug/recipes/cobweb.json rename to src/main/resources/assets/rug/Rug_flexibleDataStorage/rug/recipes/craftable_cobweb_cross.json diff --git a/src/main/resources/assets/rug/Rug_flexibleDataStorage/rug/recipes/craftable_cobweb_full.json b/src/main/resources/assets/rug/Rug_flexibleDataStorage/rug/recipes/craftable_cobweb_full.json new file mode 100644 index 0000000..3a05050 --- /dev/null +++ b/src/main/resources/assets/rug/Rug_flexibleDataStorage/rug/recipes/craftable_cobweb_full.json @@ -0,0 +1,17 @@ +{ + "type": "minecraft:crafting_shaped", + "pattern": [ + "###", + "###", + "###" + ], + "key": { + "#": { + "item": "minecraft:string" + } + }, + "result": { + "item": "minecraft:cobweb", + "count": 1 + } +} \ No newline at end of file diff --git a/src/main/resources/assets/rug/Rug_flexibleDataStorage/rug/recipes/craftable_name_tag_with_both.json b/src/main/resources/assets/rug/Rug_flexibleDataStorage/rug/recipes/craftable_name_tag_with_both.json new file mode 100644 index 0000000..165d1f0 --- /dev/null +++ b/src/main/resources/assets/rug/Rug_flexibleDataStorage/rug/recipes/craftable_name_tag_with_both.json @@ -0,0 +1,23 @@ +{ + "type": "minecraft:crafting_shaped", + "pattern": [ + " IS", + " PI", + "P " + ], + "key": { + "I": { + "item": "minecraft:iron_ingot" + }, + "P": { + "item": "minecraft:paper" + }, + "S": { + "item": "minecraft:string" + } + }, + "result": { + "item": "minecraft:name_tag", + "count": 1 + } +} \ No newline at end of file diff --git a/src/main/resources/assets/rug/Rug_flexibleDataStorage/rug/recipes/name_tag.json b/src/main/resources/assets/rug/Rug_flexibleDataStorage/rug/recipes/craftable_name_tag_with_iron.json similarity index 100% rename from src/main/resources/assets/rug/Rug_flexibleDataStorage/rug/recipes/name_tag.json rename to src/main/resources/assets/rug/Rug_flexibleDataStorage/rug/recipes/craftable_name_tag_with_iron.json diff --git a/src/main/resources/assets/rug/Rug_flexibleDataStorage/rug/recipes/craftable_name_tag_with_string.json b/src/main/resources/assets/rug/Rug_flexibleDataStorage/rug/recipes/craftable_name_tag_with_string.json new file mode 100644 index 0000000..2fb18fa --- /dev/null +++ b/src/main/resources/assets/rug/Rug_flexibleDataStorage/rug/recipes/craftable_name_tag_with_string.json @@ -0,0 +1,20 @@ +{ + "type": "minecraft:crafting_shaped", + "pattern": [ + " S", + " P ", + "P " + ], + "key": { + "P": { + "item": "minecraft:paper" + }, + "S": { + "item": "minecraft:string" + } + }, + "result": { + "item": "minecraft:name_tag", + "count": 1 + } +} \ No newline at end of file diff --git a/src/main/resources/assets/rug/Rug_flexibleDataStorage/rug/recipes/easy_blue_ice_crafting.json b/src/main/resources/assets/rug/Rug_flexibleDataStorage/rug/recipes/easy_blue_ice_crafting.json new file mode 100644 index 0000000..ca69f32 --- /dev/null +++ b/src/main/resources/assets/rug/Rug_flexibleDataStorage/rug/recipes/easy_blue_ice_crafting.json @@ -0,0 +1,20 @@ +{ + "type": "minecraft:crafting_shaped", + "pattern": [ + "###", + "#D#", + "###" + ], + "key": { + "#": { + "item": "minecraft:ice" + }, + "D": { + "item": "minecraft:blue_dye" + } + }, + "result": { + "item": "minecraft:blue_ice", + "count": 8 + } +} \ No newline at end of file diff --git a/src/main/resources/rug.mixins.json b/src/main/resources/rug.mixins.json index 237e56c..34ba95b 100644 --- a/src/main/resources/rug.mixins.json +++ b/src/main/resources/rug.mixins.json @@ -3,6 +3,7 @@ "package": "com.rubixdev.rug.mixins", "compatibilityLevel": "JAVA_8", "mixins": [ + "AbsractBlockStateMixin", "AbstractFurnaceBlockEntityMixin", "AbstractPlantStemBlockMixin", "AbstractRedstoneGateBlockMixin", @@ -40,8 +41,11 @@ "ServerPlayNetworkHandlerMixin", "ShulkerEntityAccessorMixin", "ShulkerEntityMixin", + "SlimeEntityMixin", + "SpawnHelperMixin", "StoneCutterBlockMixin", - "SugarCaneBlockMixin" + "SugarCaneBlockMixin", + "ThrownEntityMixin" ], "client": [ ],