Page 1 of 2

[Fabric] Tweaker Addon v1.4.1

Posted: Fri Jul 23, 2021 7:19 am
by IssaMe
Want to be able to change HC Spawn mechanics? Want to disable lightning fires? This addon is for you!
Download
Source

Tweaker currently lets you change the HC Spawn mechanics, abandoned village and looted temple generation radius, and whether lightning should start fires.

When you start the game with this addon, a file will be generated at `./config/tweaker.properties`. You can modify these values to determine the default behaviour for your worlds. Don't forget to restart the game after modifying the config!

If instead you want to define specific behaviour for only one world, or you do not want to restart the game, you can use the command `/tweaker <option> [value]` to tweak any of the available settings. `/tweaker <option>` will let you see what the current value is.

For multiplayer only the server needs to have this mod installed.

Here's a preview of the config:
Preview of tweaker.properties
Show

Code: Select all

# The maximum radius the player will respawn from world spawn.
maxSpawnRadius=2000.0

# The minimum radius the player will respawn from world spawn.
minSpawnRadius=1000.0

# The radius at which the player will respawn after dying recently.
quickSpawnRadius=100.0

# The player's health after a quick spawn. (2 = one heart)
quickSpawnHealth=10

# The minimum amount of hunger after a quick spawn. (6 = one shank)
quickSpawnHungerMin=24

# The amount of hunger a player loses on each quick spawn. (6 = one shank)
quickSpawnHungerLoss=6

# Multiplier used for `maxSpawnRadius` when playing with Large Biomes.
largeBiomeMultiplier=4.0

# Multiplier used for 'maxSpawnRadius' after activating an End portal.
endMultiplier=2.5

# Multiplier used for 'maxSpawnRadius' after summoning a Wither.
witherMultiplier=2.0

# Multiplier used for 'maxSpawnRadius' after activating a Nether portal.
netherMultiplier=1.5

# Villages within this radius from world spawn will be abandoned.
abandonedVillageRadius=2250.0

# Villages within this radius from world spawn will be partially abandoned.
partiallyAbandonedVillageRadius=3000.0

# Temples within this radius from world spawn will be looted.
lootedTempleRadius=2250.0

# Determines if lightning should start fires or not.
lightningFire=true

Re: HC Spawn Config Addon

Posted: Fri Jul 23, 2021 4:09 pm
by EpicAaron
This looks great! I have also been looking into ways to get my friends to approach the mod, and this might help a lot.

What exactly does it let you configure?

Re: HC Spawn Config Addon

Posted: Fri Jul 23, 2021 8:07 pm
by IssaMe
This is what the config file looks like, it should explain everything:
hcspawn.cfg
Show

Code: Select all

### HCSpawn Config ###

## Respawn Radius ##

# The maximum radius the player will respawn from spawn. (Default: 2000.0)
maxRespawnRadius=2000.0

# The minimum radius the player will respawn from spawn. (Default: 1000.0)
minRespawnRadius=1000.0

# The maximum radius from the previous respawn the player will
# respawn at if they have died within 20 mins. (Default: 100.0)
quickRespawnRadius=100.0

## Respawn Multipliers ##

# Multiplier after activating a Nether portal. (Default: 1.5)
netherMultiplier=1.5

# Multiplier after summoning a Wither. (Default: 2.0)
witherMultiplier=2.0

# Multiplier after activating a End portal. (Default: 4.0)
endMultiplier=4.0

# Multiplier for the Large Biomes world type. (Default: 4.0)
largeMultiplier=4.0

## Structure Generation ##

# Villages within this radius from spawn will be abandoned. (Default: 2250.0)
abandonedVillageRadius=2250.0

# Villages within this radius from spawn will be partially abandoned. (Default: 3000.0)
partiallyAbandonedVillageRadius=3000.0

# Temples within this radius from spawn will be looted. (Default: 2250.0)
lootedTempleRadius=2250.0

Re: HC Spawn Config Addon

Posted: Fri Jul 23, 2021 10:49 pm
by EpicAaron
Oh, that is sweet. This is the kind of configuration I wish we had all along.

I particularly like the ability to config the Respawn w/ Friends feature. Doesn't that get disabled after unlocking portal, though? Would it be easy to add a config to keep that around forever?

Re: HC Spawn Config Addon

Posted: Sat Jul 24, 2021 4:56 am
by IssaMe
The respawn with friends feature? I'm assuming you're referring to the quickRespawnRadius option, which is the thing that makes you respawn near your previous respawn location if you had died recently. I don't know if that affects other player's spawns, as I just wanted to get this out in its basic state and hadn't done extensive testing. If you're right though, I might look into it sometime as see what I can do.

Re: HC Spawn Config Addon

Posted: Sat Jul 24, 2021 7:33 am
by Hiracho
it's not the same as that distance :) I'll post some technical details below on where it's located etc
Spoiler
Show
In class FCUtilsHardcore there is a method: HandleHardcoreSpawn
this part is what handles the spawning together. I'm sure you can adapt it to be configurable :)

Code: Select all

    	if ( !FCUtilsWorld.GameProgressHasNetherBeenAccessedServerOnly() )
    	{
    		// early game, players are tied to respawning together
    		
    		FCSpawnLocation recentLocation = newWorld.GetSpawnLocationList().GetMostRecentSpawnLocation();
    		
    		if ( recentLocation != null )
    		{
    			long lDeltaTime = lOverworldTime - recentLocation.m_lSpawnTime;

    			if ( lDeltaTime > 0 && lDeltaTime < FCUtilsHardcoreSpawn.m_iHardcoreSpawnTimeBetweenReassignments )
    			{
    				if ( AssignPlayerToOldSpawnPosWithVariance( newWorld, newPlayer,  
    					new ChunkCoordinates( recentLocation.m_iIPos, recentLocation.m_iJPos, recentLocation.m_iKPos ), 
						recentLocation.m_lSpawnTime ) )
    				{
    					return;
    				}
    			}
    		}
    	}
    	

Re: HC Spawn Config Addon

Posted: Sat Jul 24, 2021 9:56 am
by IssaMe
Hiracho wrote: Sat Jul 24, 2021 7:33 am it's not the same as that distance :) I'll post some technical details below on where it's located etc
Spoiler
Show
In class FCUtilsHardcore there is a method: HandleHardcoreSpawn
this part is what handles the spawning together. I'm sure you can adapt it to be configurable :)

Code: Select all

    	if ( !FCUtilsWorld.GameProgressHasNetherBeenAccessedServerOnly() )
    	{
    		// early game, players are tied to respawning together
    		
    		FCSpawnLocation recentLocation = newWorld.GetSpawnLocationList().GetMostRecentSpawnLocation();
    		
    		if ( recentLocation != null )
    		{
    			long lDeltaTime = lOverworldTime - recentLocation.m_lSpawnTime;

    			if ( lDeltaTime > 0 && lDeltaTime < FCUtilsHardcoreSpawn.m_iHardcoreSpawnTimeBetweenReassignments )
    			{
    				if ( AssignPlayerToOldSpawnPosWithVariance( newWorld, newPlayer,  
    					new ChunkCoordinates( recentLocation.m_iIPos, recentLocation.m_iJPos, recentLocation.m_iKPos ), 
						recentLocation.m_lSpawnTime ) )
    				{
    					return;
    				}
    			}
    		}
    	}
    	
Ah wow nice thank you!

Re: HC Spawn Config Addon

Posted: Thu Aug 12, 2021 2:05 am
by IssaMe
Updated the addon to contain the following config options:
Spoiler
Show

Code: Select all

maxSpawnTime
quickRespawnHealth
quickRespawnMinFood
quickRespawnFoodDecrement
hcSoulMatingProgression
deathDespawnTime
More information on what these do can be viewed in the config file.

Re: HC Spawn Config Addon

Posted: Fri Aug 27, 2021 3:24 pm
by EpicAaron
IssaMe wrote: Thu Aug 12, 2021 2:05 am Updated the addon to contain the following config options:
Spoiler
Show

Code: Select all

maxSpawnTime
quickRespawnHealth
quickRespawnMinFood
quickRespawnFoodDecrement
hcSoulMatingProgression
deathDespawnTime
More information on what these do can be viewed in the config file.
Great config options.
:)
Hoping to get a vanilla BTW easy mode server up sometime this year to introduce some friends to the mod.

Re: HC Spawn Config Addon

Posted: Fri Aug 27, 2021 5:37 pm
by IssaMe
Thanks, that’s exactly what it’s for :)

Re: HC Spawn Config Addon

Posted: Sat Oct 23, 2021 6:47 pm
by jackatthekilns
I have run the game with this mod checked in MultiMC a couple of times and there is not .cfg file in the config folder. Any idea what I might be doing wrong?

Re: HC Spawn Config Addon

Posted: Sat Oct 23, 2021 7:33 pm
by IssaMe
I've not updated this addon to BTW CE yet :P

Re: HC Spawn Config Addon

Posted: Sat Oct 23, 2021 8:16 pm
by jackatthekilns
ah. that will do it every time.

Re: HC Spawn Config Addon

Posted: Wed Oct 27, 2021 8:41 pm
by IssaMe
Updated to BTW CE v1.2.1

Re: HC Spawn Config Addon

Posted: Thu Oct 28, 2021 6:01 am
by jackatthekilns
Awesome! Thanks so much

Re: HC Spawn Config Addon

Posted: Tue Dec 07, 2021 8:48 pm
by IssaMe
Updated to BTW CE v1.3.0

Re: [Fabric] Tweaker Addon v1.3.0

Posted: Sat Sep 03, 2022 12:31 am
by IssaMe
Updated to use Fabric!
Worlds now use the config as default, and further changes specific to each world can be done through commands (so you can have worlds with different spawn radiuses if you want for example).
Also added the option to turn off fires from lightning.

Re: [Fabric] Tweaker Addon v1.3.0

Posted: Sun Sep 04, 2022 3:13 am
by Umekobucha
I can't seem to install it.
The error text is as follows
Spoiler
Show

Code: Select all

...Add-On Handler Initializing...
Classloader: sun.misc.Launcher$AppClassLoader
Minecraft jar found: jar:file:/E:/Game/MultiMC/instances/1.5.2BTW/.minecraft/bin/minecraft.jar!/
java.lang.NoClassDefFoundError: net/minecraft/src/FCAddOn
	at java.lang.ClassLoader.defineClass1(Native Method)
	at java.lang.ClassLoader.defineClass(Unknown Source)
	at java.security.SecureClassLoader.defineClass(Unknown Source)
	at java.net.URLClassLoader.defineClass(Unknown Source)
	at java.net.URLClassLoader.access$100(Unknown Source)
	at java.net.URLClassLoader$1.run(Unknown Source)
	at java.net.URLClassLoader$1.run(Unknown Source)
	at java.security.AccessController.doPrivileged(Native Method)
	at java.net.URLClassLoader.findClass(Unknown Source)
	at java.lang.ClassLoader.loadClass(Unknown Source)
	at sun.misc.Launcher$AppClassLoader.loadClass(Unknown Source)
	at java.lang.ClassLoader.loadClass(Unknown Source)
	at java.lang.ClassLoader.loadClass(Unknown Source)
	at FCAddOnHandler.loadClasses(FCAddOnHandler.java:136)
	at FCAddOnHandler.loadJarClasses(FCAddOnHandler.java:115)
	at FCAddOnHandler.loadAddOns(FCAddOnHandler.java:162)
	at FCAddOnHandler.InitializeMods(FCAddOnHandler.java:172)
	at net.minecraft.client.Minecraft.<init>(Minecraft.java:308)
	at avv.<init>(SourceFile:38)
	at net.minecraft.client.MinecraftApplet.init(SourceFile:38)
	at net.minecraft.Launcher.init(Launcher.java:109)
	at org.multimc.LegacyFrame.start(LegacyFrame.java:130)
	at org.multimc.onesix.OneSixLauncher.legacyLaunch(OneSixLauncher.java:131)
	at org.multimc.onesix.OneSixLauncher.launch(OneSixLauncher.java:240)
	at org.multimc.EntryPoint.listen(EntryPoint.java:143)
	at org.multimc.EntryPoint.main(EntryPoint.java:34)
Caused by: java.lang.ClassNotFoundException: net.minecraft.src.FCAddOn
	at java.net.URLClassLoader.findClass(Unknown Source)
	at java.lang.ClassLoader.loadClass(Unknown Source)
	at sun.misc.Launcher$AppClassLoader.loadClass(Unknown Source)
	at java.lang.ClassLoader.loadClass(Unknown Source)
	... 26 more
java.lang.NoClassDefFoundError: net/minecraft/src/FCAddOnUtilsWorldData
	at java.lang.ClassLoader.defineClass1(Native Method)
	at java.lang.ClassLoader.defineClass(Unknown Source)
	at java.security.SecureClassLoader.defineClass(Unknown Source)
	at java.net.URLClassLoader.defineClass(Unknown Source)
	at java.net.URLClassLoader.access$100(Unknown Source)
	at java.net.URLClassLoader$1.run(Unknown Source)
	at java.net.URLClassLoader$1.run(Unknown Source)
	at java.security.AccessController.doPrivileged(Native Method)
	at java.net.URLClassLoader.findClass(Unknown Source)
	at java.lang.ClassLoader.loadClass(Unknown Source)
	at sun.misc.Launcher$AppClassLoader.loadClass(Unknown Source)
	at java.lang.ClassLoader.loadClass(Unknown Source)
	at java.lang.ClassLoader.loadClass(Unknown Source)
	at FCAddOnHandler.loadClasses(FCAddOnHandler.java:136)
	at FCAddOnHandler.loadJarClasses(FCAddOnHandler.java:115)
	at FCAddOnHandler.loadAddOns(FCAddOnHandler.java:162)
	at FCAddOnHandler.InitializeMods(FCAddOnHandler.java:172)
	at net.minecraft.client.Minecraft.<init>(Minecraft.java:308)
	at avv.<init>(SourceFile:38)
	at net.minecraft.client.MinecraftApplet.init(SourceFile:38)
	at net.minecraft.Launcher.init(Launcher.java:109)
	at org.multimc.LegacyFrame.start(LegacyFrame.java:130)
	at org.multimc.onesix.OneSixLauncher.legacyLaunch(OneSixLauncher.java:131)
	at org.multimc.onesix.OneSixLauncher.launch(OneSixLauncher.java:240)
	at org.multimc.EntryPoint.listen(EntryPoint.java:143)
	at org.multimc.EntryPoint.main(EntryPoint.java:34)
Caused by: java.lang.ClassNotFoundException: net.minecraft.src.FCAddOnUtilsWorldData
	at java.net.URLClassLoader.findClass(Unknown Source)
	at java.lang.ClassLoader.loadClass(Unknown Source)
	at sun.misc.Launcher$AppClassLoader.loadClass(Unknown Source)
	at java.lang.ClassLoader.loadClass(Unknown Source)
	... 26 more
java.lang.NoClassDefFoundError: net/fabricmc/loader/api/entrypoint/PreLaunchEntrypoint
	at java.lang.ClassLoader.defineClass1(Native Method)
	at java.lang.ClassLoader.defineClass(Unknown Source)
	at java.security.SecureClassLoader.defineClass(Unknown Source)
	at java.net.URLClassLoader.defineClass(Unknown Source)
	at java.net.URLClassLoader.access$100(Unknown Source)
	at java.net.URLClassLoader$1.run(Unknown Source)
	at java.net.URLClassLoader$1.run(Unknown Source)
	at java.security.AccessController.doPrivileged(Native Method)
	at java.net.URLClassLoader.findClass(Unknown Source)
	at java.lang.ClassLoader.loadClass(Unknown Source)
	at sun.misc.Launcher$AppClassLoader.loadClass(Unknown Source)
	at java.lang.ClassLoader.loadClass(Unknown Source)
	at java.lang.ClassLoader.loadClass(Unknown Source)
	at FCAddOnHandler.loadClasses(FCAddOnHandler.java:136)
	at FCAddOnHandler.loadJarClasses(FCAddOnHandler.java:115)
	at FCAddOnHandler.loadAddOns(FCAddOnHandler.java:162)
	at FCAddOnHandler.InitializeMods(FCAddOnHandler.java:172)
	at net.minecraft.client.Minecraft.<init>(Minecraft.java:308)
	at avv.<init>(SourceFile:38)
	at net.minecraft.client.MinecraftApplet.init(SourceFile:38)
	at net.minecraft.Launcher.init(Launcher.java:109)
	at org.multimc.LegacyFrame.start(LegacyFrame.java:130)
	at org.multimc.onesix.OneSixLauncher.legacyLaunch(OneSixLauncher.java:131)
	at org.multimc.onesix.OneSixLauncher.launch(OneSixLauncher.java:240)
	at org.multimc.EntryPoint.listen(EntryPoint.java:143)
	at org.multimc.EntryPoint.main(EntryPoint.java:34)
Caused by: java.lang.ClassNotFoundException: net.fabricmc.loader.api.entrypoint.PreLaunchEntrypoint
	at java.net.URLClassLoader.findClass(Unknown Source)
	at java.lang.ClassLoader.loadClass(Unknown Source)
	at sun.misc.Launcher$AppClassLoader.loadClass(Unknown Source)
	at java.lang.ClassLoader.loadClass(Unknown Source)
	... 26 more
java.lang.NoClassDefFoundError: net/minecraft/class_955
	at java.lang.ClassLoader.defineClass1(Native Method)
	at java.lang.ClassLoader.defineClass(Unknown Source)
	at java.security.SecureClassLoader.defineClass(Unknown Source)
	at java.net.URLClassLoader.defineClass(Unknown Source)
	at java.net.URLClassLoader.access$100(Unknown Source)
	at java.net.URLClassLoader$1.run(Unknown Source)
	at java.net.URLClassLoader$1.run(Unknown Source)
	at java.security.AccessController.doPrivileged(Native Method)
	at java.net.URLClassLoader.findClass(Unknown Source)
	at java.lang.ClassLoader.loadClass(Unknown Source)
	at sun.misc.Launcher$AppClassLoader.loadClass(Unknown Source)
	at java.lang.ClassLoader.loadClass(Unknown Source)
	at java.lang.ClassLoader.loadClass(Unknown Source)
	at FCAddOnHandler.loadClasses(FCAddOnHandler.java:136)
	at FCAddOnHandler.loadJarClasses(FCAddOnHandler.java:115)
	at FCAddOnHandler.loadAddOns(FCAddOnHandler.java:162)
	at FCAddOnHandler.InitializeMods(FCAddOnHandler.java:172)
	at net.minecraft.client.Minecraft.<init>(Minecraft.java:308)
	at avv.<init>(SourceFile:38)
	at net.minecraft.client.MinecraftApplet.init(SourceFile:38)
	at net.minecraft.Launcher.init(Launcher.java:109)
	at org.multimc.LegacyFrame.start(LegacyFrame.java:130)
	at org.multimc.onesix.OneSixLauncher.legacyLaunch(OneSixLauncher.java:131)
	at org.multimc.onesix.OneSixLauncher.launch(OneSixLauncher.java:240)
	at org.multimc.EntryPoint.listen(EntryPoint.java:143)
	at org.multimc.EntryPoint.main(EntryPoint.java:34)
Caused by: java.lang.ClassNotFoundException: net.minecraft.class_955
	at java.net.URLClassLoader.findClass(Unknown Source)
	at java.lang.ClassLoader.loadClass(Unknown Source)
	at sun.misc.Launcher$AppClassLoader.loadClass(Unknown Source)
	at java.lang.ClassLoader.loadClass(Unknown Source)
	... 26 more

Re: [Fabric] Tweaker Addon v1.3.0

Posted: Sun Sep 04, 2022 6:22 pm
by IssaMe
This is a Fabric mod, so you need to have Fabric installed. Also you should place the addon into the `/mods/` folder.

Re: [Fabric] Tweaker Addon v1.3.0

Posted: Sun Sep 04, 2022 6:46 pm
by dawnraider
Do we have something on the forums for how to install fabric for BTW? I feel like that's something we should have pinned.

Re: [Fabric] Tweaker Addon v1.3.0

Posted: Sun Sep 04, 2022 7:53 pm
by IssaMe
The closest thing we have is this, but it's under an unrelated heading and not really linked anywhere else.

Re: [Fabric] Tweaker Addon v1.3.0

Posted: Sun Sep 04, 2022 10:03 pm
by EpicAaron
As far as I am aware, the only way to install Fabric is to use the pre-configured MultiMC instance. Additional mods need to be installed on top of that.

Re: [Fabric] Tweaker Addon v1.4.0

Posted: Sat Jan 21, 2023 3:25 am
by IssaMe
Updated to be compatible with BTW CE v2.0!

Re: [Fabric] Tweaker Addon v1.4.0

Posted: Sat Nov 04, 2023 7:50 pm
by CrimsonStorm
Hi IssaMe! Do you have any plans to update this for BTW CE 2.1+? I currently get this error message when trying to use Tweaker 1.4.0 with CE 2.1.3:

https://pastebin.com/LBf8PcLc

Re: [Fabric] Tweaker Addon v1.4.0

Posted: Sat Nov 04, 2023 9:18 pm
by IssaMe
I plan on getting around to it eventually, but probably not anytime soon. You or anyone else is welcome to make a pull request on GitHub though!
I'm not sure how the new difficulty option system works, but I'm thinking it might be nice to utilise those changes.