~williewillus/violet-moon

This thread contains a patchset. You're looking at the original emails, but you may wish to use the patch review UI. Review patch
4 4

[PATCH botania] Remove general runic altar cooldown

Details
Message ID
<20231101090830.13083-1-theArtemisSystem@gmail.com>
DKIM signature
missing
Download raw message
Patch: +4 -20
Probably predates the cooldown item flag which applies to specific items, and has no real reason to exist anymore, from what i can tell. Also removes the particle effect that plays in the cooldown, it was so subtle that i didn't even know it existed
---
New patch upcoming to address that the specific item cooldown is shorter than the now
removed cooldown
.../block_entity/RunicAltarBlockEntity.java   | 24 ++++---------------
 1 file changed, 4 insertions(+), 20 deletions(-)

diff --git a/Xplat/src/main/java/vazkii/botania/common/block/block_entity/RunicAltarBlockEntity.java b/Xplat/src/main/java/vazkii/botania/common/block/block_entity/RunicAltarBlockEntity.java
index f2c0dd2e8..052a4b7b0 100644
--- a/Xplat/src/main/java/vazkii/botania/common/block/block_entity/RunicAltarBlockEntity.java
+++ b/Xplat/src/main/java/vazkii/botania/common/block/block_entity/RunicAltarBlockEntity.java
@@ -38,7 +38,6 @@
import vazkii.botania.api.recipe.RunicAltarRecipe;
import vazkii.botania.client.core.helper.RenderHelper;
import vazkii.botania.client.fx.SparkleParticleData;
import vazkii.botania.client.fx.WispParticleData;
import vazkii.botania.client.gui.HUDHandler;
import vazkii.botania.common.block.BotaniaBlocks;
import vazkii.botania.common.crafting.BotaniaRecipeTypes;
@@ -60,14 +59,12 @@ public class RunicAltarBlockEntity extends SimpleInventoryBlockEntity implements
	private static final String TAG_MANA = "mana";
	private static final String TAG_MANA_TO_GET = "manaToGet";
	private static final int SET_KEEP_TICKS_EVENT = 0;
	private static final int SET_COOLDOWN_EVENT = 1;
	private static final int CRAFT_EFFECT_EVENT = 2;

	private RunicAltarRecipe currentRecipe;

	public int manaToGet = 0;
	private int mana = 0;
	private int cooldown = 0;
	public int signal = 0;

	private List<ItemStack> lastRecipe = null;
@@ -78,7 +75,7 @@ public RunicAltarBlockEntity(BlockPos pos, BlockState state) {
	}

	public boolean addItem(@Nullable Player player, ItemStack stack, @Nullable InteractionHand hand) {
		if (cooldown > 0 || stack.getItem() instanceof WandOfTheForestItem || stack.is(BotaniaItems.lexicon)) {
		if (stack.getItem() instanceof WandOfTheForestItem || stack.is(BotaniaItems.lexicon)) {
			return false;
		}

@@ -127,9 +124,6 @@ public boolean triggerEvent(int id, int param) {
			case SET_KEEP_TICKS_EVENT:
				recipeKeepTicks = param;
				return true;
			case SET_COOLDOWN_EVENT:
				cooldown = param;
				return true;
			case CRAFT_EFFECT_EVENT: {
				if (level.isClientSide) {
					for (int i = 0; i < 25; i++) {
@@ -148,11 +142,7 @@ public boolean triggerEvent(int id, int param) {
		}
	}

	private void tickCooldown() {
		if (cooldown > 0) {
			cooldown--;
		}

	private void tickRecipeKeep() {
		if (recipeKeepTicks > 0) {
			--recipeKeepTicks;
		} else {
@@ -188,7 +178,7 @@ public static void serverTick(Level level, BlockPos worldPosition, BlockState st
		}

		self.updateRecipe();
		self.tickCooldown();
		self.tickRecipeKeep();
	}

	public static void clientTick(Level level, BlockPos worldPosition, BlockState state, RunicAltarBlockEntity self) {
@@ -197,12 +187,7 @@ public static void clientTick(Level level, BlockPos worldPosition, BlockState st
			Vec3 endVec = vec.add(0, 2.5, 0);
			Proxy.INSTANCE.lightningFX(level, vec, endVec, 2F, 0x00948B, 0x00E4D7);
		}

		if (self.cooldown > 0) {
			WispParticleData data = WispParticleData.wisp(0.2F, 0.2F, 0.2F, 0.2F, 1);
			level.addParticle(data, worldPosition.getX() + Math.random(), worldPosition.getY() + 0.8, worldPosition.getZ() + Math.random(), 0, - -0.025F, 0);
		}
		self.tickCooldown();
		self.tickRecipeKeep();
	}

	private void updateRecipe() {
@@ -283,7 +268,6 @@ public boolean onUsedByWand(@Nullable Player player, ItemStack wand, Direction s
				XplatAbstractions.INSTANCE.itemFlagsComponent(outputItem).markAltarOutput();
				level.addFreshEntity(outputItem);
				currentRecipe = null;
				level.blockEvent(getBlockPos(), BotaniaBlocks.runeAltar, SET_COOLDOWN_EVENT, 60);
				level.blockEvent(getBlockPos(), BotaniaBlocks.runeAltar, CRAFT_EFFECT_EVENT, 0);

				saveLastRecipe();
-- 
2.39.3 (Apple Git-145)

[botania/patches/linux.yml] build success

builds.sr.ht <builds@sr.ht>
Details
Message ID
<CWNDG3D46Z9Q.2IVDNDAYBOKHE@cirno2>
In-Reply-To
<20231101090830.13083-1-theArtemisSystem@gmail.com> (view parent)
DKIM signature
missing
Download raw message
botania/patches/linux.yml: SUCCESS in 22m6s

[Remove general runic altar cooldown][0] from [Artemis System][1]

[0]: https://lists.sr.ht/~williewillus/violet-moon/patches/46302
[1]: theartemissystem@gmail.com

✓ #1086237 SUCCESS botania/patches/linux.yml https://builds.sr.ht/~williewillus/job/1086237
Details
Message ID
<8734xp9u5h.fsf@vincent-lee.net>
In-Reply-To
<20231101090830.13083-1-theArtemisSystem@gmail.com> (view parent)
DKIM signature
missing
Download raw message
Artemis System <theartemissystem@gmail.com> writes:

> Probably predates the cooldown item flag which applies to specific items, and has no real reason to exist anymore, from what i can tell. Also removes the particle effect that plays in the cooldown, it was so subtle that i didn't even know it existed

I'm fine with removing the functional purpose of the cooldown, but I
liked the "smoking" particles as a nice effect. Can we keep that?

> ---
> New patch upcoming to address that the specific item cooldown is shorter than the now
> removed cooldown
> .../block_entity/RunicAltarBlockEntity.java   | 24 ++++---------------
>  1 file changed, 4 insertions(+), 20 deletions(-)
>
> diff --git a/Xplat/src/main/java/vazkii/botania/common/block/block_entity/RunicAltarBlockEntity.java b/Xplat/src/main/java/vazkii/botania/common/block/block_entity/RunicAltarBlockEntity.java
> index f2c0dd2e8..052a4b7b0 100644
> --- a/Xplat/src/main/java/vazkii/botania/common/block/block_entity/RunicAltarBlockEntity.java
> +++ b/Xplat/src/main/java/vazkii/botania/common/block/block_entity/RunicAltarBlockEntity.java
> @@ -38,7 +38,6 @@
>  import vazkii.botania.api.recipe.RunicAltarRecipe;
>  import vazkii.botania.client.core.helper.RenderHelper;
>  import vazkii.botania.client.fx.SparkleParticleData;
> -import vazkii.botania.client.fx.WispParticleData;
>  import vazkii.botania.client.gui.HUDHandler;
>  import vazkii.botania.common.block.BotaniaBlocks;
>  import vazkii.botania.common.crafting.BotaniaRecipeTypes;
> @@ -60,14 +59,12 @@ public class RunicAltarBlockEntity extends SimpleInventoryBlockEntity implements
>  	private static final String TAG_MANA = "mana";
>  	private static final String TAG_MANA_TO_GET = "manaToGet";
>  	private static final int SET_KEEP_TICKS_EVENT = 0;
> -	private static final int SET_COOLDOWN_EVENT = 1;
>  	private static final int CRAFT_EFFECT_EVENT = 2;
>  
>  	private RunicAltarRecipe currentRecipe;
>  
>  	public int manaToGet = 0;
>  	private int mana = 0;
> -	private int cooldown = 0;
>  	public int signal = 0;
>  
>  	private List<ItemStack> lastRecipe = null;
> @@ -78,7 +75,7 @@ public RunicAltarBlockEntity(BlockPos pos, BlockState state) {
>  	}
>  
>  	public boolean addItem(@Nullable Player player, ItemStack stack, @Nullable InteractionHand hand) {
> -		if (cooldown > 0 || stack.getItem() instanceof WandOfTheForestItem || stack.is(BotaniaItems.lexicon)) {
> +		if (stack.getItem() instanceof WandOfTheForestItem || stack.is(BotaniaItems.lexicon)) {
>  			return false;
>  		}
>  
> @@ -127,9 +124,6 @@ public boolean triggerEvent(int id, int param) {
>  			case SET_KEEP_TICKS_EVENT:
>  				recipeKeepTicks = param;
>  				return true;
> -			case SET_COOLDOWN_EVENT:
> -				cooldown = param;
> -				return true;
>  			case CRAFT_EFFECT_EVENT: {
>  				if (level.isClientSide) {
>  					for (int i = 0; i < 25; i++) {
> @@ -148,11 +142,7 @@ public boolean triggerEvent(int id, int param) {
>  		}
>  	}
>  
> -	private void tickCooldown() {
> -		if (cooldown > 0) {
> -			cooldown--;
> -		}
> -
> +	private void tickRecipeKeep() {
>  		if (recipeKeepTicks > 0) {
>  			--recipeKeepTicks;
>  		} else {
> @@ -188,7 +178,7 @@ public static void serverTick(Level level, BlockPos worldPosition, BlockState st
>  		}
>  
>  		self.updateRecipe();
> -		self.tickCooldown();
> +		self.tickRecipeKeep();
>  	}
>  
>  	public static void clientTick(Level level, BlockPos worldPosition, BlockState state, RunicAltarBlockEntity self) {
> @@ -197,12 +187,7 @@ public static void clientTick(Level level, BlockPos worldPosition, BlockState st
>  			Vec3 endVec = vec.add(0, 2.5, 0);
>  			Proxy.INSTANCE.lightningFX(level, vec, endVec, 2F, 0x00948B, 0x00E4D7);
>  		}
> -
> -		if (self.cooldown > 0) {
> -			WispParticleData data = WispParticleData.wisp(0.2F, 0.2F, 0.2F, 0.2F, 1);
> -			level.addParticle(data, worldPosition.getX() + Math.random(), worldPosition.getY() + 0.8, worldPosition.getZ() + Math.random(), 0, - -0.025F, 0);
> -		}
> -		self.tickCooldown();
> +		self.tickRecipeKeep();
>  	}
>  
>  	private void updateRecipe() {
> @@ -283,7 +268,6 @@ public boolean onUsedByWand(@Nullable Player player, ItemStack wand, Direction s
>  				XplatAbstractions.INSTANCE.itemFlagsComponent(outputItem).markAltarOutput();
>  				level.addFreshEntity(outputItem);
>  				currentRecipe = null;
> -				level.blockEvent(getBlockPos(), BotaniaBlocks.runeAltar, SET_COOLDOWN_EVENT, 60);
>  				level.blockEvent(getBlockPos(), BotaniaBlocks.runeAltar, CRAFT_EFFECT_EVENT, 0);
>  
>  				saveLastRecipe();

Re: Re: [PATCH botania] Remove general runic altar cooldown

Details
Message ID
<5r6xo2sqqzkbqzgjm4pzhcoz7ehr2vwil7px4lklebsv7yzb5w@u6nlkul6i2rb>
In-Reply-To
<8734xp9u5h.fsf@vincent-lee.net> (view parent)
DKIM signature
missing
Download raw message
On Wed, Nov 01, 2023 at 11:58:03AM -0700, Vincent Lee wrote:
> 
> Artemis System <theartemissystem@gmail.com> writes:
> 
> > Probably predates the cooldown item flag which applies to specific items, and has no real reason to exist anymore, from what i can tell. Also removes the particle effect that plays in the cooldown, it was so subtle that i didn't even know it existed
> 
> I'm fine with removing the functional purpose of the cooldown, but I
> liked the "smoking" particles as a nice effect. Can we keep that?
> 
What do you think, alwinfy? I think it's unnecessary to keep the
cooldown clutter in the already cluttered runic altar block entity file
for a barely noticeable effect that no longer communicates anything
meaningful. Though maybe it could come back in another manner later.
Details
Message ID
<82069f46-9295-4165-9098-5dc878da5c8d@gmail.com>
In-Reply-To
<5r6xo2sqqzkbqzgjm4pzhcoz7ehr2vwil7px4lklebsv7yzb5w@u6nlkul6i2rb> (view parent)
DKIM signature
missing
Download raw message
On 12/29/23 04:50, Artemis System wrote:

 > What do you think, alwinfy? I think it's unnecessary to keep the
 > cooldown clutter in the already cluttered runic altar block entity file
 > for a barely noticeable effect that no longer communicates anything
 > meaningful. Though maybe it could come back in another manner later.
Honestly? I do kind of want to keep the smoke around, myself. I always 
liked the effect even if I didn't realize it was an indicator - I just 
thought it signified that something high-energy had just happened. My 
vote's for keeping it.
Reply to thread Export thread (mbox)