Updates
Update steam particles Improved engine fix cogwheel
|
@ -1,2 +1,4 @@
|
||||||
2.0.2-alpha:
|
2.0.3-alpha:
|
||||||
- Update to support Minecraft 1.18.2, Create 0.4.1, Flywheel 0.6.2, and Forge 40.0.0
|
- Updated Steam particles
|
||||||
|
- Improved Steam Engine Logics
|
||||||
|
- Fix cogwheels' breaking particles
|
|
@ -4,7 +4,7 @@ org.gradle.jvmargs=-Xmx3G
|
||||||
org.gradle.daemon=false
|
org.gradle.daemon=false
|
||||||
|
|
||||||
# mod version info
|
# mod version info
|
||||||
mod_version = 2.0.2-alpha
|
mod_version = 2.0.3-alpha
|
||||||
minecraft_version = 1.18.2
|
minecraft_version = 1.18.2
|
||||||
forge_version = 40.0.34
|
forge_version = 40.0.34
|
||||||
|
|
||||||
|
|
|
@ -35,8 +35,13 @@ public class ParticleBase extends TextureSheetParticle {
|
||||||
|
|
||||||
public ParticleBase(ClientLevel world, double x, double y, double z, double motionX, double motionY, double motionZ) {
|
public ParticleBase(ClientLevel world, double x, double y, double z, double motionX, double motionY, double motionZ) {
|
||||||
super(world, x, y, z, motionX, motionY, motionZ);
|
super(world, x, y, z, motionX, motionY, motionZ);
|
||||||
|
this.xd*=1.25;
|
||||||
|
this.yd*=1.25;
|
||||||
|
this.zd*=1.25;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
public ParticleRenderType getRenderType() {
|
public ParticleRenderType getRenderType() {
|
||||||
return ParticleRenderType.PARTICLE_SHEET_TRANSLUCENT;
|
return ParticleRenderType.PARTICLE_SHEET_TRANSLUCENT;
|
||||||
}
|
}
|
||||||
|
@ -46,8 +51,8 @@ public class ParticleBase extends TextureSheetParticle {
|
||||||
float age = (this.age + pt) / lifetime * 32.0F;
|
float age = (this.age + pt) / lifetime * 32.0F;
|
||||||
|
|
||||||
age = Mth.clamp(age, 0.0F, 1.0F);
|
age = Mth.clamp(age, 0.0F, 1.0F);
|
||||||
|
super.alpha=Mth.clamp(1-(this.age + pt) / lifetime, 0.0F, 1.0F);
|
||||||
super.quadSize = originalScale * age;
|
super.quadSize = originalScale*(age+this.age*0.0375F);
|
||||||
super.render(worldRendererIn, entityIn, pt);
|
super.render(worldRendererIn, entityIn, pt);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -58,7 +63,6 @@ public class ParticleBase extends TextureSheetParticle {
|
||||||
if (age >= lifetime)
|
if (age >= lifetime)
|
||||||
super.remove();
|
super.remove();
|
||||||
this.age++;
|
this.age++;
|
||||||
|
|
||||||
this.yd -= 0.04D * gravity;
|
this.yd -= 0.04D * gravity;
|
||||||
move(xd,yd, zd);
|
move(xd,yd, zd);
|
||||||
|
|
||||||
|
@ -66,7 +70,6 @@ public class ParticleBase extends TextureSheetParticle {
|
||||||
this.xd *= 1.1D;
|
this.xd *= 1.1D;
|
||||||
this.zd *= 1.1D;
|
this.zd *= 1.1D;
|
||||||
}
|
}
|
||||||
|
|
||||||
this.xd *= 0.96D;
|
this.xd *= 0.96D;
|
||||||
this.yd *= 0.96D;
|
this.yd *= 0.96D;
|
||||||
this.zd *= 0.96D;
|
this.zd *= 0.96D;
|
||||||
|
|
|
@ -28,10 +28,10 @@ public class SteamParticle extends ParticleBase {
|
||||||
|
|
||||||
public SteamParticle(ClientLevel world, double x, double y, double z, double motionX, double motionY, double motionZ) {
|
public SteamParticle(ClientLevel world, double x, double y, double z, double motionX, double motionY, double motionZ) {
|
||||||
super(world, x, y, z, motionX, motionY, motionZ);
|
super(world, x, y, z, motionX, motionY, motionZ);
|
||||||
this.gravity = -0.1F;
|
this.gravity = -0.05F;
|
||||||
this.rCol = this.gCol = this.bCol = (float) (Math.random() * 0.4) + 0.4f;
|
this.rCol = this.gCol = this.bCol = (float) (Math.random() * 0.2) + 0.8f;
|
||||||
this.originalScale = 0.25F;
|
this.originalScale = 0.25F;
|
||||||
this.lifetime= (int) (12.0D / (Math.random() * 0.8D + 0.2D));
|
this.lifetime= (int) (80.0D / (Math.random() * 0.2D + 0.8D));
|
||||||
}
|
}
|
||||||
|
|
||||||
public static class Factory implements ParticleProvider<SimpleParticleType> {
|
public static class Factory implements ParticleProvider<SimpleParticleType> {
|
||||||
|
|
|
@ -89,7 +89,7 @@ public abstract class BoilerBlock extends Block implements LiquidBlockContainer
|
||||||
double d2 = p_180655_3_.getZ();
|
double d2 = p_180655_3_.getZ();
|
||||||
//if(p_180655_4_.nextDouble()<0.5D) {
|
//if(p_180655_4_.nextDouble()<0.5D) {
|
||||||
p_180655_2_.playLocalSound(d0, d1, d2, SoundEvents.FIRE_EXTINGUISH, SoundSource.BLOCKS, 0.25F, 0.25F, false);
|
p_180655_2_.playLocalSound(d0, d1, d2, SoundEvents.FIRE_EXTINGUISH, SoundSource.BLOCKS, 0.25F, 0.25F, false);
|
||||||
int count=4;
|
int count=8;
|
||||||
while(--count!=0)
|
while(--count!=0)
|
||||||
p_180655_2_.addParticle(Particles.STEAM.get(), d0+p_180655_4_.nextFloat(), d1, d2+p_180655_4_.nextFloat(), 0.0D, 0.0D, 0.0D);
|
p_180655_2_.addParticle(Particles.STEAM.get(), d0+p_180655_4_.nextFloat(), d1, d2+p_180655_4_.nextFloat(), 0.0D, 0.0D, 0.0D);
|
||||||
//}
|
//}
|
||||||
|
|
|
@ -31,12 +31,10 @@ import net.minecraft.core.Direction;
|
||||||
import net.minecraft.nbt.CompoundTag;
|
import net.minecraft.nbt.CompoundTag;
|
||||||
import net.minecraft.network.chat.Component;
|
import net.minecraft.network.chat.Component;
|
||||||
import net.minecraft.network.chat.TranslatableComponent;
|
import net.minecraft.network.chat.TranslatableComponent;
|
||||||
import net.minecraft.tags.TagKey;
|
|
||||||
import net.minecraft.world.level.block.Block;
|
import net.minecraft.world.level.block.Block;
|
||||||
import net.minecraft.world.level.block.entity.BlockEntity;
|
import net.minecraft.world.level.block.entity.BlockEntity;
|
||||||
import net.minecraft.world.level.block.entity.BlockEntityType;
|
import net.minecraft.world.level.block.entity.BlockEntityType;
|
||||||
import net.minecraft.world.level.block.state.BlockState;
|
import net.minecraft.world.level.block.state.BlockState;
|
||||||
import net.minecraft.world.level.material.Fluid;
|
|
||||||
import net.minecraftforge.common.capabilities.Capability;
|
import net.minecraftforge.common.capabilities.Capability;
|
||||||
import net.minecraftforge.common.util.LazyOptional;
|
import net.minecraftforge.common.util.LazyOptional;
|
||||||
import net.minecraftforge.fluids.capability.CapabilityFluidHandler;
|
import net.minecraftforge.fluids.capability.CapabilityFluidHandler;
|
||||||
|
@ -70,28 +68,38 @@ public abstract class SteamEngineTileEntity extends EngineTileEntity implements
|
||||||
if (level != null && !level.isClientSide) {
|
if (level != null && !level.isClientSide) {
|
||||||
BlockState state = this.level.getBlockState(this.worldPosition);
|
BlockState state = this.level.getBlockState(this.worldPosition);
|
||||||
if (this.poweredWheel == null || this.poweredWheel.isRemoved()) {
|
if (this.poweredWheel == null || this.poweredWheel.isRemoved()) {
|
||||||
this.level.setBlockAndUpdate(this.worldPosition, state.setValue(SteamEngineBlock.LIT, false));
|
|
||||||
|
this.appliedCapacity = 0;
|
||||||
|
this.appliedSpeed = 0;
|
||||||
this.refreshWheelSpeed();
|
this.refreshWheelSpeed();
|
||||||
heatup = 0;
|
heatup = 0;
|
||||||
tank.drain(this.getSteamConsumptionPerTick(), IFluidHandler.FluidAction.EXECUTE);
|
tank.drain(this.getSteamConsumptionPerTick(), IFluidHandler.FluidAction.EXECUTE);
|
||||||
|
this.level.setBlockAndUpdate(this.worldPosition, state.setValue(SteamEngineBlock.LIT, false));
|
||||||
} else {
|
} else {
|
||||||
|
if(heatup==0&&tank.getFluidAmount()<=this.getSteamConsumptionPerTick()*20) {
|
||||||
|
this.level.sendBlockUpdated(this.getBlockPos(), this.getBlockState(), this.getBlockState(), 3);
|
||||||
|
this.setChanged();
|
||||||
|
return;
|
||||||
|
}
|
||||||
if (!tank.isEmpty() && tank.drain(this.getSteamConsumptionPerTick(), IFluidHandler.FluidAction.EXECUTE)
|
if (!tank.isEmpty() && tank.drain(this.getSteamConsumptionPerTick(), IFluidHandler.FluidAction.EXECUTE)
|
||||||
.getAmount() >= this.getSteamConsumptionPerTick()) {
|
.getAmount() >= this.getSteamConsumptionPerTick()) {
|
||||||
this.level.setBlockAndUpdate(this.worldPosition, state.setValue(SteamEngineBlock.LIT, true));
|
|
||||||
if (heatup >= 60) {
|
if (heatup >= 60) {
|
||||||
this.appliedCapacity = this.getGeneratingCapacity();
|
this.appliedCapacity = this.getGeneratingCapacity();
|
||||||
this.appliedSpeed = this.getGeneratingSpeed();
|
this.appliedSpeed = this.getGeneratingSpeed();
|
||||||
this.refreshWheelSpeed();
|
this.refreshWheelSpeed();
|
||||||
} else
|
} else
|
||||||
heatup++;
|
heatup++;
|
||||||
|
this.level.setBlockAndUpdate(this.worldPosition, state.setValue(SteamEngineBlock.LIT, true));
|
||||||
} else {
|
} else {
|
||||||
if (heatup > 0)
|
if (heatup > 0)
|
||||||
heatup--;
|
heatup--;
|
||||||
this.level.setBlockAndUpdate(this.worldPosition, state.setValue(SteamEngineBlock.LIT, false));
|
|
||||||
this.appliedCapacity = 0;
|
this.appliedCapacity = 0;
|
||||||
this.appliedSpeed = 0;
|
this.appliedSpeed = 0;
|
||||||
this.refreshWheelSpeed();
|
this.refreshWheelSpeed();
|
||||||
|
this.level.setBlockAndUpdate(this.worldPosition, state.setValue(SteamEngineBlock.LIT, false));
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
this.level.sendBlockUpdated(this.getBlockPos(), this.getBlockState(), this.getBlockState(), 3);
|
this.level.sendBlockUpdated(this.getBlockPos(), this.getBlockState(), this.getBlockState(), 3);
|
||||||
this.setChanged();
|
this.setChanged();
|
||||||
|
|
|
@ -5,7 +5,7 @@
|
||||||
"textures": {
|
"textures": {
|
||||||
"0": "create:block/axis",
|
"0": "create:block/axis",
|
||||||
"3": "create:block/axis_top",
|
"3": "create:block/axis_top",
|
||||||
"particle": "block/stripped_spruce_log",
|
"particle": "steampowered:block/cogwheel/bronze_cogwheel",
|
||||||
"1_2": "steampowered:block/cogwheel/bronze_cogwheel"
|
"1_2": "steampowered:block/cogwheel/bronze_cogwheel"
|
||||||
},
|
},
|
||||||
"elements": [
|
"elements": [
|
||||||
|
|
|
@ -5,7 +5,7 @@
|
||||||
"textures": {
|
"textures": {
|
||||||
"0": "create:block/axis",
|
"0": "create:block/axis",
|
||||||
"3": "create:block/axis_top",
|
"3": "create:block/axis_top",
|
||||||
"particle": "block/stripped_spruce_log",
|
"particle": "steampowered:block/cogwheel/bronze_large_cogwheel",
|
||||||
"4": "steampowered:block/cogwheel/bronze_large_cogwheel"
|
"4": "steampowered:block/cogwheel/bronze_large_cogwheel"
|
||||||
},
|
},
|
||||||
"elements": [
|
"elements": [
|
||||||
|
|
|
@ -5,7 +5,7 @@
|
||||||
"textures": {
|
"textures": {
|
||||||
"0": "create:block/axis",
|
"0": "create:block/axis",
|
||||||
"3": "create:block/axis_top",
|
"3": "create:block/axis_top",
|
||||||
"particle": "block/stripped_spruce_log",
|
"particle": "steampowered:block/cogwheel/cast_iron_cogwheel",
|
||||||
"1_2": "steampowered:block/cogwheel/cast_iron_cogwheel"
|
"1_2": "steampowered:block/cogwheel/cast_iron_cogwheel"
|
||||||
},
|
},
|
||||||
"elements": [
|
"elements": [
|
||||||
|
|
|
@ -5,7 +5,7 @@
|
||||||
"textures": {
|
"textures": {
|
||||||
"0": "create:block/axis",
|
"0": "create:block/axis",
|
||||||
"3": "create:block/axis_top",
|
"3": "create:block/axis_top",
|
||||||
"particle": "block/stripped_spruce_log",
|
"particle": "steampowered:block/cogwheel/cast_iron_large_cogwheel",
|
||||||
"4": "steampowered:block/cogwheel/cast_iron_large_cogwheel"
|
"4": "steampowered:block/cogwheel/cast_iron_large_cogwheel"
|
||||||
},
|
},
|
||||||
"elements": [
|
"elements": [
|
||||||
|
|
|
@ -5,7 +5,7 @@
|
||||||
"textures": {
|
"textures": {
|
||||||
"0": "create:block/axis",
|
"0": "create:block/axis",
|
||||||
"3": "create:block/axis_top",
|
"3": "create:block/axis_top",
|
||||||
"particle": "block/stripped_spruce_log",
|
"particle": "steampowered:block/cogwheel/steel_cogwheel",
|
||||||
"1_2": "steampowered:block/cogwheel/steel_cogwheel"
|
"1_2": "steampowered:block/cogwheel/steel_cogwheel"
|
||||||
},
|
},
|
||||||
"elements": [
|
"elements": [
|
||||||
|
|
|
@ -5,7 +5,7 @@
|
||||||
"textures": {
|
"textures": {
|
||||||
"0": "create:block/axis",
|
"0": "create:block/axis",
|
||||||
"3": "create:block/axis_top",
|
"3": "create:block/axis_top",
|
||||||
"particle": "block/stripped_spruce_log",
|
"particle": "steampowered:block/cogwheel/steel_large_cogwheel",
|
||||||
"4": "steampowered:block/cogwheel/steel_large_cogwheel"
|
"4": "steampowered:block/cogwheel/steel_large_cogwheel"
|
||||||
},
|
},
|
||||||
"elements": [
|
"elements": [
|
||||||
|
|
Before Width: | Height: | Size: 106 B After Width: | Height: | Size: 300 B |
Before Width: | Height: | Size: 105 B After Width: | Height: | Size: 296 B |
Before Width: | Height: | Size: 101 B After Width: | Height: | Size: 336 B |
Before Width: | Height: | Size: 106 B After Width: | Height: | Size: 367 B |