Skip to content

Commit

Permalink
Only drop temperature in tropical biomes during mid wet season if the…
Browse files Browse the repository at this point in the history
… default temperature is hot
  • Loading branch information
Forstride committed Jan 7, 2024
1 parent 67860c6 commit fcd979f
Show file tree
Hide file tree
Showing 19 changed files with 57 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,8 @@
import com.mojang.serialization.MapCodec;
import net.minecraft.core.BlockPos;
import net.minecraft.core.Direction;
import net.minecraft.core.particles.ParticleTypes;
import net.minecraft.util.RandomSource;
import net.minecraft.world.InteractionHand;
import net.minecraft.world.InteractionResult;
import net.minecraft.world.entity.player.Player;
Expand All @@ -23,7 +25,6 @@
import net.minecraft.world.phys.BlockHitResult;
import toughasnails.api.blockentity.TANBlockEntityTypes;
import toughasnails.block.entity.ThermoregulatorBlockEntity;
import toughasnails.block.entity.WaterPurifierBlockEntity;

import javax.annotation.Nullable;
import java.util.function.ToIntFunction;
Expand Down Expand Up @@ -110,4 +111,33 @@ public RenderShape getRenderShape(BlockState state)
{
return RenderShape.MODEL;
}

/*@Override
public void animateTick(BlockState p_221253_, Level p_221254_, BlockPos p_221255_, RandomSource p_221256_)
{
boolean cooling = p_221253_.getValue(COOLING);
boolean heating = p_221253_.getValue(HEATING);
if (cooling || heating)
{
double d0 = (double)p_221255_.getX() + 0.5D;
double d1 = (double)p_221255_.getY() + 0.5D;
double d2 = (double)p_221255_.getZ() + 0.5D;
Direction direction = p_221253_.getValue(FACING);
Direction.Axis direction$axis = direction.getAxis();
double d4 = (p_221256_.nextDouble() * 0.3D) - (p_221256_.nextDouble() * 0.3D);
double d5 = direction$axis == Direction.Axis.X ? (double)direction.getStepX() * 0.55D : d4;
double d6 = direction$axis == Direction.Axis.Z ? (double)direction.getStepZ() * 0.55D : d4;
double ymove = (p_221256_.nextDouble() * 0.05D) - (p_221256_.nextDouble() * 0.05D);
double xmove = direction$axis == Direction.Axis.X ? (double)direction.getStepX() * 0.15D : ymove;
double zmove = direction$axis == Direction.Axis.Z ? (double)direction.getStepZ() * 0.15D : ymove;
p_221254_.addParticle(ParticleTypes.CAMPFIRE_COSY_SMOKE, d0 + d5, d1 + d4, d2 + d6, xmove, ymove, zmove);
if (cooling && p_221256_.nextInt(6) == 0) { p_221254_.addParticle(ParticleTypes.SNOWFLAKE, d0 + d5, d1 + d6, d2 + d6, xmove, ymove, zmove); }
if (heating && p_221256_.nextInt(6) == 0) { p_221254_.addParticle(ParticleTypes.SMALL_FLAME, d0 + d5, d1 + d6, d2 + d6, xmove, ymove, zmove); }
}
}*/
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
{
"textures": [
"toughasnails:cooling_0",
"toughasnails:cooling_1",
"toughasnails:cooling_2",
"toughasnails:cooling_3"
]
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
{
"textures": [
"toughasnails:heating_0",
"toughasnails:heating_1",
"toughasnails:heating_2",
"toughasnails:heating_3"
]
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
{
"textures": [
"toughasnails:vapor_0",
"toughasnails:vapor_1",
"toughasnails:vapor_2",
"toughasnails:vapor_3"
]
}
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,8 @@ private static TemperatureLevel seasonModifier(Level level, BlockPos pos, Temper
break;

case MID_WET:
current = current.decrement(1);
if (current == TemperatureLevel.HOT)
current = current.decrement(1);
break;
}

Expand Down

0 comments on commit fcd979f

Please sign in to comment.