diff --git a/src/main/java/com/drmangotea/tfmg/base/MaterialSet.java b/src/main/java/com/drmangotea/tfmg/base/MaterialSet.java index aa14d8d5..199334d6 100644 --- a/src/main/java/com/drmangotea/tfmg/base/MaterialSet.java +++ b/src/main/java/com/drmangotea/tfmg/base/MaterialSet.java @@ -4,7 +4,6 @@ import com.tterrag.registrate.util.entry.BlockEntry; public class MaterialSet { - public BlockEntry block; public BlockEntry slab; public BlockEntry stairs; diff --git a/src/main/java/com/drmangotea/tfmg/base/TFMGBuilderTransformers.java b/src/main/java/com/drmangotea/tfmg/base/TFMGBuilderTransformers.java index 8440e268..852d89e0 100644 --- a/src/main/java/com/drmangotea/tfmg/base/TFMGBuilderTransformers.java +++ b/src/main/java/com/drmangotea/tfmg/base/TFMGBuilderTransformers.java @@ -8,9 +8,9 @@ import com.drmangotea.tfmg.config.TFMGStress; import com.drmangotea.tfmg.content.decoration.FrameBlock; import com.drmangotea.tfmg.content.decoration.TrussBlock; import com.drmangotea.tfmg.content.decoration.doors.TFMGSlidingDoorBlock; -import com.drmangotea.tfmg.content.decoration.encased.TFMGEncasedCogwheelBlock; -import com.drmangotea.tfmg.content.decoration.encased.TFMGEncasedShaftBlock; -import com.drmangotea.tfmg.content.decoration.flywheels.TFMGFlywheelBlock; +import com.drmangotea.tfmg.content.decoration.kinetics.encased.TFMGEncasedCogwheelBlock; +import com.drmangotea.tfmg.content.decoration.kinetics.encased.TFMGEncasedShaftBlock; +import com.drmangotea.tfmg.content.decoration.kinetics.flywheels.TFMGFlywheelBlock; import com.drmangotea.tfmg.content.electricity.connection.copycat_cable.CopycatCableBlock; import com.drmangotea.tfmg.content.electricity.lights.neon_tube.NeonTubeBlock; import com.drmangotea.tfmg.registry.TFMGBlocks; diff --git a/src/main/java/com/drmangotea/tfmg/base/TFMGCreativeTabs.java b/src/main/java/com/drmangotea/tfmg/base/TFMGCreativeTabs.java index 7899a8e5..8d1d5e59 100644 --- a/src/main/java/com/drmangotea/tfmg/base/TFMGCreativeTabs.java +++ b/src/main/java/com/drmangotea/tfmg/base/TFMGCreativeTabs.java @@ -1,50 +1,26 @@ package com.drmangotea.tfmg.base; -import com.drmangotea.tfmg.TFMG; -import com.drmangotea.tfmg.content.decoration.encased.TFMGEncasedCogwheelBlock; +import com.drmangotea.tfmg.content.decoration.kinetics.encased.TFMGEncasedCogwheelBlock; import com.drmangotea.tfmg.content.machinery.misc.winding_machine.SpoolItem; import com.drmangotea.tfmg.registry.TFMGBlocks; import com.drmangotea.tfmg.registry.TFMGDataComponents; -import com.drmangotea.tfmg.registry.TFMGEncasedBlocks; import com.drmangotea.tfmg.registry.TFMGItems; import com.simibubi.create.*; -import com.simibubi.create.content.contraptions.actors.seat.SeatBlock; -import com.simibubi.create.content.equipment.armor.BacktankUtil; -import com.simibubi.create.content.equipment.toolbox.ToolboxBlock; -import com.simibubi.create.content.kinetics.crank.ValveHandleBlock; -import com.simibubi.create.content.logistics.box.PackageStyles; -import com.simibubi.create.content.logistics.packagePort.postbox.PostboxBlock; -import com.simibubi.create.content.logistics.tableCloth.TableClothBlock; import com.simibubi.create.content.processing.sequenced.SequencedAssemblyItem; import com.simibubi.create.foundation.data.CreateRegistrate; -import com.simibubi.create.foundation.item.TagDependentIngredientItem; -import com.tterrag.registrate.util.entry.BlockEntry; -import com.tterrag.registrate.util.entry.ItemEntry; -import com.tterrag.registrate.util.entry.ItemProviderEntry; import com.tterrag.registrate.util.entry.RegistryEntry; -import it.unimi.dsi.fastutil.objects.*; -import net.createmod.catnip.platform.CatnipServices; -import net.minecraft.client.Minecraft; -import net.minecraft.client.renderer.entity.ItemRenderer; -import net.minecraft.client.resources.model.BakedModel; import net.minecraft.core.registries.Registries; import net.minecraft.nbt.CompoundTag; import net.minecraft.network.chat.Component; import net.minecraft.world.item.*; -import net.minecraft.world.level.block.Block; -import net.neoforged.api.distmarker.Dist; -import net.neoforged.api.distmarker.OnlyIn; import net.neoforged.bus.api.IEventBus; import net.neoforged.neoforge.event.BuildCreativeModeTabContentsEvent; import net.neoforged.neoforge.registries.DeferredHolder; import net.neoforged.neoforge.registries.DeferredRegister; -import org.apache.commons.lang3.mutable.MutableObject; import org.jetbrains.annotations.ApiStatus; import java.util.*; -import java.util.function.Function; -import java.util.function.Predicate; import static com.drmangotea.tfmg.TFMG.MOD_ID; import static com.drmangotea.tfmg.TFMG.REGISTRATE; diff --git a/src/main/java/com/drmangotea/tfmg/base/spark/BlueSpark.java b/src/main/java/com/drmangotea/tfmg/base/spark/BlueSpark.java index 679309b8..acde238a 100644 --- a/src/main/java/com/drmangotea/tfmg/base/spark/BlueSpark.java +++ b/src/main/java/com/drmangotea/tfmg/base/spark/BlueSpark.java @@ -1,120 +1,29 @@ package com.drmangotea.tfmg.base.spark; - - - import com.drmangotea.tfmg.content.items.weapons.explosives.thermite_grenades.fire.BlueFireBlock; -import com.drmangotea.tfmg.registry.TFMGEntityTypes; -import com.drmangotea.tfmg.registry.TFMGItems; -import com.simibubi.create.content.trains.CubeParticleData; import net.minecraft.core.BlockPos; -import net.minecraft.core.particles.ParticleOptions; -import net.minecraft.core.particles.ParticleTypes; -import net.minecraft.network.syncher.SynchedEntityData; -import net.minecraft.world.entity.Entity; import net.minecraft.world.entity.EntityType; -import net.minecraft.world.entity.LivingEntity; -import net.minecraft.world.entity.Mob; -import net.minecraft.world.entity.projectile.ThrowableProjectile; -import net.minecraft.world.item.Item; import net.minecraft.world.level.Level; -import net.minecraft.world.phys.BlockHitResult; -import net.minecraft.world.phys.EntityHitResult; -import net.minecraft.world.phys.HitResult; +import net.minecraft.world.level.block.state.BlockState; -public class BlueSpark extends ThrowableProjectile { - public BlueSpark(EntityType p_37391_, Level p_37392_) { +import java.util.Optional; + +public class BlueSpark extends Spark{ + + public BlueSpark(EntityType p_37391_, Level p_37392_) { super(p_37391_, p_37392_); - } - public BlueSpark(Level p_37399_, LivingEntity p_37400_) { - super(TFMGEntityTypes.SPARK.get(), p_37400_, p_37399_); + @Override + public int getColor() { + return 0x00FFFF; } - public BlueSpark(Level p_37394_, double p_37395_, double p_37396_, double p_37397_) { - super(TFMGEntityTypes.BLUE_SPARK.get(), p_37395_, p_37396_, p_37397_, p_37394_); + public float[] getCustomParticleTrail() { + return new float[]{4.1f, 60.2f, 100.3f}; } @Override - protected double getDefaultGravity() { - return 0.02f; + public Optional getFireState(BlockPos pos) { + return Optional.of(BlueFireBlock.getState(this.level(),pos)); } - - @Override - protected void defineSynchedData(SynchedEntityData.Builder builder) { - - } - - public void tick(){ - super.tick(); - if (this.isInWaterOrRain()) { - this.discard(); - } - if(this.level().isClientSide) { - - CubeParticleData data = - new CubeParticleData(4.1f, 60.2f, 100.3f, .0125f + .0625f * random.nextFloat(), 30, false); - level().addParticle(data, this.getX(), this.getY(), this.getZ(), this.random.nextGaussian() * 0.05D, -this.getDeltaMovement().y * 0.5D, this.random.nextGaussian() * 0.05D); - - } - } - - private ParticleOptions getParticle() { - - return ParticleTypes.FLAME; - } - - public void handleEntityEvent(byte p_37402_) { - if (p_37402_ == 3) { - ParticleOptions particleoptions = this.getParticle(); - - for(int i = 0; i < 8; ++i) { - this.level().addParticle(particleoptions, this.getX(), this.getY(), this.getZ(), 0.0D, 0.0D, 0.0D); - } - } - - } - protected void onHitBlock(BlockHitResult p_37384_) { - super.onHitBlock(p_37384_); - if (!this.level().isClientSide) { - Entity entity = this.getOwner(); - if (!(entity instanceof Mob)) { - BlockPos blockpos = p_37384_.getBlockPos().relative(p_37384_.getDirection()); - if (this.level().isEmptyBlock(blockpos)) { - this.level().setBlockAndUpdate(blockpos, BlueFireBlock.getState(this.level(), blockpos)); - } - } - - } - } - - protected void onHitEntity(EntityHitResult p_37386_) { - super.onHitEntity(p_37386_); - if (!this.level().isClientSide) { - Entity entity = p_37386_.getEntity(); - Entity entity1 = this.getOwner(); - int i = entity.getRemainingFireTicks(); - entity.setRemainingFireTicks(10); - - - } - } - - protected void onHit(HitResult p_37406_) { - super.onHit(p_37406_); - - if (!this.level().isClientSide) { - this.level().broadcastEntityEvent(this, (byte)3); - - - //this.level.explode(this, this.getX(), this.getY(0.0625D), this.getZ(), 2.0F, Explosion.BlockInteraction.NONE); - this.discard(); - } - } - - @SuppressWarnings("unchecked") - public static EntityType.Builder build(EntityType.Builder builder) { - EntityType.Builder entityBuilder = (EntityType.Builder) builder; - return entityBuilder.sized(.25f, .25f); - } -} \ No newline at end of file +} diff --git a/src/main/java/com/drmangotea/tfmg/base/spark/BlueSparkRenderer.java b/src/main/java/com/drmangotea/tfmg/base/spark/BlueSparkRenderer.java deleted file mode 100644 index 21e1921a..00000000 --- a/src/main/java/com/drmangotea/tfmg/base/spark/BlueSparkRenderer.java +++ /dev/null @@ -1,58 +0,0 @@ -package com.drmangotea.tfmg.base.spark; - - -import com.drmangotea.tfmg.TFMG; -import com.mojang.blaze3d.vertex.PoseStack; -import com.mojang.blaze3d.vertex.VertexConsumer; -import com.mojang.math.Axis; -import net.minecraft.client.renderer.MultiBufferSource; -import net.minecraft.client.renderer.RenderType; -import net.minecraft.client.renderer.entity.EntityRenderer; -import net.minecraft.client.renderer.entity.EntityRendererProvider; -import net.minecraft.client.renderer.texture.OverlayTexture; -import net.minecraft.core.BlockPos; -import net.minecraft.resources.ResourceLocation; - - -import net.neoforged.api.distmarker.Dist; -import net.neoforged.api.distmarker.OnlyIn; -import org.joml.Matrix3f; -import org.joml.Matrix4f; - -@OnlyIn(Dist.CLIENT) -public class BlueSparkRenderer extends EntityRenderer { - private static final ResourceLocation TEXTURE_LOCATION = TFMG.asResource("textures/entity/blue_spark.png"); - private static final RenderType RENDER_TYPE = RenderType.entityCutoutNoCull(TEXTURE_LOCATION); - public BlueSparkRenderer(EntityRendererProvider.Context p_173962_) { - super(p_173962_); - } - - protected int getBlockLightLevel(BlueSpark p_114087_, BlockPos p_114088_) { - return 15; - } - - public void render(BlueSpark p_114080_, float p_114081_, float p_114082_, PoseStack p_114083_, MultiBufferSource p_114084_, int p_114085_) { - p_114083_.pushPose(); - p_114083_.scale(0.5F, 0.5F, 0.5F); - p_114083_.mulPose(this.entityRenderDispatcher.cameraOrientation()); - p_114083_.mulPose(Axis.YP.rotationDegrees(180.0F)); - PoseStack.Pose posestack$pose = p_114083_.last(); - Matrix4f matrix4f = posestack$pose.pose(); - Matrix3f matrix3f = posestack$pose.normal(); - VertexConsumer vertexconsumer = p_114084_.getBuffer(RENDER_TYPE); - vertex(vertexconsumer, matrix4f, matrix3f, p_114085_, 0.0F, 0, 0, 1); - vertex(vertexconsumer, matrix4f, matrix3f, p_114085_, 1.0F, 0, 1, 1); - vertex(vertexconsumer, matrix4f, matrix3f, p_114085_, 1.0F, 1, 1, 0); - vertex(vertexconsumer, matrix4f, matrix3f, p_114085_, 0.0F, 1, 0, 0); - p_114083_.popPose(); - super.render(p_114080_, p_114081_, p_114082_, p_114083_, p_114084_, p_114085_); - } - - private static void vertex(VertexConsumer p_114090_, Matrix4f p_114091_, Matrix3f p_114092_, int p_114093_, float p_114094_, int p_114095_, int p_114096_, int p_114097_) { - p_114090_.addVertex(p_114091_, p_114094_ - 0.5F, (float)p_114095_ - 0.25F, 0.0F).setColor(255, 255, 255, 255).setUv((float)p_114096_, (float)p_114097_).setOverlay(OverlayTexture.NO_OVERLAY).setUv2(p_114093_,p_114093_).setNormal( 0.0F, 1.0F, 0.0F); - } - - public ResourceLocation getTextureLocation(BlueSpark p_114078_) { - return TEXTURE_LOCATION; - } -} \ No newline at end of file diff --git a/src/main/java/com/drmangotea/tfmg/base/spark/ElectricSparkParticle.java b/src/main/java/com/drmangotea/tfmg/base/spark/ElectricSparkParticle.java index c79db1d4..56823fd5 100644 --- a/src/main/java/com/drmangotea/tfmg/base/spark/ElectricSparkParticle.java +++ b/src/main/java/com/drmangotea/tfmg/base/spark/ElectricSparkParticle.java @@ -20,6 +20,8 @@ public class ElectricSparkParticle extends CustomRotationParticle { protected int endFrames = 20; protected int totalFrames = 53; + + public ElectricSparkParticle(ClientLevel worldIn, double x, double y, double z, double vx, double vy, double vz, SpriteSet spriteSet, ParticleOptions data) { super(worldIn, x, y, z, spriteSet, 0); diff --git a/src/main/java/com/drmangotea/tfmg/base/spark/GreenSpark.java b/src/main/java/com/drmangotea/tfmg/base/spark/GreenSpark.java index a6e795e6..a32844f1 100644 --- a/src/main/java/com/drmangotea/tfmg/base/spark/GreenSpark.java +++ b/src/main/java/com/drmangotea/tfmg/base/spark/GreenSpark.java @@ -1,108 +1,33 @@ package com.drmangotea.tfmg.base.spark; - - +import com.drmangotea.tfmg.content.items.weapons.explosives.thermite_grenades.fire.BlueFireBlock; import com.drmangotea.tfmg.content.items.weapons.explosives.thermite_grenades.fire.GreenFireBlock; -import com.drmangotea.tfmg.registry.TFMGEntityTypes; -import com.drmangotea.tfmg.registry.TFMGItems; -import com.simibubi.create.content.trains.CubeParticleData; import net.minecraft.core.BlockPos; -import net.minecraft.core.particles.ParticleOptions; -import net.minecraft.core.particles.ParticleTypes; -import net.minecraft.network.syncher.SynchedEntityData; -import net.minecraft.world.entity.Entity; import net.minecraft.world.entity.EntityType; -import net.minecraft.world.entity.LivingEntity; -import net.minecraft.world.entity.Mob; -import net.minecraft.world.entity.projectile.ThrowableProjectile; -import net.minecraft.world.item.Item; import net.minecraft.world.level.Level; -import net.minecraft.world.phys.BlockHitResult; -import net.minecraft.world.phys.EntityHitResult; -import net.minecraft.world.phys.HitResult; +import net.minecraft.world.level.block.state.BlockState; -public class GreenSpark extends ThrowableProjectile { - public GreenSpark(EntityType p_37391_, Level p_37392_) { +import java.util.Optional; + +public class GreenSpark extends Spark{ + + public GreenSpark(EntityType p_37391_, Level p_37392_) { super(p_37391_, p_37392_); } - public GreenSpark(Level p_37399_, LivingEntity p_37400_) { - super(TFMGEntityTypes.SPARK.get(), p_37400_, p_37399_); + + + public float[] getCustomParticleTrail() { + return new float[]{0.01f, 100.25f, 20.1f}; } - public GreenSpark(Level level, double p_37395_, double p_37396_, double p_37397_) { - super(TFMGEntityTypes.SPARK.get(), p_37395_, p_37396_, p_37397_, level); + + @Override + public int getColor() { + return 0x4CFF00; } @Override - protected double getDefaultGravity() { - return 0.02f; + public Optional getFireState(BlockPos pos) { + return Optional.of(GreenFireBlock.getState(this.level(),pos)); } - - @Override - protected void defineSynchedData(SynchedEntityData.Builder builder) { - - } - - public void tick(){ - super.tick(); - if (this.isInWaterOrRain()) { - this.discard(); - } - if(this.level().isClientSide) { - - CubeParticleData data = - new CubeParticleData(0.01f, 100.25f, 20.1f, .0125f + .0625f * random.nextFloat(), 30, true); - level().addParticle(data, this.getX(), this.getY(), this.getZ(), this.random.nextGaussian() * 0.05D, -this.getDeltaMovement().y * 0.5D, this.random.nextGaussian() * 0.05D); - } } - - private ParticleOptions getParticle() { - - return ParticleTypes.FLAME; - } - public void handleEntityEvent(byte p_37402_) { - if (p_37402_ == 3) { - ParticleOptions particleoptions = this.getParticle(); - - for(int i = 0; i < 8; ++i) { - this.level().addParticle(particleoptions, this.getX(), this.getY(), this.getZ(), 0.0D, 0.0D, 0.0D); - } - } - } - protected void onHitBlock(BlockHitResult p_37384_) { - super.onHitBlock(p_37384_); - if (!this.level().isClientSide) { - Entity entity = this.getOwner(); - if (!(entity instanceof Mob)) { - BlockPos blockpos = p_37384_.getBlockPos().relative(p_37384_.getDirection()); - if (this.level().isEmptyBlock(blockpos)) { - this.level().setBlockAndUpdate(blockpos, GreenFireBlock.getState(this.level(), blockpos)); - } - } - - } - } - - protected void onHitEntity(EntityHitResult p_37386_) { - super.onHitEntity(p_37386_); - if (!this.level().isClientSide) { - Entity entity = p_37386_.getEntity(); - entity.setRemainingFireTicks(10); - } - } - - protected void onHit(HitResult p_37406_) { - super.onHit(p_37406_); - if (!this.level().isClientSide) { - this.level().broadcastEntityEvent(this, (byte)3); - this.discard(); - } - - } - - @SuppressWarnings("unchecked") - public static EntityType.Builder build(EntityType.Builder builder) { - EntityType.Builder entityBuilder = (EntityType.Builder) builder; - return entityBuilder.sized(.25f, .25f); - } -} \ No newline at end of file diff --git a/src/main/java/com/drmangotea/tfmg/base/spark/GreenSparkRenderer.java b/src/main/java/com/drmangotea/tfmg/base/spark/GreenSparkRenderer.java deleted file mode 100644 index 4e375855..00000000 --- a/src/main/java/com/drmangotea/tfmg/base/spark/GreenSparkRenderer.java +++ /dev/null @@ -1,58 +0,0 @@ -package com.drmangotea.tfmg.base.spark; - - -import com.drmangotea.tfmg.TFMG; -import com.mojang.blaze3d.vertex.PoseStack; -import com.mojang.blaze3d.vertex.VertexConsumer; -import com.mojang.math.Axis; -import net.minecraft.client.renderer.MultiBufferSource; -import net.minecraft.client.renderer.RenderType; -import net.minecraft.client.renderer.entity.EntityRenderer; -import net.minecraft.client.renderer.entity.EntityRendererProvider; -import net.minecraft.client.renderer.texture.OverlayTexture; -import net.minecraft.core.BlockPos; -import net.minecraft.resources.ResourceLocation; - - -import net.neoforged.api.distmarker.Dist; -import net.neoforged.api.distmarker.OnlyIn; -import org.joml.Matrix3f; -import org.joml.Matrix4f; - -@OnlyIn(Dist.CLIENT) -public class GreenSparkRenderer extends EntityRenderer { - private static final ResourceLocation TEXTURE_LOCATION = TFMG.asResource("textures/entity/green_spark.png"); - private static final RenderType RENDER_TYPE = RenderType.entityCutoutNoCull(TEXTURE_LOCATION); - public GreenSparkRenderer(EntityRendererProvider.Context p_173962_) { - super(p_173962_); - } - - protected int getBlockLightLevel(GreenSpark p_114087_, BlockPos p_114088_) { - return 15; - } - - public void render(GreenSpark p_114080_, float p_114081_, float p_114082_, PoseStack p_114083_, MultiBufferSource p_114084_, int p_114085_) { - p_114083_.pushPose(); - p_114083_.scale(0.5F, 0.5F, 0.5F); - p_114083_.mulPose(this.entityRenderDispatcher.cameraOrientation()); - p_114083_.mulPose(Axis.YP.rotationDegrees(180.0F)); - PoseStack.Pose posestack$pose = p_114083_.last(); - Matrix4f matrix4f = posestack$pose.pose(); - Matrix3f matrix3f = posestack$pose.normal(); - VertexConsumer vertexconsumer = p_114084_.getBuffer(RENDER_TYPE); - vertex(vertexconsumer, matrix4f, matrix3f, p_114085_, 0.0F, 0, 0, 1); - vertex(vertexconsumer, matrix4f, matrix3f, p_114085_, 1.0F, 0, 1, 1); - vertex(vertexconsumer, matrix4f, matrix3f, p_114085_, 1.0F, 1, 1, 0); - vertex(vertexconsumer, matrix4f, matrix3f, p_114085_, 0.0F, 1, 0, 0); - p_114083_.popPose(); - super.render(p_114080_, p_114081_, p_114082_, p_114083_, p_114084_, p_114085_); - } - - private static void vertex(VertexConsumer p_114090_, Matrix4f p_114091_, Matrix3f p_114092_, int p_114093_, float p_114094_, int p_114095_, int p_114096_, int p_114097_) { - p_114090_.addVertex(p_114091_, p_114094_ - 0.5F, (float)p_114095_ - 0.25F, 0.0F).setColor(255, 255, 255, 255).setUv((float)p_114096_, (float)p_114097_).setOverlay(OverlayTexture.NO_OVERLAY).setUv2(p_114093_,p_114093_).setNormal( 0.0F, 1.0F, 0.0F); - } - - public ResourceLocation getTextureLocation(GreenSpark p_114078_) { - return TEXTURE_LOCATION; - } -} \ No newline at end of file diff --git a/src/main/java/com/drmangotea/tfmg/base/spark/LithiumSpark.java b/src/main/java/com/drmangotea/tfmg/base/spark/LithiumSpark.java new file mode 100644 index 00000000..7d8ec35e --- /dev/null +++ b/src/main/java/com/drmangotea/tfmg/base/spark/LithiumSpark.java @@ -0,0 +1,33 @@ +package com.drmangotea.tfmg.base.spark; + +import com.drmangotea.tfmg.content.items.weapons.explosives.thermite_grenades.fire.GreenFireBlock; +import net.minecraft.core.BlockPos; +import net.minecraft.world.entity.EntityType; +import net.minecraft.world.level.Level; +import net.minecraft.world.level.block.state.BlockState; + +import java.util.Optional; + +public class LithiumSpark extends Spark{ + + public LithiumSpark(EntityType p_37391_, Level p_37392_) { + super(p_37391_, p_37392_); + } + + + public float[] getCustomParticleTrail() { + return new float[]{100, 0, 0}; + } + + + @Override + public int getColor() { + return 0xCC0000; + } + + + @Override + public Optional getFireState(BlockPos pos) { + return Optional.empty(); + } +} diff --git a/src/main/java/com/drmangotea/tfmg/base/spark/Spark.java b/src/main/java/com/drmangotea/tfmg/base/spark/Spark.java index bd2b9b34..5ab5693f 100644 --- a/src/main/java/com/drmangotea/tfmg/base/spark/Spark.java +++ b/src/main/java/com/drmangotea/tfmg/base/spark/Spark.java @@ -1,39 +1,56 @@ package com.drmangotea.tfmg.base.spark; -import com.drmangotea.tfmg.registry.TFMGEntityTypes; -import com.drmangotea.tfmg.registry.TFMGItems; +import com.drmangotea.tfmg.registry.TFMGMobEffects; +import com.simibubi.create.content.trains.CubeParticleData; import net.minecraft.core.BlockPos; import net.minecraft.core.particles.ParticleOptions; import net.minecraft.core.particles.ParticleTypes; import net.minecraft.network.syncher.SynchedEntityData; +import net.minecraft.resources.ResourceLocation; +import net.minecraft.util.Mth; +import net.minecraft.world.effect.MobEffectInstance; import net.minecraft.world.entity.Entity; import net.minecraft.world.entity.EntityType; import net.minecraft.world.entity.LivingEntity; import net.minecraft.world.entity.Mob; import net.minecraft.world.entity.projectile.ThrowableProjectile; -import net.minecraft.world.item.Item; import net.minecraft.world.level.Level; import net.minecraft.world.level.block.BaseFireBlock; +import net.minecraft.world.level.block.state.BlockState; import net.minecraft.world.phys.BlockHitResult; import net.minecraft.world.phys.EntityHitResult; import net.minecraft.world.phys.HitResult; +import net.minecraft.world.phys.Vec3; + +import java.util.Optional; public class Spark extends ThrowableProjectile { + + public float gravity = 0.02f; + public Spark(EntityType p_37391_, Level p_37392_) { super(p_37391_, p_37392_); } - public Spark(Level p_37399_, LivingEntity p_37400_) { - super(TFMGEntityTypes.SPARK.get(), p_37400_, p_37399_); - } - public Spark(Level p_37394_, double p_37395_, double p_37396_, double p_37397_) { - super(TFMGEntityTypes.SPARK.get(), p_37395_, p_37396_, p_37397_, p_37394_); - } @Override protected double getDefaultGravity() { - return 0.02f; + return gravity; + } + + public Optional getFireState(BlockPos pos){ + return Optional.of(BaseFireBlock.getState(this.level(), pos)); + } + + + + public float[] getCustomParticleTrail() { + return new float[]{0,0,0}; + } + + public ParticleOptions getTrailParticle(){ + return ParticleTypes.FLAME; } @Override @@ -41,45 +58,71 @@ public class Spark extends ThrowableProjectile { } - public void tick(){ + public void burst(double pX, double pY, double pZ, float pVelocity, float pInaccuracy) { + Vec3 vec3 = (new Vec3(pX, pY, pZ)).normalize().add(this.random.triangle(0.0D, 0.0172275D * (double) pInaccuracy), 0, this.random.triangle(0.0D, 0.0172275D * (double) pInaccuracy)).scale((double) pVelocity); + this.setDeltaMovement(vec3); + double d0 = vec3.horizontalDistance(); + this.setYRot((float) (Mth.atan2(vec3.x, vec3.z) * (double) (180F / (float) Math.PI))); + this.setXRot((float) (Mth.atan2(vec3.y, d0) * (double) (180F / (float) Math.PI))); + this.yRotO = this.getYRot(); + this.xRotO = this.getXRot(); + } + + public void setGravity(float gravity) { + this.gravity = gravity; + } + + + public void tick() { super.tick(); if (this.isInWaterOrRain()) { this.discard(); } - if(this.level().isClientSide) { - this.level().addParticle(ParticleTypes.FLAME, this.getX(), this.getY(), this.getZ(), this.random.nextGaussian() * 0.05D, -this.getDeltaMovement().y * 0.5D, this.random.nextGaussian() * 0.05D); + if (level().isClientSide) { + if (getCustomParticleTrail()[0] == 0 && getCustomParticleTrail()[1] == 0 && getCustomParticleTrail()[2] == 0) { + this.level().addParticle(getTrailParticle(), this.getX(), this.getY(), this.getZ(), this.random.nextGaussian() * 0.05D, -this.getDeltaMovement().y * 0.5D, this.random.nextGaussian() * 0.05D); + } else { + CubeParticleData data = + new CubeParticleData(getCustomParticleTrail()[0], getCustomParticleTrail()[1], getCustomParticleTrail()[2], .0125f + .0625f * random.nextFloat(), 30, true); + level().addParticle(data, this.getX(), this.getY(), this.getZ(), this.random.nextGaussian() * 0.05D, -this.getDeltaMovement().y * 0.5D, this.random.nextGaussian() * 0.05D); + } } + } - protected Item getDefaultItem() { - return TFMGItems.THERMITE_GRENADE.get(); - } + private ParticleOptions getParticle() { - return ParticleTypes.FLAME; + return getTrailParticle(); } public void handleEntityEvent(byte p_37402_) { if (p_37402_ == 3) { ParticleOptions particleoptions = this.getParticle(); - for(int i = 0; i < 8; ++i) { + for (int i = 0; i < 8; ++i) { this.level().addParticle(particleoptions, this.getX(), this.getY(), this.getZ(), 0.0D, 0.0D, 0.0D); } } } + + protected void onHitBlock(BlockHitResult hitResult) { super.onHitBlock(hitResult); if (!this.level().isClientSide) { Entity entity = this.getOwner(); - if (!(entity instanceof Mob) ) { + if (!(entity instanceof Mob)) { BlockPos blockpos = hitResult.getBlockPos().relative(hitResult.getDirection()); - if (this.level().isEmptyBlock(blockpos)) { - this.level().setBlockAndUpdate(blockpos, BaseFireBlock.getState(this.level(), blockpos)); + if (this.level().isEmptyBlock(blockpos)&&getFireState(blockpos).isPresent()) { + this.level().setBlockAndUpdate(blockpos, getFireState(blockpos).get()); } } } } + public int getColor(){ + return 0xFFFF8C; + } + protected void onHitEntity(EntityHitResult p_37386_) { super.onHitEntity(p_37386_); if (!this.level().isClientSide) { @@ -88,6 +131,13 @@ public class Spark extends ThrowableProjectile { if (entity.getRemainingFireTicks() > 0 && !entity.fireImmune()) { entity.hurt(this.damageSources().onFire(), 1.0F); } + if (this instanceof LithiumSpark) + if (entity instanceof LivingEntity) { + + ((LivingEntity) entity).addEffect(new MobEffectInstance(TFMGMobEffects.HELLFIRE, 60)); + + + } } } @@ -95,7 +145,7 @@ public class Spark extends ThrowableProjectile { super.onHit(p_37406_); if (!this.level().isClientSide) { - this.level().broadcastEntityEvent(this, (byte)3); + this.level().broadcastEntityEvent(this, (byte) 3); this.discard(); } } @@ -105,4 +155,7 @@ public class Spark extends ThrowableProjectile { EntityType.Builder entityBuilder = (EntityType.Builder) builder; return entityBuilder.sized(.25f, .25f); } + + + } \ No newline at end of file diff --git a/src/main/java/com/drmangotea/tfmg/base/spark/SparkRenderer.java b/src/main/java/com/drmangotea/tfmg/base/spark/SparkRenderer.java index 48c46ffa..43d7d457 100644 --- a/src/main/java/com/drmangotea/tfmg/base/spark/SparkRenderer.java +++ b/src/main/java/com/drmangotea/tfmg/base/spark/SparkRenderer.java @@ -1,5 +1,6 @@ package com.drmangotea.tfmg.base.spark; +import com.drmangotea.tfmg.TFMG; import com.mojang.blaze3d.vertex.PoseStack; import com.mojang.blaze3d.vertex.VertexConsumer; import com.mojang.math.Axis; @@ -19,36 +20,48 @@ import org.joml.Matrix4f; @OnlyIn(Dist.CLIENT) public class SparkRenderer extends EntityRenderer { - private static final ResourceLocation TEXTURE_LOCATION = ResourceLocation.withDefaultNamespace("textures/particle/lava.png"); + + + + public int color = 0xFFD600; + + + + private static final ResourceLocation TEXTURE_LOCATION = TFMG.asResource("textures/entity/spark.png"); private static final RenderType RENDER_TYPE = RenderType.entityCutoutNoCull(TEXTURE_LOCATION); public SparkRenderer(EntityRendererProvider.Context p_173962_) { super(p_173962_); } - protected int getBlockLightLevel(Spark p_114087_, BlockPos p_114088_) { + protected int getBlockLightLevel(Spark spark, BlockPos pos) { return 15; } - public void render(Spark p_114080_, float p_114081_, float p_114082_, PoseStack p_114083_, MultiBufferSource p_114084_, int p_114085_) { - p_114083_.pushPose(); - p_114083_.scale(0.5F, 0.5F, 0.5F); - p_114083_.mulPose(this.entityRenderDispatcher.cameraOrientation()); - p_114083_.mulPose(Axis.YP.rotationDegrees(180.0F)); - PoseStack.Pose posestack$pose = p_114083_.last(); + public void render(Spark spark, float p_114081_, float p_114082_, PoseStack poseStack, MultiBufferSource bufferSource, int p_114085_) { + poseStack.pushPose(); + poseStack.scale(0.5F, 0.5F, 0.5F); + poseStack.mulPose(this.entityRenderDispatcher.cameraOrientation()); + poseStack.mulPose(Axis.YP.rotationDegrees(180.0F)); + PoseStack.Pose posestack$pose = poseStack.last(); Matrix4f matrix4f = posestack$pose.pose(); Matrix3f matrix3f = posestack$pose.normal(); - VertexConsumer vertexconsumer = p_114084_.getBuffer(RENDER_TYPE); - vertex(vertexconsumer, matrix4f, matrix3f, p_114085_, 0.0F, 0, 0, 1); - vertex(vertexconsumer, matrix4f, matrix3f, p_114085_, 1.0F, 0, 1, 1); - vertex(vertexconsumer, matrix4f, matrix3f, p_114085_, 1.0F, 1, 1, 0); - vertex(vertexconsumer, matrix4f, matrix3f, p_114085_, 0.0F, 1, 0, 0); - p_114083_.popPose(); - super.render(p_114080_, p_114081_, p_114082_, p_114083_, p_114084_, p_114085_); + VertexConsumer vertexconsumer = bufferSource.getBuffer(RENDER_TYPE); + + + + vertex(vertexconsumer, matrix4f, matrix3f, p_114085_, 0.0F, 0, 0, 1,spark.getColor()); + vertex(vertexconsumer, matrix4f, matrix3f, p_114085_, 1.0F, 0, 1, 1,spark.getColor()); + vertex(vertexconsumer, matrix4f, matrix3f, p_114085_, 1.0F, 1, 1, 0,spark.getColor()); + vertex(vertexconsumer, matrix4f, matrix3f, p_114085_, 0.0F, 1, 0, 0,spark.getColor()); + poseStack.popPose(); + super.render(spark, p_114081_, p_114082_, poseStack, bufferSource, p_114085_); } - private static void vertex(VertexConsumer p_114090_, Matrix4f p_114091_, Matrix3f p_114092_, int p_114093_, float p_114094_, int p_114095_, int p_114096_, int p_114097_) { - p_114090_.addVertex(p_114091_, p_114094_ - 0.5F, (float)p_114095_ - 0.25F, 0.0F).setColor(255, 255, 255, 255).setUv((float)p_114096_, (float)p_114097_).setOverlay(OverlayTexture.NO_OVERLAY).setUv2(p_114093_,p_114093_).setNormal( 0.0F, 1.0F, 0.0F); + private void vertex(VertexConsumer vertexConsumer, Matrix4f matrix4f, Matrix3f matrix3f, int p_114093_, float p_114094_, int p_114095_, int p_114096_, int p_114097_,int color) { + vertexConsumer.addVertex(matrix4f, p_114094_ - 0.5F, (float)p_114095_ - 0.25F, 0.0F).setColor(color).setUv((float)p_114096_, (float)p_114097_).setOverlay(OverlayTexture.NO_OVERLAY).setLight(15728880).setUv2(p_114093_,p_114093_).setNormal( 0.0F, 1.0F, 0.0F); } public ResourceLocation getTextureLocation(Spark p_114078_) { return TEXTURE_LOCATION; } + + } \ No newline at end of file diff --git a/src/main/java/com/drmangotea/tfmg/content/decoration/LithiumBlock.java b/src/main/java/com/drmangotea/tfmg/content/decoration/LithiumBlock.java index 0c11e0f2..6d3470ad 100644 --- a/src/main/java/com/drmangotea/tfmg/content/decoration/LithiumBlock.java +++ b/src/main/java/com/drmangotea/tfmg/content/decoration/LithiumBlock.java @@ -1,6 +1,5 @@ package com.drmangotea.tfmg.content.decoration; -import com.drmangotea.tfmg.content.items.weapons.lithium_blade.LithiumSpark; import com.drmangotea.tfmg.registry.TFMGEntityTypes; import com.simibubi.create.Create; import net.minecraft.core.BlockPos; @@ -27,28 +26,6 @@ public class LithiumBlock extends Block { public void randomTick(BlockState blockState, ServerLevel level, BlockPos pos, RandomSource randomSource) { super.randomTick(blockState, level, pos, randomSource); - for(Direction direction : Direction.values()){ - if(level.getFluidState(pos.relative(direction)).is(Fluids.WATER)){ - for (int i = 0; i < 12; i++) { - float x = Create.RANDOM.nextFloat(360); - float y = Create.RANDOM.nextFloat(360); - float z = Create.RANDOM.nextFloat(360); - LithiumSpark spark = TFMGEntityTypes.LITHIUM_SPARK.create(level); - spark.moveTo(pos.getX(), pos.getY() + 0.5, pos.getZ()); - - float f = -Mth.sin(y * ((float) Math.PI / 180F)) * Mth.cos(x * ((float) Math.PI / 180F)); - float f1 = -Mth.sin((x + z) * ((float) Math.PI / 180F)); - float f2 = Mth.cos(y * ((float) Math.PI / 180F)) * Mth.cos(x * ((float) Math.PI / 180F)); - spark.shoot(f, f1, f2, 0.3f, 1); - level.addFreshEntity(spark); - } - level.explode(null, pos.getX(), pos.getY(), pos.getZ(), 1, Level.ExplosionInteraction.NONE); - - level.destroyBlock(pos,false); - break; - } - - } } diff --git a/src/main/java/com/drmangotea/tfmg/content/decoration/doors/TFMGSlidingDoorBlock.java b/src/main/java/com/drmangotea/tfmg/content/decoration/doors/TFMGSlidingDoorBlock.java index ba358f66..7917baf8 100644 --- a/src/main/java/com/drmangotea/tfmg/content/decoration/doors/TFMGSlidingDoorBlock.java +++ b/src/main/java/com/drmangotea/tfmg/content/decoration/doors/TFMGSlidingDoorBlock.java @@ -1,8 +1,12 @@ package com.drmangotea.tfmg.content.decoration.doors; +import com.drmangotea.tfmg.mixin.accessor.SlidingDoorBlockEntityAccessor; import com.drmangotea.tfmg.registry.TFMGBlockEntities; +import com.simibubi.create.AllBlockEntityTypes; import com.simibubi.create.content.contraptions.ContraptionWorld; +import com.simibubi.create.content.decoration.slidingDoor.SlidingDoorBlock; +import com.simibubi.create.content.decoration.slidingDoor.SlidingDoorBlockEntity; import com.simibubi.create.content.decoration.slidingDoor.SlidingDoorShapes; import com.simibubi.create.content.equipment.wrench.IWrenchable; import com.simibubi.create.foundation.block.IBE; @@ -40,219 +44,19 @@ import javax.annotation.Nullable; import static com.simibubi.create.content.decoration.slidingDoor.SlidingDoorBlock.TRAIN_SET_TYPE; -public class TFMGSlidingDoorBlock extends DoorBlock implements IWrenchable, IBE { +public class TFMGSlidingDoorBlock extends SlidingDoorBlock implements IWrenchable, IBE { - public static final BooleanProperty VISIBLE = BooleanProperty.create("visible"); - private boolean folds; - - public static TFMGSlidingDoorBlock metal(Properties p_52737_, boolean folds) { - return new TFMGSlidingDoorBlock(p_52737_, TRAIN_SET_TYPE.get(), folds); - } - - public TFMGSlidingDoorBlock(Properties p_52737_, BlockSetType type, boolean folds) { - super(type,p_52737_ ); - this.folds = folds; - } - - public boolean isFoldingDoor() { - return folds; + public TFMGSlidingDoorBlock(Properties properties, BlockSetType type, boolean folds) { + super(properties, type, folds); } @Override - protected void createBlockStateDefinition(Builder pBuilder) { - super.createBlockStateDefinition(pBuilder.add(VISIBLE)); + public Class getBlockEntityClass() { + return SlidingDoorBlockEntity.class; } @Override - public VoxelShape getShape(BlockState pState, BlockGetter pLevel, BlockPos pPos, CollisionContext pContext) { - if (!pState.getValue(OPEN) && (pState.getValue(VISIBLE) || pLevel instanceof ContraptionWorld)) - return super.getShape(pState, pLevel, pPos, pContext); - - Direction direction = pState.getValue(FACING); - boolean hinge = pState.getValue(HINGE) == DoorHingeSide.RIGHT; - return SlidingDoorShapes.get(direction, hinge, isFoldingDoor()); - } - - @Override - public boolean canSurvive(BlockState pState, LevelReader pLevel, BlockPos pPos) { - return pState.getValue(HALF) == DoubleBlockHalf.LOWER || pLevel.getBlockState(pPos.below()) - .is(this); - } - - @Override - public VoxelShape getInteractionShape(BlockState pState, BlockGetter pLevel, BlockPos pPos) { - return getShape(pState, pLevel, pPos, CollisionContext.empty()); - } - - @Override - public BlockState getStateForPlacement(BlockPlaceContext pContext) { - BlockState stateForPlacement = super.getStateForPlacement(pContext); - if (stateForPlacement != null && stateForPlacement.getValue(OPEN)) - return stateForPlacement.setValue(OPEN, false) - .setValue(POWERED, false); - return stateForPlacement; - } - - @Override - public void onPlace(BlockState pState, Level pLevel, BlockPos pPos, BlockState pOldState, boolean pIsMoving) { - if (!pOldState.is(this)) - deferUpdate(pLevel, pPos); - } - - @Override - public BlockState updateShape(BlockState pState, Direction pFacing, BlockState pFacingState, LevelAccessor pLevel, - BlockPos pCurrentPos, BlockPos pFacingPos) { - BlockState blockState = super.updateShape(pState, pFacing, pFacingState, pLevel, pCurrentPos, pFacingPos); - if (blockState.isAir()) - return blockState; - DoubleBlockHalf doubleblockhalf = blockState.getValue(HALF); - if (pFacing.getAxis() == Direction.Axis.Y - && doubleblockhalf == DoubleBlockHalf.LOWER == (pFacing == Direction.UP)) { - return pFacingState.is(this) && pFacingState.getValue(HALF) != doubleblockhalf - ? blockState.setValue(VISIBLE, pFacingState.getValue(VISIBLE)) - : Blocks.AIR.defaultBlockState(); - } - return blockState; - } - - @Override - public void setOpen(@Nullable Entity entity, Level level, BlockState state, BlockPos pos, boolean open) { - if (!state.is(this)) - return; - if (state.getValue(OPEN) == open) - return; - BlockState changedState = state.setValue(OPEN, open); - if (open) - changedState = changedState.setValue(VISIBLE, false); - level.setBlock(pos, changedState, 10); - - DoorHingeSide hinge = changedState.getValue(HINGE); - Direction facing = changedState.getValue(FACING); - BlockPos otherPos = - pos.relative(hinge == DoorHingeSide.LEFT ? facing.getClockWise() : facing.getCounterClockWise()); - BlockState otherDoor = level.getBlockState(otherPos); - if (isDoubleDoor(changedState, hinge, facing, otherDoor)) - setOpen(entity, level, otherDoor, otherPos, open); - - this.playSound(level, pos, open); - level.gameEvent(entity, open ? GameEvent.BLOCK_OPEN : GameEvent.BLOCK_CLOSE, pos); - } - - @Override - public void neighborChanged(BlockState pState, Level pLevel, BlockPos pPos, Block pBlock, BlockPos pFromPos, - boolean pIsMoving) { - boolean lower = pState.getValue(HALF) == DoubleBlockHalf.LOWER; - boolean isPowered = isDoorPowered(pLevel, pPos, pState); - if (defaultBlockState().is(pBlock)) - return; - if (isPowered == pState.getValue(POWERED)) - return; - - TFMGSlidingDoorBlockEntity be = getBlockEntity(pLevel, lower ? pPos : pPos.below()); - if (be != null && be.deferUpdate) - return; - - BlockState changedState = pState.setValue(POWERED, Boolean.valueOf(isPowered)) - .setValue(OPEN, Boolean.valueOf(isPowered)); - if (isPowered) - changedState = changedState.setValue(VISIBLE, false); - - if (isPowered != pState.getValue(OPEN)) { - this.playSound(pLevel, pPos, isPowered); - pLevel.gameEvent(null, isPowered ? GameEvent.BLOCK_OPEN : GameEvent.BLOCK_CLOSE, pPos); - - DoorHingeSide hinge = changedState.getValue(HINGE); - Direction facing = changedState.getValue(FACING); - BlockPos otherPos = - pPos.relative(hinge == DoorHingeSide.LEFT ? facing.getClockWise() : facing.getCounterClockWise()); - BlockState otherDoor = pLevel.getBlockState(otherPos); - - if (isDoubleDoor(changedState, hinge, facing, otherDoor)) { - otherDoor = otherDoor.setValue(POWERED, Boolean.valueOf(isPowered)) - .setValue(OPEN, Boolean.valueOf(isPowered)); - if (isPowered) - otherDoor = otherDoor.setValue(VISIBLE, false); - pLevel.setBlock(otherPos, otherDoor, 2); - } - } - - pLevel.setBlock(pPos, changedState, 2); - } - - public static boolean isDoorPowered(Level pLevel, BlockPos pPos, BlockState state) { - boolean lower = state.getValue(HALF) == DoubleBlockHalf.LOWER; - DoorHingeSide hinge = state.getValue(HINGE); - Direction facing = state.getValue(FACING); - BlockPos otherPos = - pPos.relative(hinge == DoorHingeSide.LEFT ? facing.getClockWise() : facing.getCounterClockWise()); - BlockState otherDoor = pLevel.getBlockState(otherPos); - - if (isDoubleDoor(state.cycle(OPEN), hinge, facing, otherDoor) && (pLevel.hasNeighborSignal(otherPos) - || pLevel.hasNeighborSignal(otherPos.relative(lower ? Direction.UP : Direction.DOWN)))) - return true; - - return pLevel.hasNeighborSignal(pPos) - || pLevel.hasNeighborSignal(pPos.relative(lower ? Direction.UP : Direction.DOWN)); - } - - - - - -@Override -protected InteractionResult useWithoutItem(BlockState pState, Level pLevel, BlockPos pPos, Player pPlayer, BlockHitResult pHit) { - - pState = pState.cycle(OPEN); - if (pState.getValue(OPEN)) - pState = pState.setValue(VISIBLE, false); - pLevel.setBlock(pPos, pState, 10); - pLevel.gameEvent(pPlayer, isOpen(pState) ? GameEvent.BLOCK_OPEN : GameEvent.BLOCK_CLOSE, pPos); - - DoorHingeSide hinge = pState.getValue(HINGE); - Direction facing = pState.getValue(FACING); - BlockPos otherPos = - pPos.relative(hinge == DoorHingeSide.LEFT ? facing.getClockWise() : facing.getCounterClockWise()); - BlockState otherDoor = pLevel.getBlockState(otherPos); - if (isDoubleDoor(pState, hinge, facing, otherDoor)) - useWithoutItem(otherDoor, pLevel, otherPos, pPlayer, pHit); - else if (pState.getValue(OPEN)) - pLevel.levelEvent(pPlayer, getOpenSound(), pPos, 0); - - return InteractionResult.sidedSuccess(pLevel.isClientSide); - } - public void deferUpdate(LevelAccessor level, BlockPos pos) { - withBlockEntityDo(level, pos, sdte -> sdte.deferUpdate = true); - } - public static boolean isDoubleDoor(BlockState pState, DoorHingeSide hinge, Direction facing, BlockState otherDoor) { - return otherDoor.getBlock() == pState.getBlock() && otherDoor.getValue(HINGE) != hinge - && otherDoor.getValue(FACING) == facing && otherDoor.getValue(OPEN) != pState.getValue(OPEN) - && otherDoor.getValue(HALF) == pState.getValue(HALF); - } - @Override - public RenderShape getRenderShape(BlockState pState) { - return pState.getValue(VISIBLE) ? RenderShape.MODEL : RenderShape.ENTITYBLOCK_ANIMATED; - } - private void playSound(Level pLevel, BlockPos pPos, boolean pIsOpening) { - if (pIsOpening) - pLevel.levelEvent((Player) null, this.getOpenSound(), pPos, 0); - } - private int getOpenSound() { - return 1005; - } - @Nullable - @Override - public BlockEntity newBlockEntity(BlockPos pos, BlockState state) { - if (state.getValue(HALF) == DoubleBlockHalf.UPPER) - return null; - return IBE.super.newBlockEntity(pos, state); - } - @Override - public Class getBlockEntityClass() { - return TFMGSlidingDoorBlockEntity.class; - } - - @Override - public BlockEntityType getBlockEntityType() { + public BlockEntityType getBlockEntityType() { return TFMGBlockEntities.TFMG_SLIDING_DOOR.get(); } diff --git a/src/main/java/com/drmangotea/tfmg/content/decoration/doors/TFMGSlidingDoorBlockEntity.java b/src/main/java/com/drmangotea/tfmg/content/decoration/doors/TFMGSlidingDoorBlockEntity.java deleted file mode 100644 index 00bf18bb..00000000 --- a/src/main/java/com/drmangotea/tfmg/content/decoration/doors/TFMGSlidingDoorBlockEntity.java +++ /dev/null @@ -1,80 +0,0 @@ -package com.drmangotea.tfmg.content.decoration.doors; - -import com.simibubi.create.content.decoration.slidingDoor.SlidingDoorBlockEntity; -import com.simibubi.create.foundation.blockEntity.behaviour.BlockEntityBehaviour; -import net.createmod.catnip.animation.LerpedFloat; -import net.minecraft.core.BlockPos; -import net.minecraft.sounds.SoundEvents; -import net.minecraft.sounds.SoundSource; -import net.minecraft.world.level.block.Blocks; -import net.minecraft.world.level.block.DoorBlock; -import net.minecraft.world.level.block.entity.BlockEntityType; -import net.minecraft.world.level.block.state.BlockState; -import net.minecraft.world.phys.AABB; - -import java.util.List; - -public class TFMGSlidingDoorBlockEntity extends SlidingDoorBlockEntity { - LerpedFloat animation; - int bridgeTicks; - boolean deferUpdate; - public TFMGSlidingDoorBlockEntity(BlockEntityType type, BlockPos pos, BlockState state) { - super(type, pos, state); - animation = LerpedFloat.linear() - .startWithValue(isOpen(state) ? 1 : 0); - } - - @Override - public void tick() { - if (deferUpdate && !level.isClientSide()) { - deferUpdate = false; - BlockState blockState = getBlockState(); - blockState.handleNeighborChanged(level, worldPosition, Blocks.AIR, worldPosition, false); - } - - super.tick(); - boolean open = isOpen(getBlockState()); - boolean wasSettled = animation.settled(); - animation.chase(open ? 1 : 0, .15f, LerpedFloat.Chaser.LINEAR); - animation.tickChaser(); - - if (level.isClientSide()) { - if (bridgeTicks < 2 && open) - bridgeTicks++; - else if (bridgeTicks > 0 && !open && isVisible(getBlockState())) - bridgeTicks--; - return; - } - - if (!open && !wasSettled && animation.settled() && !isVisible(getBlockState())) - showBlockModel(); - } - - @Override - protected AABB createRenderBoundingBox() { - return super.createRenderBoundingBox().inflate(1); - } - - protected boolean isVisible(BlockState state) { - return state.getOptionalValue(TFMGSlidingDoorBlock.VISIBLE) - .orElse(true); - } - - protected boolean shouldRenderSpecial(BlockState state) { - return !isVisible(state) || bridgeTicks != 0; - } - - protected void showBlockModel() { - level.setBlock(worldPosition, getBlockState().setValue(TFMGSlidingDoorBlock.VISIBLE, true), 3); - level.playSound(null, worldPosition, SoundEvents.IRON_DOOR_CLOSE, SoundSource.BLOCKS, .5f, 1); - } - - @Override - public void addBehaviours(List behaviours) {} - - public static boolean isOpen(BlockState state) { - return state.getOptionalValue(DoorBlock.OPEN) - .orElse(false); - } - -} diff --git a/src/main/java/com/drmangotea/tfmg/content/decoration/doors/TFMGSlidingDoorRenderer.java b/src/main/java/com/drmangotea/tfmg/content/decoration/doors/TFMGSlidingDoorRenderer.java index a0dc0e63..76870084 100644 --- a/src/main/java/com/drmangotea/tfmg/content/decoration/doors/TFMGSlidingDoorRenderer.java +++ b/src/main/java/com/drmangotea/tfmg/content/decoration/doors/TFMGSlidingDoorRenderer.java @@ -2,6 +2,7 @@ package com.drmangotea.tfmg.content.decoration.doors; +import com.drmangotea.tfmg.mixin.accessor.SlidingDoorBlockEntityAccessor; import com.drmangotea.tfmg.registry.TFMGPartialModels; import com.mojang.blaze3d.vertex.PoseStack; import com.mojang.blaze3d.vertex.VertexConsumer; @@ -30,15 +31,15 @@ import net.minecraft.world.phys.Vec3; -public class TFMGSlidingDoorRenderer extends SafeBlockEntityRenderer { +public class TFMGSlidingDoorRenderer extends SafeBlockEntityRenderer { public TFMGSlidingDoorRenderer(Context context) {} @Override - protected void renderSafe(TFMGSlidingDoorBlockEntity be, float partialTicks, PoseStack ms, MultiBufferSource buffer, + protected void renderSafe(SlidingDoorBlockEntity be, float partialTicks, PoseStack ms, MultiBufferSource buffer, int light, int overlay) { BlockState blockState = be.getBlockState(); - if (!be.shouldRenderSpecial(blockState)) + if (!((SlidingDoorBlockEntityAccessor)be).i_architecture$shouldRenderSpecial(blockState)) return; Direction facing = blockState.getValue(DoorBlock.FACING); @@ -47,7 +48,7 @@ public class TFMGSlidingDoorRenderer extends SafeBlockEntityRenderer type, BlockPos pos, BlockState state) { - super(type, pos, state); - } - - @Override - protected AABB createRenderBoundingBox() { - return super.createRenderBoundingBox().inflate(2); - } - - @Override - public void write(CompoundTag compound, HolderLookup.Provider registries, boolean clientPacket) { - super.write(compound,registries , clientPacket); - } - - @Override - protected void read(CompoundTag compound, HolderLookup.Provider registries, boolean clientPacket) { - super.read(compound,registries , clientPacket); - if (clientPacket) - visualSpeed.chase(getGeneratedSpeed(), 1 / 64f, LerpedFloat.Chaser.EXP); - } - - @Override - public void tick() { - super.tick(); - - if (!level.isClientSide) - return; - - - - float targetSpeed = getSpeed(); - visualSpeed.updateChaseTarget(targetSpeed); - visualSpeed.tickChaser(); - angle += visualSpeed.getValue() * 3 / 10f; - angle %= 360; - } -} diff --git a/src/main/java/com/drmangotea/tfmg/content/decoration/cogs/TFMGCogWheelBlock.java b/src/main/java/com/drmangotea/tfmg/content/decoration/kinetics/cogs/TFMGCogWheelBlock.java similarity index 98% rename from src/main/java/com/drmangotea/tfmg/content/decoration/cogs/TFMGCogWheelBlock.java rename to src/main/java/com/drmangotea/tfmg/content/decoration/kinetics/cogs/TFMGCogWheelBlock.java index fe0aea84..112338d4 100644 --- a/src/main/java/com/drmangotea/tfmg/content/decoration/cogs/TFMGCogWheelBlock.java +++ b/src/main/java/com/drmangotea/tfmg/content/decoration/kinetics/cogs/TFMGCogWheelBlock.java @@ -1,4 +1,4 @@ -package com.drmangotea.tfmg.content.decoration.cogs; +package com.drmangotea.tfmg.content.decoration.kinetics.cogs; import com.drmangotea.tfmg.registry.TFMGBlockEntities; import com.simibubi.create.AllBlocks; @@ -15,7 +15,6 @@ import net.minecraft.MethodsReturnNonnullByDefault; import net.minecraft.core.BlockPos; import net.minecraft.core.Direction; import net.minecraft.world.InteractionHand; -import net.minecraft.world.InteractionResult; import net.minecraft.world.ItemInteractionResult; import net.minecraft.world.entity.LivingEntity; import net.minecraft.world.entity.player.Player; diff --git a/src/main/java/com/drmangotea/tfmg/content/decoration/cogs/TFMGCogwheelBlockItem.java b/src/main/java/com/drmangotea/tfmg/content/decoration/kinetics/cogs/TFMGCogwheelBlockItem.java similarity index 99% rename from src/main/java/com/drmangotea/tfmg/content/decoration/cogs/TFMGCogwheelBlockItem.java rename to src/main/java/com/drmangotea/tfmg/content/decoration/kinetics/cogs/TFMGCogwheelBlockItem.java index af81ad2d..1062c5e3 100644 --- a/src/main/java/com/drmangotea/tfmg/content/decoration/cogs/TFMGCogwheelBlockItem.java +++ b/src/main/java/com/drmangotea/tfmg/content/decoration/kinetics/cogs/TFMGCogwheelBlockItem.java @@ -1,4 +1,4 @@ -package com.drmangotea.tfmg.content.decoration.cogs; +package com.drmangotea.tfmg.content.decoration.kinetics.cogs; import com.simibubi.create.AllShapes; import com.simibubi.create.content.kinetics.base.DirectionalKineticBlock; diff --git a/src/main/java/com/drmangotea/tfmg/content/decoration/cogs/TFMGCogwheelRenderer.java b/src/main/java/com/drmangotea/tfmg/content/decoration/kinetics/cogs/TFMGCogwheelRenderer.java similarity index 97% rename from src/main/java/com/drmangotea/tfmg/content/decoration/cogs/TFMGCogwheelRenderer.java rename to src/main/java/com/drmangotea/tfmg/content/decoration/kinetics/cogs/TFMGCogwheelRenderer.java index 0362b0e4..88b8cdf4 100644 --- a/src/main/java/com/drmangotea/tfmg/content/decoration/cogs/TFMGCogwheelRenderer.java +++ b/src/main/java/com/drmangotea/tfmg/content/decoration/kinetics/cogs/TFMGCogwheelRenderer.java @@ -1,4 +1,4 @@ -package com.drmangotea.tfmg.content.decoration.cogs; +package com.drmangotea.tfmg.content.decoration.kinetics.cogs; import com.drmangotea.tfmg.registry.TFMGBlocks; import com.drmangotea.tfmg.registry.TFMGPartialModels; diff --git a/src/main/java/com/drmangotea/tfmg/content/decoration/cogs/TFMGCogwheelVisual.java b/src/main/java/com/drmangotea/tfmg/content/decoration/kinetics/cogs/TFMGCogwheelVisual.java similarity index 94% rename from src/main/java/com/drmangotea/tfmg/content/decoration/cogs/TFMGCogwheelVisual.java rename to src/main/java/com/drmangotea/tfmg/content/decoration/kinetics/cogs/TFMGCogwheelVisual.java index 80787751..5f700801 100644 --- a/src/main/java/com/drmangotea/tfmg/content/decoration/cogs/TFMGCogwheelVisual.java +++ b/src/main/java/com/drmangotea/tfmg/content/decoration/kinetics/cogs/TFMGCogwheelVisual.java @@ -1,8 +1,7 @@ -package com.drmangotea.tfmg.content.decoration.cogs; +package com.drmangotea.tfmg.content.decoration.kinetics.cogs; import com.drmangotea.tfmg.registry.TFMGBlocks; import com.drmangotea.tfmg.registry.TFMGPartialModels; -import com.simibubi.create.AllBlocks; import com.simibubi.create.AllPartialModels; import com.simibubi.create.content.kinetics.base.KineticBlockEntityRenderer; import com.simibubi.create.content.kinetics.base.RotatingInstance; @@ -12,11 +11,9 @@ import com.simibubi.create.content.kinetics.simpleRelays.BracketedKineticBlockEn import com.simibubi.create.content.kinetics.simpleRelays.ICogWheel; import com.simibubi.create.foundation.render.AllInstanceTypes; import dev.engine_room.flywheel.api.instance.Instance; -import dev.engine_room.flywheel.api.material.Material; import dev.engine_room.flywheel.api.model.Model; import dev.engine_room.flywheel.api.visual.BlockEntityVisual; import dev.engine_room.flywheel.api.visualization.VisualizationContext; -import dev.engine_room.flywheel.lib.material.Materials; import dev.engine_room.flywheel.lib.model.Models; import net.minecraft.core.Direction; diff --git a/src/main/java/com/drmangotea/tfmg/content/decoration/cogs/TFMGEncasedCogRenderer.java b/src/main/java/com/drmangotea/tfmg/content/decoration/kinetics/cogs/TFMGEncasedCogRenderer.java similarity index 97% rename from src/main/java/com/drmangotea/tfmg/content/decoration/cogs/TFMGEncasedCogRenderer.java rename to src/main/java/com/drmangotea/tfmg/content/decoration/kinetics/cogs/TFMGEncasedCogRenderer.java index f166ecd2..b512a44b 100644 --- a/src/main/java/com/drmangotea/tfmg/content/decoration/cogs/TFMGEncasedCogRenderer.java +++ b/src/main/java/com/drmangotea/tfmg/content/decoration/kinetics/cogs/TFMGEncasedCogRenderer.java @@ -1,4 +1,4 @@ -package com.drmangotea.tfmg.content.decoration.cogs; +package com.drmangotea.tfmg.content.decoration.kinetics.cogs; import com.drmangotea.tfmg.registry.TFMGPartialModels; import com.mojang.blaze3d.vertex.PoseStack; @@ -9,7 +9,6 @@ import com.simibubi.create.content.kinetics.simpleRelays.BracketedKineticBlockEn import com.simibubi.create.content.kinetics.simpleRelays.SimpleKineticBlockEntity; import com.simibubi.create.content.kinetics.simpleRelays.encased.EncasedCogwheelBlock; import dev.engine_room.flywheel.api.visualization.VisualizationManager; -import dev.engine_room.flywheel.lib.model.baked.PartialModel; import net.createmod.catnip.data.Iterate; import net.createmod.catnip.render.CachedBuffers; import net.createmod.catnip.render.SuperByteBuffer; diff --git a/src/main/java/com/drmangotea/tfmg/content/decoration/cogs/TFMGEncasedCogVisual.java b/src/main/java/com/drmangotea/tfmg/content/decoration/kinetics/cogs/TFMGEncasedCogVisual.java similarity index 98% rename from src/main/java/com/drmangotea/tfmg/content/decoration/cogs/TFMGEncasedCogVisual.java rename to src/main/java/com/drmangotea/tfmg/content/decoration/kinetics/cogs/TFMGEncasedCogVisual.java index 9680841e..16bbf010 100644 --- a/src/main/java/com/drmangotea/tfmg/content/decoration/cogs/TFMGEncasedCogVisual.java +++ b/src/main/java/com/drmangotea/tfmg/content/decoration/kinetics/cogs/TFMGEncasedCogVisual.java @@ -1,4 +1,4 @@ -package com.drmangotea.tfmg.content.decoration.cogs; +package com.drmangotea.tfmg.content.decoration.kinetics.cogs; import com.drmangotea.tfmg.registry.TFMGPartialModels; import com.simibubi.create.AllPartialModels; diff --git a/src/main/java/com/drmangotea/tfmg/content/decoration/encased/TFMGEncasedCogwheelBlock.java b/src/main/java/com/drmangotea/tfmg/content/decoration/kinetics/encased/TFMGEncasedCogwheelBlock.java similarity index 98% rename from src/main/java/com/drmangotea/tfmg/content/decoration/encased/TFMGEncasedCogwheelBlock.java rename to src/main/java/com/drmangotea/tfmg/content/decoration/kinetics/encased/TFMGEncasedCogwheelBlock.java index 2286e76b..7b4d5179 100644 --- a/src/main/java/com/drmangotea/tfmg/content/decoration/encased/TFMGEncasedCogwheelBlock.java +++ b/src/main/java/com/drmangotea/tfmg/content/decoration/kinetics/encased/TFMGEncasedCogwheelBlock.java @@ -1,4 +1,4 @@ -package com.drmangotea.tfmg.content.decoration.encased; +package com.drmangotea.tfmg.content.decoration.kinetics.encased; import com.drmangotea.tfmg.registry.TFMGBlockEntities; @@ -29,7 +29,6 @@ import net.minecraft.world.entity.player.Player; import net.minecraft.world.item.ItemStack; import net.minecraft.world.item.context.BlockPlaceContext; import net.minecraft.world.item.context.UseOnContext; -import net.minecraft.world.level.BlockGetter; import net.minecraft.world.level.Level; import net.minecraft.world.level.LevelReader; import net.minecraft.world.level.block.Block; @@ -41,7 +40,6 @@ import net.minecraft.world.level.block.state.BlockState; import net.minecraft.world.level.block.state.StateDefinition; import net.minecraft.world.level.block.state.properties.BooleanProperty; import net.minecraft.world.phys.BlockHitResult; -import net.minecraft.world.phys.HitResult; import java.util.function.Supplier; diff --git a/src/main/java/com/drmangotea/tfmg/content/decoration/encased/TFMGEncasedShaftBlock.java b/src/main/java/com/drmangotea/tfmg/content/decoration/kinetics/encased/TFMGEncasedShaftBlock.java similarity index 95% rename from src/main/java/com/drmangotea/tfmg/content/decoration/encased/TFMGEncasedShaftBlock.java rename to src/main/java/com/drmangotea/tfmg/content/decoration/kinetics/encased/TFMGEncasedShaftBlock.java index 38e61ed8..d4d2dd37 100644 --- a/src/main/java/com/drmangotea/tfmg/content/decoration/encased/TFMGEncasedShaftBlock.java +++ b/src/main/java/com/drmangotea/tfmg/content/decoration/kinetics/encased/TFMGEncasedShaftBlock.java @@ -1,4 +1,4 @@ -package com.drmangotea.tfmg.content.decoration.encased; +package com.drmangotea.tfmg.content.decoration.kinetics.encased; import com.drmangotea.tfmg.registry.TFMGBlockEntities; @@ -16,14 +16,12 @@ import net.minecraft.world.InteractionResult; import net.minecraft.world.entity.player.Player; import net.minecraft.world.item.ItemStack; import net.minecraft.world.item.context.UseOnContext; -import net.minecraft.world.level.BlockGetter; import net.minecraft.world.level.Level; import net.minecraft.world.level.block.Block; import net.minecraft.world.level.block.entity.BlockEntity; import net.minecraft.world.level.block.entity.BlockEntityType; import net.minecraft.world.level.block.state.BlockState; import net.minecraft.world.phys.BlockHitResult; -import net.minecraft.world.phys.HitResult; import java.util.function.Supplier; diff --git a/src/main/java/com/drmangotea/tfmg/content/decoration/flywheels/TFMGFlywheelBlock.java b/src/main/java/com/drmangotea/tfmg/content/decoration/kinetics/flywheels/TFMGFlywheelBlock.java similarity index 88% rename from src/main/java/com/drmangotea/tfmg/content/decoration/flywheels/TFMGFlywheelBlock.java rename to src/main/java/com/drmangotea/tfmg/content/decoration/kinetics/flywheels/TFMGFlywheelBlock.java index e48745e9..20199dec 100644 --- a/src/main/java/com/drmangotea/tfmg/content/decoration/flywheels/TFMGFlywheelBlock.java +++ b/src/main/java/com/drmangotea/tfmg/content/decoration/kinetics/flywheels/TFMGFlywheelBlock.java @@ -1,10 +1,11 @@ -package com.drmangotea.tfmg.content.decoration.flywheels; +package com.drmangotea.tfmg.content.decoration.kinetics.flywheels; import com.drmangotea.tfmg.registry.TFMGBlockEntities; import com.drmangotea.tfmg.registry.TFMGPartialModels; import com.simibubi.create.AllShapes; import com.simibubi.create.content.kinetics.base.RotatedPillarKineticBlock; +import com.simibubi.create.content.kinetics.flywheel.FlywheelBlockEntity; import com.simibubi.create.foundation.block.IBE; import dev.engine_room.flywheel.lib.model.baked.PartialModel; import net.minecraft.core.BlockPos; @@ -18,7 +19,7 @@ import net.minecraft.world.level.block.state.BlockState; import net.minecraft.world.phys.shapes.CollisionContext; import net.minecraft.world.phys.shapes.VoxelShape; -public class TFMGFlywheelBlock extends RotatedPillarKineticBlock implements IBE { +public class TFMGFlywheelBlock extends RotatedPillarKineticBlock implements IBE { public final PartialModel model; @@ -46,8 +47,8 @@ public class TFMGFlywheelBlock extends RotatedPillarKineticBlock implements IBE< } @Override - public Class getBlockEntityClass() { - return TFMGFlywheelBlockEntity.class; + public Class getBlockEntityClass() { + return FlywheelBlockEntity.class; } @Override @@ -61,7 +62,7 @@ public class TFMGFlywheelBlock extends RotatedPillarKineticBlock implements IBE< } @Override - public BlockEntityType getBlockEntityType() { + public BlockEntityType getBlockEntityType() { return TFMGBlockEntities.TFMG_FLYWHEEL.get(); } diff --git a/src/main/java/com/drmangotea/tfmg/content/decoration/flywheels/TFMGFlywheelRenderer.java b/src/main/java/com/drmangotea/tfmg/content/decoration/kinetics/flywheels/TFMGFlywheelRenderer.java similarity index 66% rename from src/main/java/com/drmangotea/tfmg/content/decoration/flywheels/TFMGFlywheelRenderer.java rename to src/main/java/com/drmangotea/tfmg/content/decoration/kinetics/flywheels/TFMGFlywheelRenderer.java index 9a1ca08e..76669934 100644 --- a/src/main/java/com/drmangotea/tfmg/content/decoration/flywheels/TFMGFlywheelRenderer.java +++ b/src/main/java/com/drmangotea/tfmg/content/decoration/kinetics/flywheels/TFMGFlywheelRenderer.java @@ -1,8 +1,10 @@ -package com.drmangotea.tfmg.content.decoration.flywheels; +package com.drmangotea.tfmg.content.decoration.kinetics.flywheels; +import com.drmangotea.tfmg.mixin.accessor.FlywheelBlockEntityMixin; import com.mojang.blaze3d.vertex.PoseStack; import com.mojang.blaze3d.vertex.VertexConsumer; import com.simibubi.create.content.kinetics.base.KineticBlockEntityRenderer; +import com.simibubi.create.content.kinetics.flywheel.FlywheelBlockEntity; import dev.engine_room.flywheel.api.visualization.VisualizationManager; import net.createmod.catnip.math.AngleHelper; import net.createmod.catnip.render.CachedBuffers; @@ -12,14 +14,14 @@ import net.minecraft.client.renderer.RenderType; import net.minecraft.client.renderer.blockentity.BlockEntityRendererProvider; import net.minecraft.world.level.block.state.BlockState; -public class TFMGFlywheelRenderer extends KineticBlockEntityRenderer { +public class TFMGFlywheelRenderer extends KineticBlockEntityRenderer { public TFMGFlywheelRenderer(BlockEntityRendererProvider.Context context) { super(context); } @Override - protected void renderSafe(TFMGFlywheelBlockEntity be, float partialTicks, PoseStack ms, MultiBufferSource buffer, + protected void renderSafe(FlywheelBlockEntity be, float partialTicks, PoseStack ms, MultiBufferSource buffer, int light, int overlay) { super.renderSafe(be, partialTicks, ms, buffer, light, overlay); @@ -28,14 +30,14 @@ public class TFMGFlywheelRenderer extends KineticBlockEntityRenderer implements SimpleDynamicVisual { +public class TFMGFlywheelVisual extends KineticBlockEntityVisual implements SimpleDynamicVisual { protected final RotatingInstance shaft; protected final TransformedInstance wheel; @@ -32,7 +31,7 @@ public class TFMGFlywheelVisual extends KineticBlockEntityVisual { diff --git a/src/main/java/com/drmangotea/tfmg/content/decoration/gearbox/SteelVerticalGearboxItem.java b/src/main/java/com/drmangotea/tfmg/content/decoration/kinetics/gearbox/SteelVerticalGearboxItem.java similarity index 97% rename from src/main/java/com/drmangotea/tfmg/content/decoration/gearbox/SteelVerticalGearboxItem.java rename to src/main/java/com/drmangotea/tfmg/content/decoration/kinetics/gearbox/SteelVerticalGearboxItem.java index 4528238b..698eb8da 100644 --- a/src/main/java/com/drmangotea/tfmg/content/decoration/gearbox/SteelVerticalGearboxItem.java +++ b/src/main/java/com/drmangotea/tfmg/content/decoration/kinetics/gearbox/SteelVerticalGearboxItem.java @@ -1,4 +1,4 @@ -package com.drmangotea.tfmg.content.decoration.gearbox; +package com.drmangotea.tfmg.content.decoration.kinetics.gearbox; import com.drmangotea.tfmg.registry.TFMGBlocks; diff --git a/src/main/java/com/drmangotea/tfmg/content/electricity/generators/large_generator/RotorVisual.java b/src/main/java/com/drmangotea/tfmg/content/electricity/generators/large_generator/RotorVisual.java index 0b5104f2..f954a13f 100644 --- a/src/main/java/com/drmangotea/tfmg/content/electricity/generators/large_generator/RotorVisual.java +++ b/src/main/java/com/drmangotea/tfmg/content/electricity/generators/large_generator/RotorVisual.java @@ -1,7 +1,5 @@ package com.drmangotea.tfmg.content.electricity.generators.large_generator; -import com.drmangotea.tfmg.content.decoration.flywheels.TFMGFlywheelBlock; -import com.drmangotea.tfmg.content.decoration.flywheels.TFMGFlywheelBlockEntity; import com.drmangotea.tfmg.registry.TFMGPartialModels; import com.simibubi.create.AllPartialModels; import com.simibubi.create.content.kinetics.base.KineticBlockEntityVisual; diff --git a/src/main/java/com/drmangotea/tfmg/content/items/weapons/explosives/thermite_grenades/ThermiteGrenade.java b/src/main/java/com/drmangotea/tfmg/content/items/weapons/explosives/thermite_grenades/ThermiteGrenade.java index b4c4fd48..84d42497 100644 --- a/src/main/java/com/drmangotea/tfmg/content/items/weapons/explosives/thermite_grenades/ThermiteGrenade.java +++ b/src/main/java/com/drmangotea/tfmg/content/items/weapons/explosives/thermite_grenades/ThermiteGrenade.java @@ -1,5 +1,6 @@ package com.drmangotea.tfmg.content.items.weapons.explosives.thermite_grenades; +import com.drmangotea.tfmg.TFMG; import com.drmangotea.tfmg.base.spark.BlueSpark; import com.drmangotea.tfmg.base.spark.GreenSpark; import com.drmangotea.tfmg.base.spark.Spark; @@ -25,20 +26,11 @@ public class ThermiteGrenade extends ThrowableItemProjectile { this.flameColor =ChemicalColor.BLUE; } - - - - public ThermiteGrenade(Level p_37399_, LivingEntity p_37400_, ChemicalColor color,EntityType grenade) { super(grenade, p_37400_, p_37399_); this.flameColor = color; } - public ThermiteGrenade(Level p_37394_, double p_37395_, double p_37396_, double p_37397_) { - super(TFMGEntityTypes.THERMITE_GRENADE.get(), p_37395_, p_37396_, p_37397_, p_37394_); - this.flameColor =ChemicalColor.BLUE; - } - protected Item getDefaultItem() { return TFMGItems.THERMITE_GRENADE.get(); } @@ -65,10 +57,11 @@ public class ThermiteGrenade extends ThrowableItemProjectile { } - protected void onHit(HitResult p_37406_) { - super.onHit(p_37406_); + protected void onHit(HitResult hitResult) { + super.onHit(hitResult); + + - if (!this.level().isClientSide) { this.level().broadcastEntityEvent(this, (byte) 3); for (int i=0; i<20;i++){ @@ -78,16 +71,22 @@ public class ThermiteGrenade extends ThrowableItemProjectile { if(flameColor==ChemicalColor.GREEN){ GreenSpark spark = TFMGEntityTypes.GREEN_SPARK.create(level()); + + + spark.moveTo(this.getX(), this.getY()+1, this.getZ()); spark.shootFromRotation( this,x,y,z,0.2f,1); this.level().addFreshEntity(spark); }else if(flameColor==ChemicalColor.BLUE){ BlueSpark spark = TFMGEntityTypes.BLUE_SPARK.create(level()); + + spark.moveTo(this.getX(), this.getY()+1, this.getZ()); spark.shootFromRotation( this,x,y,z,0.2f,1); this.level().addFreshEntity(spark); - } else { Spark spark = TFMGEntityTypes.SPARK.create(level()); + } else { + Spark spark = TFMGEntityTypes.SPARK.create(level()); spark.moveTo(this.getX(), this.getY()+1, this.getZ()); spark.shootFromRotation( this,x,y,z,0.2f,1); this.level().addFreshEntity(spark);} @@ -103,7 +102,7 @@ public class ThermiteGrenade extends ThrowableItemProjectile { this.level().explode(this, this.getX(), this.getY(0.0625D), this.getZ(), 2.0F, Level.ExplosionInteraction.NONE); this.discard(); - } + } diff --git a/src/main/java/com/drmangotea/tfmg/content/items/weapons/explosives/thermite_grenades/ThermiteGrenadeItem.java b/src/main/java/com/drmangotea/tfmg/content/items/weapons/explosives/thermite_grenades/ThermiteGrenadeItem.java index 3029ac12..b6cb70ec 100644 --- a/src/main/java/com/drmangotea/tfmg/content/items/weapons/explosives/thermite_grenades/ThermiteGrenadeItem.java +++ b/src/main/java/com/drmangotea/tfmg/content/items/weapons/explosives/thermite_grenades/ThermiteGrenadeItem.java @@ -24,7 +24,7 @@ public class ThermiteGrenadeItem extends Item { ItemStack itemstack = p_43143_.getItemInHand(p_43144_); p_43143_.getCooldowns().addCooldown(this, 60); p_43142_.playSound((Player)null, p_43143_.getX(), p_43143_.getY(), p_43143_.getZ(), SoundEvents.EGG_THROW, SoundSource.NEUTRAL, 0.5F, 0.4F / (p_43142_.getRandom().nextFloat() * 0.4F + 0.8F)); - if (!p_43142_.isClientSide) { + ThermiteGrenade grenade; if(flameColor== ThermiteGrenade.ChemicalColor.GREEN) { grenade = new ThermiteGrenade(p_43142_, p_43143_, flameColor, TFMGEntityTypes.ZINC_GRENADE.get()); @@ -36,7 +36,7 @@ public class ThermiteGrenadeItem extends Item { grenade.setItem(itemstack); grenade.shootFromRotation(p_43143_, p_43143_.getXRot(), p_43143_.getYRot(), 0.0F, 0.5F, 1.0F); p_43142_.addFreshEntity(grenade); - } + p_43143_.awardStat(Stats.ITEM_USED.get(this)); if (!p_43143_.getAbilities().instabuild) { diff --git a/src/main/java/com/drmangotea/tfmg/content/items/weapons/lithium_blade/LitLithiumBladeItem.java b/src/main/java/com/drmangotea/tfmg/content/items/weapons/lithium_blade/LitLithiumBladeItem.java index 68c23a0d..36812431 100644 --- a/src/main/java/com/drmangotea/tfmg/content/items/weapons/lithium_blade/LitLithiumBladeItem.java +++ b/src/main/java/com/drmangotea/tfmg/content/items/weapons/lithium_blade/LitLithiumBladeItem.java @@ -1,6 +1,8 @@ package com.drmangotea.tfmg.content.items.weapons.lithium_blade; +import com.drmangotea.tfmg.base.spark.LithiumSpark; +import com.drmangotea.tfmg.base.spark.Spark; import com.drmangotea.tfmg.registry.TFMGDataComponents; import com.drmangotea.tfmg.registry.TFMGEntityTypes; import com.drmangotea.tfmg.registry.TFMGItems; @@ -61,6 +63,8 @@ public class LitLithiumBladeItem extends SwordItem { LithiumSpark spark = TFMGEntityTypes.LITHIUM_SPARK.create(level); + + spark.setPos(player.getX(), player.getY() + 1.3, player.getZ()); diff --git a/src/main/java/com/drmangotea/tfmg/content/items/weapons/lithium_blade/LithiumSpark.java b/src/main/java/com/drmangotea/tfmg/content/items/weapons/lithium_blade/LithiumSpark.java deleted file mode 100644 index c6f6b6dd..00000000 --- a/src/main/java/com/drmangotea/tfmg/content/items/weapons/lithium_blade/LithiumSpark.java +++ /dev/null @@ -1,128 +0,0 @@ -package com.drmangotea.tfmg.content.items.weapons.lithium_blade; - -import com.drmangotea.tfmg.registry.TFMGEntityTypes; -import com.drmangotea.tfmg.registry.TFMGMobEffects; -import com.simibubi.create.content.trains.CubeParticleData; -import net.minecraft.core.particles.ParticleOptions; -import net.minecraft.core.particles.ParticleTypes; -import net.minecraft.network.syncher.SynchedEntityData; -import net.minecraft.util.Mth; -import net.minecraft.world.effect.MobEffectInstance; -import net.minecraft.world.entity.Entity; -import net.minecraft.world.entity.EntityType; -import net.minecraft.world.entity.LivingEntity; -import net.minecraft.world.entity.projectile.ThrowableProjectile; -import net.minecraft.world.level.Level; -import net.minecraft.world.phys.BlockHitResult; -import net.minecraft.world.phys.EntityHitResult; -import net.minecraft.world.phys.HitResult; -import net.minecraft.world.phys.Vec3; - -public class LithiumSpark extends ThrowableProjectile { - public LithiumSpark(EntityType p_37391_, Level p_37392_) { - super(p_37391_, p_37392_); - - } - public LithiumSpark(Level p_37399_, LivingEntity p_37400_) { - super(TFMGEntityTypes.LITHIUM_SPARK.get(), p_37400_, p_37399_); - } - - public LithiumSpark(Level p_37394_, double p_37395_, double p_37396_, double p_37397_) { - super(TFMGEntityTypes.LITHIUM_SPARK.get(), p_37395_, p_37396_, p_37397_, p_37394_); - } - - - @Override - protected double getDefaultGravity() { - return 0.02f; - } - - - @Override - protected void defineSynchedData(SynchedEntityData.Builder builder) { - - } - - public void tick(){ - super.tick(); - // if (this.isInWaterOrRain()) { - // this.discard(); - // } - if(this.level().isClientSide) { - - CubeParticleData data = - new CubeParticleData(100, 0, 0, .0125f + .0625f * random.nextFloat(), 30, false); - level().addParticle(data, this.getX(), this.getY(), this.getZ(), this.random.nextGaussian() * 0.05D, -this.getDeltaMovement().y * 0.5D, this.random.nextGaussian() * 0.05D); - - } - } - - - private ParticleOptions getParticle() { - - return ParticleTypes.FLAME; - } - - - public void burst(double pX, double pY, double pZ, float pVelocity, float pInaccuracy) { - Vec3 vec3 = (new Vec3(pX, pY, pZ)).normalize().add(this.random.triangle(0.0D, 0.0172275D * (double)pInaccuracy), 0, this.random.triangle(0.0D, 0.0172275D * (double)pInaccuracy)).scale((double)pVelocity); - this.setDeltaMovement(vec3); - double d0 = vec3.horizontalDistance(); - this.setYRot((float)(Mth.atan2(vec3.x, vec3.z) * (double)(180F / (float)Math.PI))); - this.setXRot((float)(Mth.atan2(vec3.y, d0) * (double)(180F / (float)Math.PI))); - this.yRotO = this.getYRot(); - this.xRotO = this.getXRot(); - } - - public void handleEntityEvent(byte p_37402_) { - if (p_37402_ == 3) { - ParticleOptions particleoptions = this.getParticle(); - - for(int i = 0; i < 8; ++i) { - this.level().addParticle(particleoptions, this.getX(), this.getY(), this.getZ(), 0.0D, 0.0D, 0.0D); - } - } - - } - protected void onHitBlock(BlockHitResult p_37384_) { - super.onHitBlock(p_37384_); - - } - - protected void onHitEntity(EntityHitResult p_37386_) { - super.onHitEntity(p_37386_); - if (!this.level().isClientSide) { - Entity entity = p_37386_.getEntity(); - Entity entity1 = this.getOwner(); - - - if(entity instanceof LivingEntity){ - - ((LivingEntity)entity).addEffect(new MobEffectInstance(TFMGMobEffects.HELLFIRE,60)); - - - } - - - } - } - - protected void onHit(HitResult p_37406_) { - super.onHit(p_37406_); - - if (!this.level().isClientSide) { - this.level().broadcastEntityEvent(this, (byte)3); - - - //this.level.explode(this, this.getX(), this.getY(0.0625D), this.getZ(), 2.0F, Explosion.BlockInteraction.NONE); - this.discard(); - } - - } - - @SuppressWarnings("unchecked") - public static EntityType.Builder build(EntityType.Builder builder) { - EntityType.Builder entityBuilder = (EntityType.Builder) builder; - return entityBuilder.sized(.25f, .25f); - } -} \ No newline at end of file diff --git a/src/main/java/com/drmangotea/tfmg/content/items/weapons/lithium_blade/LithiumSparkRenderer.java b/src/main/java/com/drmangotea/tfmg/content/items/weapons/lithium_blade/LithiumSparkRenderer.java deleted file mode 100644 index fdab4d0a..00000000 --- a/src/main/java/com/drmangotea/tfmg/content/items/weapons/lithium_blade/LithiumSparkRenderer.java +++ /dev/null @@ -1,61 +0,0 @@ -package com.drmangotea.tfmg.content.items.weapons.lithium_blade; - - -import com.drmangotea.tfmg.TFMG; -import com.mojang.blaze3d.vertex.PoseStack; -import com.mojang.blaze3d.vertex.VertexConsumer; -import com.mojang.math.Axis; -import net.minecraft.client.renderer.MultiBufferSource; -import net.minecraft.client.renderer.RenderType; -import net.minecraft.client.renderer.entity.EntityRenderer; -import net.minecraft.client.renderer.entity.EntityRendererProvider; -import net.minecraft.client.renderer.texture.OverlayTexture; -import net.minecraft.core.BlockPos; -import net.minecraft.resources.ResourceLocation; - - -import net.neoforged.api.distmarker.Dist; -import net.neoforged.api.distmarker.OnlyIn; -import org.joml.Matrix3f; -import org.joml.Matrix4f; - -@OnlyIn(Dist.CLIENT) -public class LithiumSparkRenderer extends EntityRenderer { - private static final ResourceLocation TEXTURE_LOCATION = TFMG.asResource("textures/entity/lithium_spark.png"); - private static final RenderType RENDER_TYPE = RenderType.entityCutoutNoCull(TEXTURE_LOCATION); - - public LithiumSparkRenderer(EntityRendererProvider.Context p_173962_) { - super(p_173962_); - } - - - - protected int getBlockLightLevel(LithiumSpark p_114087_, BlockPos p_114088_) { - return 15; - } - - public void render(LithiumSpark p_114080_, float p_114081_, float p_114082_, PoseStack p_114083_, MultiBufferSource p_114084_, int p_114085_) { - p_114083_.pushPose(); - p_114083_.scale(0.5F, 0.5F, 0.5F); - p_114083_.mulPose(this.entityRenderDispatcher.cameraOrientation()); - p_114083_.mulPose(Axis.YP.rotationDegrees(180.0F)); - PoseStack.Pose posestack$pose = p_114083_.last(); - Matrix4f matrix4f = posestack$pose.pose(); - Matrix3f matrix3f = posestack$pose.normal(); - VertexConsumer vertexconsumer = p_114084_.getBuffer(RENDER_TYPE); - vertex(vertexconsumer, matrix4f, matrix3f, p_114085_, 0.0F, 0, 0, 1); - vertex(vertexconsumer, matrix4f, matrix3f, p_114085_, 1.0F, 0, 1, 1); - vertex(vertexconsumer, matrix4f, matrix3f, p_114085_, 1.0F, 1, 1, 0); - vertex(vertexconsumer, matrix4f, matrix3f, p_114085_, 0.0F, 1, 0, 0); - p_114083_.popPose(); - super.render(p_114080_, p_114081_, p_114082_, p_114083_, p_114084_, p_114085_); - } - - private static void vertex(VertexConsumer p_114090_, Matrix4f p_114091_, Matrix3f p_114092_, int p_114093_, float p_114094_, int p_114095_, int p_114096_, int p_114097_) { - p_114090_.addVertex(p_114091_, p_114094_ - 0.5F, (float)p_114095_ - 0.25F, 0.0F).setColor(255, 255, 255, 255).setUv((float)p_114096_, (float)p_114097_).setOverlay(OverlayTexture.NO_OVERLAY).setUv2(p_114093_,p_114093_).setNormal( 0.0F, 1.0F, 0.0F); - } - - public ResourceLocation getTextureLocation(LithiumSpark p_114078_) { - return TEXTURE_LOCATION; - } -} \ No newline at end of file diff --git a/src/main/java/com/drmangotea/tfmg/mixin/accessor/FlywheelBlockEntityMixin.java b/src/main/java/com/drmangotea/tfmg/mixin/accessor/FlywheelBlockEntityMixin.java new file mode 100644 index 00000000..ae4d315a --- /dev/null +++ b/src/main/java/com/drmangotea/tfmg/mixin/accessor/FlywheelBlockEntityMixin.java @@ -0,0 +1,18 @@ +package com.drmangotea.tfmg.mixin.accessor; + +import com.simibubi.create.content.kinetics.flywheel.FlywheelBlockEntity; +import net.createmod.catnip.animation.LerpedFloat; +import org.spongepowered.asm.mixin.Mixin; +import org.spongepowered.asm.mixin.gen.Accessor; + +@Mixin(FlywheelBlockEntity.class) +public interface FlywheelBlockEntityMixin { + + + @Accessor("angle") + float tfmg$angle(); + + @Accessor("visualSpeed") + LerpedFloat tfmg$visualSpeed(); + +} diff --git a/src/main/java/com/drmangotea/tfmg/mixin/accessor/SlidingDoorBlockEntityAccessor.java b/src/main/java/com/drmangotea/tfmg/mixin/accessor/SlidingDoorBlockEntityAccessor.java new file mode 100644 index 00000000..236d61a8 --- /dev/null +++ b/src/main/java/com/drmangotea/tfmg/mixin/accessor/SlidingDoorBlockEntityAccessor.java @@ -0,0 +1,18 @@ +package com.drmangotea.tfmg.mixin.accessor; + +import com.simibubi.create.content.decoration.slidingDoor.SlidingDoorBlockEntity; +import net.createmod.catnip.animation.LerpedFloat; +import net.minecraft.world.level.block.state.BlockState; +import org.spongepowered.asm.mixin.Mixin; +import org.spongepowered.asm.mixin.gen.Accessor; +import org.spongepowered.asm.mixin.gen.Invoker; + +@Mixin(SlidingDoorBlockEntity.class) +public interface SlidingDoorBlockEntityAccessor { + + @Accessor("animation") + LerpedFloat i_architecture$getAnimation(); + + @Invoker("shouldRenderSpecial") + boolean i_architecture$shouldRenderSpecial(BlockState state); +} diff --git a/src/main/java/com/drmangotea/tfmg/registry/TFMGBlockEntities.java b/src/main/java/com/drmangotea/tfmg/registry/TFMGBlockEntities.java index 326a0bdf..c63f45d3 100644 --- a/src/main/java/com/drmangotea/tfmg/registry/TFMGBlockEntities.java +++ b/src/main/java/com/drmangotea/tfmg/registry/TFMGBlockEntities.java @@ -1,12 +1,10 @@ package com.drmangotea.tfmg.registry; import com.drmangotea.tfmg.base.HalfShaftRenderer; -import com.drmangotea.tfmg.content.decoration.cogs.*; -import com.drmangotea.tfmg.content.decoration.doors.TFMGSlidingDoorBlockEntity; +import com.drmangotea.tfmg.content.decoration.kinetics.cogs.*; import com.drmangotea.tfmg.content.decoration.doors.TFMGSlidingDoorRenderer; -import com.drmangotea.tfmg.content.decoration.flywheels.TFMGFlywheelBlockEntity; -import com.drmangotea.tfmg.content.decoration.flywheels.TFMGFlywheelRenderer; -import com.drmangotea.tfmg.content.decoration.flywheels.TFMGFlywheelVisual; +import com.drmangotea.tfmg.content.decoration.kinetics.flywheels.TFMGFlywheelRenderer; +import com.drmangotea.tfmg.content.decoration.kinetics.flywheels.TFMGFlywheelVisual; import com.drmangotea.tfmg.content.decoration.pipes.TFMGPipeBlockEntity; import com.drmangotea.tfmg.content.decoration.pipes.TFMGPipes; import com.drmangotea.tfmg.content.decoration.tanks.TFMGFluidTankBlockEntity; @@ -47,8 +45,6 @@ import com.drmangotea.tfmg.content.electricity.utilities.potentiometer.Potentiom import com.drmangotea.tfmg.content.electricity.utilities.resistor.ResistorBlockEntity; import com.drmangotea.tfmg.content.electricity.utilities.segmented_display.SegmentedDisplayBlockEntity; import com.drmangotea.tfmg.content.electricity.utilities.segmented_display.SegmentedDisplayRenderer; -import com.drmangotea.tfmg.content.electricity.utilities.segmented_display.SegmentedDisplaySource; -import com.drmangotea.tfmg.content.electricity.utilities.segmented_display.SegmentedDisplayTarget; import com.drmangotea.tfmg.content.electricity.utilities.traffic_light.TrafficLightBlockEntity; import com.drmangotea.tfmg.content.electricity.utilities.traffic_light.TrafficLightRenderer; import com.drmangotea.tfmg.content.electricity.utilities.transformer.TransformerBlockEntity; @@ -103,6 +99,7 @@ import com.drmangotea.tfmg.content.machinery.vat.industrial_mixer.IndustrialMixe import com.drmangotea.tfmg.content.machinery.vat.industrial_mixer.IndustrialMixerRenderer; import com.drmangotea.tfmg.content.machinery.vat.industrial_mixer.IndustrialMixerVisual; import com.simibubi.create.AllPartialModels; +import com.simibubi.create.content.decoration.slidingDoor.SlidingDoorBlockEntity; import com.simibubi.create.content.fluids.pipes.FluidPipeBlockEntity; import com.simibubi.create.content.fluids.pipes.SmartFluidPipeBlockEntity; import com.simibubi.create.content.fluids.pipes.StraightPipeBlockEntity; @@ -113,6 +110,7 @@ import com.simibubi.create.content.fluids.pipes.valve.FluidValveVisual; import com.simibubi.create.content.fluids.pump.PumpBlockEntity; import com.simibubi.create.content.fluids.pump.PumpRenderer; import com.simibubi.create.content.kinetics.base.*; +import com.simibubi.create.content.kinetics.flywheel.FlywheelBlockEntity; import com.simibubi.create.content.kinetics.gearbox.GearboxBlockEntity; import com.simibubi.create.content.kinetics.gearbox.GearboxRenderer; import com.simibubi.create.content.kinetics.gearbox.GearboxVisual; @@ -299,8 +297,8 @@ public class TFMGBlockEntities { .validBlocks(TFMGBlocks.POTENTIOMETER, TFMGBlocks.ENCASED_POTENTIOMETER) .register(); - public static final BlockEntityEntry TFMG_SLIDING_DOOR = - REGISTRATE.blockEntity("tfmg_sliding_door", TFMGSlidingDoorBlockEntity::new) + public static final BlockEntityEntry TFMG_SLIDING_DOOR = + REGISTRATE.blockEntity("tfmg_sliding_door", SlidingDoorBlockEntity::new) .renderer(() -> TFMGSlidingDoorRenderer::new) .validBlocks(TFMGBlocks.HEAVY_CASING_DOOR, TFMGBlocks.STEEL_CASING_DOOR, TFMGBlocks.HEAVY_PLATED_DOOR, TFMGBlocks.ALUMINUM_DOOR) .register(); @@ -456,8 +454,8 @@ public class TFMGBlockEntities { .renderer(() -> GearboxRenderer::new) .register(); - public static final BlockEntityEntry TFMG_FLYWHEEL = REGISTRATE - .blockEntity("steel_flywheel", TFMGFlywheelBlockEntity::new) + public static final BlockEntityEntry TFMG_FLYWHEEL = REGISTRATE + .blockEntity("steel_flywheel", FlywheelBlockEntity::new) .visual(() -> TFMGFlywheelVisual::new, false) .validBlocks( TFMGBlocks.STEEL_FLYWHEEL, diff --git a/src/main/java/com/drmangotea/tfmg/registry/TFMGBlocks.java b/src/main/java/com/drmangotea/tfmg/registry/TFMGBlocks.java index e1d106da..fcc39339 100644 --- a/src/main/java/com/drmangotea/tfmg/registry/TFMGBlocks.java +++ b/src/main/java/com/drmangotea/tfmg/registry/TFMGBlocks.java @@ -6,12 +6,13 @@ import com.drmangotea.tfmg.base.blocks.TFMGDirectionalBlock; import com.drmangotea.tfmg.base.blocks.TFMGVanillaBlockStates; import com.drmangotea.tfmg.config.TFMGStress; import com.drmangotea.tfmg.content.decoration.*; -import com.drmangotea.tfmg.content.decoration.cogs.TFMGCogWheelBlock; -import com.drmangotea.tfmg.content.decoration.cogs.TFMGCogwheelBlockItem; +import com.drmangotea.tfmg.content.decoration.kinetics.cogs.TFMGCogWheelBlock; +import com.drmangotea.tfmg.content.decoration.kinetics.cogs.TFMGCogwheelBlockItem; import com.drmangotea.tfmg.content.decoration.concrete.*; import com.drmangotea.tfmg.content.decoration.doors.TFMGSlidingDoorBlock; -import com.drmangotea.tfmg.content.decoration.flywheels.TFMGFlywheelBlock; -import com.drmangotea.tfmg.content.decoration.gearbox.SteelGearboxBlock; +import com.drmangotea.tfmg.content.decoration.kinetics.flywheels.TFMGFlywheelBlock; +import com.drmangotea.tfmg.content.decoration.kinetics.gearbox.SteelGearboxBlock; +import com.drmangotea.tfmg.content.decoration.tanks.TFMGTankGenerator; import com.drmangotea.tfmg.content.decoration.tanks.aluminum.AluminumFluidTankModel; import com.drmangotea.tfmg.content.decoration.tanks.aluminum.AluminumTankBlock; import com.drmangotea.tfmg.content.decoration.tanks.aluminum.AluminumTankItem; @@ -20,7 +21,6 @@ import com.drmangotea.tfmg.content.decoration.tanks.cast_iron.CastIronTankBlock; import com.drmangotea.tfmg.content.decoration.tanks.cast_iron.CastIronTankItem; import com.drmangotea.tfmg.content.decoration.tanks.steel.SteelFluidTankModel; import com.drmangotea.tfmg.content.decoration.tanks.steel.SteelTankBlock; -import com.drmangotea.tfmg.content.decoration.tanks.TFMGTankGenerator; import com.drmangotea.tfmg.content.decoration.tanks.steel.SteelTankItem; import com.drmangotea.tfmg.content.electricity.connection.CableHubBlock; import com.drmangotea.tfmg.content.electricity.connection.cables.CableConnectorBlock; @@ -50,8 +50,8 @@ import com.drmangotea.tfmg.content.electricity.utilities.electric_motor.Electric import com.drmangotea.tfmg.content.electricity.utilities.electric_pump.ElectricPumpBlock; import com.drmangotea.tfmg.content.electricity.utilities.electric_switch.ElectricSwitchBlock; import com.drmangotea.tfmg.content.electricity.utilities.polarizer.PolarizerBlock; -import com.drmangotea.tfmg.content.electricity.utilities.potentiometer.PotentiometerBlock; import com.drmangotea.tfmg.content.electricity.utilities.potentiometer.EncasedPotentiometerBlock; +import com.drmangotea.tfmg.content.electricity.utilities.potentiometer.PotentiometerBlock; import com.drmangotea.tfmg.content.electricity.utilities.resistor.ResistorBlock; import com.drmangotea.tfmg.content.electricity.utilities.resistor.ResistorBlockItem; import com.drmangotea.tfmg.content.electricity.utilities.segmented_display.SegmentedDisplayBlock; @@ -111,7 +111,6 @@ import com.drmangotea.tfmg.content.machinery.vat.base.VatBlock; import com.drmangotea.tfmg.content.machinery.vat.base.VatGenerator; import com.drmangotea.tfmg.content.machinery.vat.electrode_holder.ElectrodeHolderBlock; import com.drmangotea.tfmg.content.machinery.vat.industrial_mixer.IndustrialMixerBlock; -import com.simibubi.create.AllDisplaySources; import com.simibubi.create.AllTags; import com.simibubi.create.api.stress.BlockStressValues; import com.simibubi.create.content.contraptions.bearing.StabilizedBearingMovementBehaviour; @@ -161,7 +160,6 @@ import static com.simibubi.create.foundation.data.CreateRegistrate.casingConnect import static com.simibubi.create.foundation.data.CreateRegistrate.connectedTextures; import static com.simibubi.create.foundation.data.ModelGen.customItemModel; import static com.simibubi.create.foundation.data.TagGen.*; -import static com.simibubi.create.foundation.data.TagGen.tagBlockAndItem; @SuppressWarnings("removal") public class TFMGBlocks { @@ -169,9 +167,9 @@ public class TFMGBlocks { public static final String[] TFMG_DECOR_METALS = {"steel", "aluminum", "lead", "cast_iron"}; - static { - REGISTRATE.setCreativeTab(TFMGCreativeTabs.TFMG_MAIN); - } + static { + REGISTRATE.setCreativeTab(TFMGCreativeTabs.TFMG_MAIN); + } //------------------ENGINES------------------// @@ -207,7 +205,7 @@ public class TFMGBlocks { .transform(customItemModel()) .register(); public static final BlockEntry LARGE_ENGINE = REGISTRATE.block("large_engine", LargeEngineBlock::new) - .initialProperties(() -> Blocks.IRON_BLOCK) + .initialProperties(SharedProperties::softMetal) .properties(p -> p.sound(SoundType.NETHERITE_BLOCK)) .properties(BlockBehaviour.Properties::noOcclusion) .transform(TFMGStress.setCapacity(55)) @@ -216,7 +214,7 @@ public class TFMGBlocks { .transform(customItemModel()) .register(); public static final BlockEntry SIMPLE_LARGE_ENGINE = REGISTRATE.block("simple_large_engine", LargeEngineBlock::new) - .initialProperties(() -> Blocks.IRON_BLOCK) + .initialProperties(SharedProperties::softMetal) .properties(p -> p.sound(SoundType.NETHERITE_BLOCK)) .properties(BlockBehaviour.Properties::noOcclusion) .transform(TFMGStress.setCapacity(40)) @@ -226,7 +224,7 @@ public class TFMGBlocks { .register(); public static final BlockEntry ENGINE_GEARBOX = REGISTRATE.block("engine_gearbox", EngineGearboxBlock::new) - .initialProperties(() -> Blocks.IRON_BLOCK) + .initialProperties(SharedProperties::softMetal) .properties(p -> p.sound(SoundType.NETHERITE_BLOCK)) .properties(BlockBehaviour.Properties::noOcclusion) .blockstate(BlockStateGen.horizontalBlockProvider(true)) @@ -235,7 +233,7 @@ public class TFMGBlocks { .register(); public static final BlockEntry ENGINE_CONTROLLER = REGISTRATE.block("engine_controller", EngineControllerBlock::new) - .initialProperties(() -> Blocks.IRON_BLOCK) + .initialProperties(SharedProperties::softMetal) .properties(p -> p.sound(SoundType.NETHERITE_BLOCK)) .properties(BlockBehaviour.Properties::noOcclusion) .blockstate(BlockStateGen.horizontalBlockProvider(true)) @@ -245,7 +243,7 @@ public class TFMGBlocks { //------------------TANKS------------------// public static final BlockEntry ALUMINUM_FLUID_TANK = REGISTRATE.block("aluminum_fluid_tank", AluminumTankBlock::regular) - .initialProperties(SharedProperties::copperMetal) + .initialProperties(SharedProperties::softMetal) .properties(p -> p.sound(SoundType.COPPER)) .properties(BlockBehaviour.Properties::noOcclusion) .properties(p -> p.isRedstoneConductor((p1, p2, p3) -> true)) @@ -261,7 +259,7 @@ public class TFMGBlocks { .register(); public static final BlockEntry CAST_IRON_FLUID_TANK = REGISTRATE.block("cast_iron_fluid_tank", CastIronTankBlock::regular) - .initialProperties(SharedProperties::copperMetal) + .initialProperties(SharedProperties::softMetal) .properties(p -> p.sound(SoundType.METAL)) .properties(BlockBehaviour.Properties::noOcclusion) .transform(mountedFluidStorage(TFMGMountedStorageTypes.TFMG_FLUID_TANK)) @@ -279,7 +277,7 @@ public class TFMGBlocks { //------------------DISTILLATION_TOWER------------------// public static final BlockEntry STEEL_FLUID_TANK = REGISTRATE.block("steel_fluid_tank", SteelTankBlock::regular) - .initialProperties(SharedProperties::copperMetal) + .initialProperties(SharedProperties::softMetal) .properties(p -> p.sound(SoundType.NETHERITE_BLOCK)) .properties(BlockBehaviour.Properties::noOcclusion) .properties(p -> p.isRedstoneConductor((p1, p2, p3) -> true)) @@ -296,7 +294,7 @@ public class TFMGBlocks { public static final BlockEntry STEEL_DISTILLATION_OUTPUT = REGISTRATE.block("steel_distillation_output", DistillationOutputBlock::new) - .initialProperties(SharedProperties::copperMetal) + .initialProperties(SharedProperties::softMetal) .blockstate((ctx, prov) -> prov.simpleBlock(ctx.getEntry(), AssetLookup.partialBaseModel(ctx, prov))) .properties(BlockBehaviour.Properties::noOcclusion) .properties(p -> p.sound(SoundType.NETHERITE_BLOCK)) @@ -306,7 +304,7 @@ public class TFMGBlocks { .register(); public static final BlockEntry STEEL_DISTILLATION_CONTROLLER = REGISTRATE.block("steel_distillation_controller", DistillationControllerBlock::new) - .initialProperties(SharedProperties::copperMetal) + .initialProperties(SharedProperties::softMetal) .blockstate(BlockStateGen.horizontalBlockProvider(true)) .properties(p -> p.sound(SoundType.NETHERITE_BLOCK)) .transform(pickaxeOnly()) @@ -314,18 +312,17 @@ public class TFMGBlocks { .build() .register(); public static final BlockEntry INDUSTRIAL_PIPE = REGISTRATE.block("industrial_pipe", IndustrialPipeBlock::new) - .initialProperties(() -> Blocks.STONE) + .initialProperties(SharedProperties::softMetal) .properties(p -> p.requiresCorrectToolForDrops()) .properties(p -> p.sound(SoundType.STONE)) .transform(pickaxeOnly()) .tag(TFMGTags.TFMGBlockTags.INDUSTRIAL_PIPE.tag) .recipe((c, p) -> p.stonecutting(DataIngredient.tag(AllTags.commonItemTag("ingots/steel")), RecipeCategory.BUILDING_BLOCKS, c::get, 8)) .blockstate((ctx, prov) -> prov.simpleBlock(ctx.getEntry(), AssetLookup.partialBaseModel(ctx, prov))) - .item() - .build() + .simpleItem() .register(); public static final BlockEntry CONCRETE_ENCASED_INDUSTRIAL_PIPE = REGISTRATE.block("concrete_encased_industrial_pipe", Block::new) - .initialProperties(() -> Blocks.IRON_BLOCK) + .initialProperties(SharedProperties::softMetal) .properties(p -> p.requiresCorrectToolForDrops().noOcclusion()) .properties(p -> p.sound(SoundType.NETHERITE_BLOCK)) .transform(pickaxeOnly()) @@ -351,7 +348,7 @@ public class TFMGBlocks { public static final BlockEntry PUMPJACK_CRANK = REGISTRATE.block("pumpjack_crank", PumpjackCrankBlock::new) - .initialProperties(() -> Blocks.IRON_BLOCK) + .initialProperties(SharedProperties::softMetal) .transform(pickaxeOnly()) .blockstate(BlockStateGen.horizontalBlockProvider(true)) .properties(BlockBehaviour.Properties::noOcclusion) @@ -361,72 +358,62 @@ public class TFMGBlocks { .register(); public static final BlockEntry PUMPJACK_HAMMER_PART = REGISTRATE.block("pumpjack_hammer_part", PumpjackHammerPartBlock::new) - .initialProperties(() -> Blocks.IRON_BLOCK) - + .initialProperties(SharedProperties::softMetal) .transform(pickaxeOnly()) .properties(BlockBehaviour.Properties::noOcclusion) .blockstate(BlockStateGen.horizontalBlockProvider(false)) .tag(TFMGTags.TFMGBlockTags.PUMPJACK_SMALL_PART.tag) .recipe((c, p) -> p.stonecutting(DataIngredient.tag(AllTags.commonItemTag("storage_blocks/steel")), RecipeCategory.DECORATIONS, c::get, 2)) - .item() - .build() + .simpleItem() .register(); public static final BlockEntry PUMPJACK_HAMMER_HEAD = REGISTRATE.block("pumpjack_hammer_head", PumpjackHammerHeadBlock::new) - .initialProperties(() -> Blocks.IRON_BLOCK) + .initialProperties(SharedProperties::softMetal) .transform(pickaxeOnly()) .properties(BlockBehaviour.Properties::noOcclusion) .blockstate(BlockStateGen.horizontalBlockProvider(false)) .tag(TFMGTags.TFMGBlockTags.PUMPJACK_HEAD.tag) - - - .item() - .build() + .simpleItem() .register(); public static final BlockEntry PUMPJACK_HAMMER_CONNECTOR = REGISTRATE.block("pumpjack_hammer_connector", PumpjackHammerConnectorBlock::new) - .initialProperties(() -> Blocks.IRON_BLOCK) + .initialProperties(SharedProperties::softMetal) .transform(pickaxeOnly()) .properties(BlockBehaviour.Properties::noOcclusion) .blockstate(BlockStateGen.horizontalBlockProvider(false)) .tag(TFMGTags.TFMGBlockTags.PUMPJACK_CONNECTOR.tag) - .item() - .build() + .simpleItem() .register(); public static final BlockEntry LARGE_PUMPJACK_HAMMER_PART = REGISTRATE.block("large_pumpjack_hammer_part", LargePumpjackHammerPartBlock::new) - .initialProperties(() -> Blocks.IRON_BLOCK) + .initialProperties(SharedProperties::softMetal) .transform(pickaxeOnly()) .blockstate(BlockStateGen.horizontalBlockProvider(false)) .tag(TFMGTags.TFMGBlockTags.PUMPJACK_PART.tag) .recipe((c, p) -> p.stonecutting(DataIngredient.tag(AllTags.commonItemTag("storage_blocks/steel")), RecipeCategory.DECORATIONS, c::get, 2)) - .item() - .build() + .simpleItem() .register(); public static final BlockEntry LARGE_PUMPJACK_HAMMER_HEAD = REGISTRATE.block("large_pumpjack_hammer_head", LargePumpjackHammerHeadBlock::new) - .initialProperties(() -> Blocks.IRON_BLOCK) + .initialProperties(SharedProperties::softMetal) .transform(pickaxeOnly()) .blockstate(BlockStateGen.horizontalBlockProvider(false)) .tag(TFMGTags.TFMGBlockTags.PUMPJACK_HEAD.tag) - .item() - .build() + .simpleItem() .register(); public static final BlockEntry LARGE_PUMPJACK_HAMMER_CONNECTOR = REGISTRATE.block("large_pumpjack_hammer_connector", LargePumpjackHammerConnectorBlock::new) - .initialProperties(() -> Blocks.IRON_BLOCK) + .initialProperties(SharedProperties::softMetal) .transform(pickaxeOnly()) .blockstate(BlockStateGen.horizontalBlockProvider(false)) .tag(TFMGTags.TFMGBlockTags.PUMPJACK_CONNECTOR.tag) - .item() - .build() + .simpleItem() .register(); public static final BlockEntry PUMPJACK_BASE = REGISTRATE.block("pumpjack_base", PumpjackBaseBlock::new) - .initialProperties(() -> Blocks.IRON_BLOCK) + .initialProperties(SharedProperties::softMetal) .transform(pickaxeOnly()) .properties(BlockBehaviour.Properties::noOcclusion) .blockstate((ctx, prov) -> prov.simpleBlock(ctx.getEntry(), AssetLookup.partialBaseModel(ctx, prov))) - .item() - .build() + .simpleItem() .register(); public static final BlockEntry OIL_DEPOSIT = REGISTRATE.block("oil_deposit", Block::new) .initialProperties(() -> Blocks.BEDROCK) @@ -440,8 +427,7 @@ public class TFMGBlocks { .tag(BlockTags.INFINIBURN_OVERWORLD) .tag(BlockTags.FEATURES_CANNOT_REPLACE) .tag(AllTags.AllBlockTags.NON_MOVABLE.tag) - .item() - .build() + .simpleItem() .register(); //------------------VAT_MACHINES------------------// @SuppressWarnings("'addLayer(java.util.function.Supplier>)' is deprecated and marked for removal ") @@ -512,9 +498,8 @@ public class TFMGBlocks { .requiresCorrectToolForDrops() .sound(SoundType.STONE)) .transform(pickaxeOnly()) - .loot((lt, b) -> { + .loot((lt, b) -> { HolderLookup.RegistryLookup enchantmentRegistryLookup = lt.getRegistries().lookupOrThrow(Registries.ENCHANTMENT); - lt.add(b, lt.createSilkTouchDispatchTable(b, lt.applyExplosionDecay(b, LootItem.lootTableItem(TFMGItems.RAW_LEAD.get()) @@ -533,7 +518,7 @@ public class TFMGBlocks { .requiresCorrectToolForDrops() .sound(SoundType.DEEPSLATE)) .transform(pickaxeOnly()) - .loot((lt, b) -> { + .loot((lt, b) -> { HolderLookup.RegistryLookup enchantmentRegistryLookup = lt.getRegistries().lookupOrThrow(Registries.ENCHANTMENT); lt.add(b, @@ -554,7 +539,7 @@ public class TFMGBlocks { .requiresCorrectToolForDrops() .sound(SoundType.STONE)) .transform(pickaxeOnly()) - .loot((lt, b) -> { + .loot((lt, b) -> { HolderLookup.RegistryLookup enchantmentRegistryLookup = lt.getRegistries().lookupOrThrow(Registries.ENCHANTMENT); lt.add(b, @@ -575,7 +560,7 @@ public class TFMGBlocks { .requiresCorrectToolForDrops() .sound(SoundType.DEEPSLATE)) .transform(pickaxeOnly()) - .loot((lt, b) -> { + .loot((lt, b) -> { HolderLookup.RegistryLookup enchantmentRegistryLookup = lt.getRegistries().lookupOrThrow(Registries.ENCHANTMENT); lt.add(b, @@ -596,7 +581,7 @@ public class TFMGBlocks { .requiresCorrectToolForDrops() .sound(SoundType.STONE)) .transform(pickaxeOnly()) - .loot((lt, b) -> { + .loot((lt, b) -> { HolderLookup.RegistryLookup enchantmentRegistryLookup = lt.getRegistries().lookupOrThrow(Registries.ENCHANTMENT); lt.add(b, @@ -617,7 +602,7 @@ public class TFMGBlocks { .requiresCorrectToolForDrops() .sound(SoundType.DEEPSLATE)) .transform(pickaxeOnly()) - .loot((lt, b) -> { + .loot((lt, b) -> { HolderLookup.RegistryLookup enchantmentRegistryLookup = lt.getRegistries().lookupOrThrow(Registries.ENCHANTMENT); lt.add(b, @@ -634,14 +619,12 @@ public class TFMGBlocks { public static final BlockEntry SULFUR = REGISTRATE.block("sulfur", Block::new) .initialProperties(() -> Blocks.CALCITE) .transform(pickaxeOnly()) - .item() - .build() + .simpleItem() .register(); public static final BlockEntry LIGNITE = REGISTRATE.block("lignite", Block::new) .initialProperties(() -> Blocks.CALCITE) .transform(pickaxeOnly()) - .item() - .build() + .simpleItem() .register(); public static final BlockEntry FIRECLAY = REGISTRATE.block("fireclay", Block::new) .initialProperties(() -> Blocks.CLAY) @@ -656,9 +639,7 @@ public class TFMGBlocks { .properties(p -> p.strength(100f, 1200f)) .properties(p -> p.requiresCorrectToolForDrops()) .transform(pickaxeOnly()) - .item() - .build() - .lang("Fossilstone") + .simpleItem() .register(); public static final BlockEntry SLAG_BLOCK = REGISTRATE.block("slag_block", Block::new) @@ -795,8 +776,7 @@ public class TFMGBlocks { .transform(pickaxeOnly()) .tag(TFMGTags.TFMGBlockTags.BLAST_FURNACE_WALL.tag) .tag(BlockTags.NEEDS_STONE_TOOL) - .item() - .build() + .simpleItem() .register(); public static final BlockEntry REINFORCED_FIREPROOF_BRICKS = REGISTRATE.block("reinforced_fireproof_bricks", Block::new) @@ -810,7 +790,7 @@ public class TFMGBlocks { .register(); public static final BlockEntry BLAST_FURNACE_REINFORCEMENT = REGISTRATE.block("blast_furnace_reinforcement", Block::new) - .initialProperties(() -> Blocks.IRON_BLOCK) + .initialProperties(SharedProperties::softMetal) .properties(BlockBehaviour.Properties::requiresCorrectToolForDrops) .transform(pickaxeOnly()) .onRegister(connectedTextures(() -> new HorizontalCTBehaviour(TFMGSpriteShifts.BLAST_FURNACE_REINFORCEMENT))) @@ -821,7 +801,7 @@ public class TFMGBlocks { .register(); public static final BlockEntry BLAST_FURNACE_REINFORCEMENT_WALL = REGISTRATE.block("blast_furnace_reinforcement_wall", BlastFurnaceReinforcementWallBlock::new) - .initialProperties(() -> Blocks.IRON_BLOCK) + .initialProperties(SharedProperties::softMetal) .properties(BlockBehaviour.Properties::requiresCorrectToolForDrops) .transform(pickaxeOnly()) .properties(BlockBehaviour.Properties::noOcclusion) @@ -832,7 +812,7 @@ public class TFMGBlocks { .register(); // public static final BlockEntry RUSTED_BLAST_FURNACE_REINFORCEMENT = REGISTRATE.block("rusted_blast_furnace_reinforcement", Block::new) - .initialProperties(() -> Blocks.IRON_BLOCK) + .initialProperties(SharedProperties::softMetal) .properties(BlockBehaviour.Properties::requiresCorrectToolForDrops) .transform(pickaxeOnly()) .onRegister(connectedTextures(() -> new HorizontalCTBehaviour(TFMGSpriteShifts.RUSTED_BLAST_FURNACE_REINFORCEMENT))) @@ -843,7 +823,7 @@ public class TFMGBlocks { .register(); public static final BlockEntry RUSTED_BLAST_FURNACE_REINFORCEMENT_WALL = REGISTRATE.block("rusted_blast_furnace_reinforcement_wall", BlastFurnaceReinforcementWallBlock::new) - .initialProperties(() -> Blocks.IRON_BLOCK) + .initialProperties(SharedProperties::softMetal) .properties(BlockBehaviour.Properties::requiresCorrectToolForDrops) .transform(pickaxeOnly()) .properties(BlockBehaviour.Properties::noOcclusion) @@ -866,7 +846,6 @@ public class TFMGBlocks { .build() .register(); - public static final BlockEntry COKE_OVEN = REGISTRATE.block("coke_oven", CokeOvenBlock::new) .initialProperties(() -> Blocks.BRICKS) .properties(p -> p.requiresCorrectToolForDrops()) @@ -889,7 +868,7 @@ public class TFMGBlocks { .register(); public static final BlockEntry CASTING_BASIN = REGISTRATE.block("casting_basin", CastingBasinBlock::new) - .initialProperties(() -> Blocks.IRON_BLOCK) + .initialProperties(SharedProperties::softMetal) .properties(p -> p.requiresCorrectToolForDrops().noOcclusion()) .transform(pickaxeOnly()) .blockstate(BlockStateGen.horizontalBlockProvider(true)) @@ -901,7 +880,7 @@ public class TFMGBlocks { //------------------GADGETS------------------// public static final BlockEntry NAPALM_BOMB = REGISTRATE.block("napalm_bomb", NapalmBombBlock::new) - .initialProperties(() -> Blocks.IRON_BLOCK) + .initialProperties(SharedProperties::softMetal) .properties(p -> p.requiresCorrectToolForDrops()) .transform(pickaxeOnly()) .properties(BlockBehaviour.Properties::noOcclusion) @@ -913,7 +892,7 @@ public class TFMGBlocks { public static final BlockEntry GENERATOR = REGISTRATE.block("generator", GeneratorBlock::new) - .initialProperties(() -> Blocks.IRON_BLOCK) + .initialProperties(SharedProperties::softMetal) .transform(pickaxeOnly()) .properties(BlockBehaviour.Properties::noOcclusion) .transform(TFMGStress.setImpact(50.0f)) @@ -947,7 +926,7 @@ public class TFMGBlocks { public static final BlockEntry RESISTOR = REGISTRATE.block("resistor", ResistorBlock::new) - .initialProperties(() -> Blocks.IRON_BLOCK) + .initialProperties(SharedProperties::softMetal) .transform(pickaxeOnly()) .properties(BlockBehaviour.Properties::noOcclusion) .addLayer(() -> RenderType::cutoutMipped) @@ -973,7 +952,7 @@ public class TFMGBlocks { .register(); public static final BlockEntry BRASS_CABLE_HUB = REGISTRATE.block("brass_cable_hub", CableHubBlock::new) - .initialProperties(() -> Blocks.IRON_BLOCK) + .initialProperties(SharedProperties::softMetal) .transform(pickaxeOnly()) .item() .build() @@ -988,28 +967,28 @@ public class TFMGBlocks { .register(); public static final BlockEntry STEEL_CABLE_HUB = REGISTRATE.block("steel_cable_hub", CableHubBlock::new) - .initialProperties(() -> Blocks.IRON_BLOCK) + .initialProperties(SharedProperties::softMetal) .transform(pickaxeOnly()) .item() .build() .register(); public static final BlockEntry ALUMINUM_CABLE_HUB = REGISTRATE.block("aluminum_cable_hub", CableHubBlock::new) - .initialProperties(() -> Blocks.IRON_BLOCK) + .initialProperties(SharedProperties::softMetal) .transform(pickaxeOnly()) .item() .build() .register(); public static final BlockEntry STEEL_CASING_CABLE_HUB = REGISTRATE.block("steel_casing_cable_hub", CableHubBlock::new) - .initialProperties(() -> Blocks.IRON_BLOCK) + .initialProperties(SharedProperties::softMetal) .transform(pickaxeOnly()) .item() .build() .register(); public static final BlockEntry HEAVY_CABLE_HUB = REGISTRATE.block("heavy_cable_hub", CableHubBlock::new) - .initialProperties(() -> Blocks.IRON_BLOCK) + .initialProperties(SharedProperties::softMetal) .transform(pickaxeOnly()) .item() .build() @@ -1017,7 +996,7 @@ public class TFMGBlocks { public static final BlockEntry CABLE_TUBE = REGISTRATE.block("cable_tube", p -> new CableTubeBlock(p, false)) - .initialProperties(() -> Blocks.IRON_BLOCK) + .initialProperties(SharedProperties::softMetal) .transform(pickaxeOnly()) .properties(p -> p.noOcclusion()) .blockstate(BlockStateGen.axisBlockProvider(false)) @@ -1035,7 +1014,7 @@ public class TFMGBlocks { public static final BlockEntry ELECTRIC_POST = REGISTRATE.block("electric_post", p -> new CableTubeBlock(p, false)) - .initialProperties(() -> Blocks.IRON_BLOCK) + .initialProperties(SharedProperties::softMetal) .blockstate(BlockStateGen.axisBlockProvider(false)) .transform(pickaxeOnly()) .item() @@ -1052,7 +1031,7 @@ public class TFMGBlocks { public static final BlockEntry DIAGONAL_CABLE_BLOCK = REGISTRATE.block("diagonal_cable_block", DiagonalCableBlock::new) - .initialProperties(() -> Blocks.IRON_BLOCK) + .initialProperties(SharedProperties::softMetal) .transform(pickaxeOnly()) .addLayer(() -> RenderType::cutoutMipped) .blockstate(new DiagonalCableGenerator()::generate) @@ -1063,7 +1042,7 @@ public class TFMGBlocks { public static final BlockEntry ELECTRIC_MOTOR = REGISTRATE.block("electric_motor", ElectricMotorBlock::new) - .initialProperties(() -> Blocks.IRON_BLOCK) + .initialProperties(SharedProperties::softMetal) .transform(pickaxeOnly()) .properties(BlockBehaviour.Properties::noOcclusion) .blockstate(new CreativeMotorGenerator()::generate) @@ -1074,7 +1053,7 @@ public class TFMGBlocks { .register(); public static final BlockEntry CREATIVE_GENERATOR = REGISTRATE.block("creative_generator", CreativeGeneratorBlock::new) - .initialProperties(() -> Blocks.IRON_BLOCK) + .initialProperties(SharedProperties::softMetal) .properties(p -> p.requiresCorrectToolForDrops()) .transform(pickaxeOnly()) .simpleItem() @@ -1082,7 +1061,7 @@ public class TFMGBlocks { public static final BlockEntry ACCUMULATOR = REGISTRATE.block("accumulator", AccumulatorBlock::new) - .initialProperties(() -> Blocks.IRON_BLOCK) + .initialProperties(SharedProperties::softMetal) .transform(pickaxeOnly()) .onRegister(connectedTextures(() -> new CapacitorCTBehavior(TFMGSpriteShifts.ACCUMULATOR))) .blockstate(BlockStateGen.directionalBlockProvider(true)) @@ -1092,7 +1071,7 @@ public class TFMGBlocks { ; public static final BlockEntry LIGHT_BULB = REGISTRATE.block("light_bulb", p -> new LightBulbBlock(p, TFMGBlockEntities.LIGHT_BULB, TFMGShapes.LIGHT_BULB)) - .initialProperties(() -> Blocks.IRON_BLOCK) + .initialProperties(SharedProperties::softMetal) .properties(p -> p.lightLevel(s -> s.getValue(LIGHT))) .transform(pickaxeOnly()) .addLayer(() -> RenderType::cutoutMipped) @@ -1103,7 +1082,7 @@ public class TFMGBlocks { .register(); public static final BlockEntry CIRCULAR_LIGHT = REGISTRATE.block("circular_light", p -> new LightBulbBlock(p, TFMGBlockEntities.CIRCULAR_LIGHT, TFMGShapes.CIRCULAR_LIGHT)) - .initialProperties(() -> Blocks.IRON_BLOCK) + .initialProperties(SharedProperties::softMetal) .properties(p -> p.lightLevel(s -> s.getValue(LIGHT))) .transform(pickaxeOnly()) .addLayer(() -> RenderType::cutoutMipped) @@ -1115,7 +1094,7 @@ public class TFMGBlocks { .register(); public static final BlockEntry MODERN_LIGHT = REGISTRATE.block("modern_light", p -> new LightBulbBlock(p, TFMGBlockEntities.MODERN_LIGHT, TFMGShapes.MODERN_LIGHT)) - .initialProperties(() -> Blocks.IRON_BLOCK) + .initialProperties(SharedProperties::softMetal) .properties(p -> p.lightLevel(s -> s.getValue(LIGHT))) .transform(pickaxeOnly()) .addLayer(() -> RenderType::cutoutMipped) @@ -1127,7 +1106,7 @@ public class TFMGBlocks { .register(); public static final BlockEntry ALUMINUM_LAMP = REGISTRATE.block("aluminum_lamp", p -> new LightBulbBlock(p, TFMGBlockEntities.ALUMINUM_LAMP, TFMGShapes.ALUMINUM_LAMP)) - .initialProperties(() -> Blocks.IRON_BLOCK) + .initialProperties(SharedProperties::softMetal) .properties(p -> p.lightLevel(s -> s.getValue(LIGHT))) .transform(pickaxeOnly()) .addLayer(() -> RenderType::cutoutMipped) @@ -1152,7 +1131,7 @@ public class TFMGBlocks { public static final BlockEntry DIODE = REGISTRATE.block("electric_diode", ElectricDiodeBlock::new) - .initialProperties(() -> Blocks.IRON_BLOCK) + .initialProperties(SharedProperties::softMetal) .transform(pickaxeOnly()) .properties(BlockBehaviour.Properties::noOcclusion) .blockstate(new CreativeMotorGenerator()::generate) @@ -1162,7 +1141,7 @@ public class TFMGBlocks { .register(); public static final BlockEntry ENCASED_DIODE = REGISTRATE.block("encased_diode", EncasedDiodeBlock::new) - .initialProperties(() -> Blocks.IRON_BLOCK) + .initialProperties(SharedProperties::softMetal) .transform(pickaxeOnly()) .transform(EncasingRegistry.addVariantTo(DIODE)) .blockstate(BlockStateGen.directionalBlockProvider(false)) @@ -1170,7 +1149,7 @@ public class TFMGBlocks { public static final BlockEntry POTENTIOMETER = REGISTRATE.block("potentiometer", PotentiometerBlock::new) - .initialProperties(() -> Blocks.IRON_BLOCK) + .initialProperties(SharedProperties::softMetal) .transform(pickaxeOnly()) .properties(BlockBehaviour.Properties::noOcclusion) .blockstate(new CreativeMotorGenerator()::generate) @@ -1179,7 +1158,7 @@ public class TFMGBlocks { .register(); public static final BlockEntry ELECTRICAL_SWITCH = REGISTRATE.block("electrical_switch", ElectricSwitchBlock::new) - .initialProperties(() -> Blocks.IRON_BLOCK) + .initialProperties(SharedProperties::softMetal) .transform(pickaxeOnly()) .blockstate(BlockStateGen.directionalBlockProvider(true)) .lang("Electric Switch") @@ -1188,14 +1167,14 @@ public class TFMGBlocks { .register(); public static final BlockEntry ENCASED_POTENTIOMETER = REGISTRATE.block("encased_potentiometer", EncasedPotentiometerBlock::new) - .initialProperties(() -> Blocks.IRON_BLOCK) + .initialProperties(SharedProperties::softMetal) .transform(pickaxeOnly()) .transform(EncasingRegistry.addVariantTo(POTENTIOMETER)) .blockstate(BlockStateGen.directionalBlockProvider(false)) .register(); public static final BlockEntry ELECTRIC_PUMP = REGISTRATE.block("electric_pump", ElectricPumpBlock::new) - .initialProperties(() -> Blocks.IRON_BLOCK) + .initialProperties(SharedProperties::softMetal) .transform(pickaxeOnly()) .properties(BlockBehaviour.Properties::noOcclusion) .blockstate(BlockStateGen.directionalBlockProvider(true)) @@ -1204,7 +1183,7 @@ public class TFMGBlocks { .register(); public static final BlockEntry VOLTAGE_OBSERVER = REGISTRATE.block("voltage_observer", VoltageObserverBlock::new) - .initialProperties(() -> Blocks.IRON_BLOCK) + .initialProperties(SharedProperties::softMetal) .transform(pickaxeOnly()) .properties(BlockBehaviour.Properties::noOcclusion) .blockstate(new VoltageObserverGenerator()::generate) @@ -1223,7 +1202,7 @@ public class TFMGBlocks { .register(); public static final BlockEntry VOLTMETER = REGISTRATE.block("voltmeter", VoltMeterBlock::new) - .initialProperties(() -> Blocks.IRON_BLOCK) + .initialProperties(SharedProperties::softMetal) .transform(pickaxeOnly()) .properties(BlockBehaviour.Properties::noOcclusion) .blockstate(BlockStateGen.horizontalBlockProvider(true)) @@ -1233,7 +1212,7 @@ public class TFMGBlocks { .register(); public static final BlockEntry POLARIZER = REGISTRATE.block("polarizer", PolarizerBlock::new) - .initialProperties(() -> Blocks.IRON_BLOCK) + .initialProperties(SharedProperties::softMetal) .transform(pickaxeOnly()) .properties(BlockBehaviour.Properties::noOcclusion) .addLayer(() -> RenderType::cutoutMipped) @@ -1243,7 +1222,7 @@ public class TFMGBlocks { .register(); public static final BlockEntry ROTOR = REGISTRATE.block("rotor", RotorBlock::new) - .initialProperties(() -> Blocks.IRON_BLOCK) + .initialProperties(SharedProperties::softMetal) .transform(pickaxeOnly()) .properties(BlockBehaviour.Properties::noOcclusion) .blockstate(BlockStateGen.axisBlockProvider(true)) @@ -1254,7 +1233,7 @@ public class TFMGBlocks { public static final BlockEntry STATOR = REGISTRATE.block("stator", StatorBlock::new) - .initialProperties(() -> Blocks.IRON_BLOCK) + .initialProperties(SharedProperties::softMetal) .transform(pickaxeOnly()) .addLayer(() -> RenderType::cutoutMipped) .properties(BlockBehaviour.Properties::noOcclusion) @@ -1264,7 +1243,7 @@ public class TFMGBlocks { .register(); public static final BlockEntry TRAFFIC_LIGHT = REGISTRATE.block("traffic_light", TrafficLightBlock::new) - .initialProperties(() -> Blocks.IRON_BLOCK) + .initialProperties(SharedProperties::softMetal) .transform(pickaxeOnly()) .properties(BlockBehaviour.Properties::noOcclusion) .addLayer(() -> RenderType::cutoutMipped) @@ -1274,7 +1253,7 @@ public class TFMGBlocks { .register(); public static final BlockEntry SEGMENTED_DISPLAY = REGISTRATE.block("segmented_display", SegmentedDisplayBlock::new) - .initialProperties(() -> Blocks.IRON_BLOCK) + .initialProperties(SharedProperties::softMetal) .transform(pickaxeOnly()) .onRegister(connectedTextures(SegmentedDisplayCTBehavior::new)) .blockstate(BlockStateGen.horizontalBlockProvider(true)) @@ -1284,7 +1263,7 @@ public class TFMGBlocks { public static final BlockEntry TRANSFORMER = REGISTRATE.block("transformer", TransformerBlock::new) - .initialProperties(() -> Blocks.IRON_BLOCK) + .initialProperties(SharedProperties::softMetal) .transform(pickaxeOnly()) .blockstate(BlockStateGen.horizontalBlockProvider(true)) .properties(BlockBehaviour.Properties::noOcclusion) @@ -1295,7 +1274,7 @@ public class TFMGBlocks { public static final BlockEntry CONVERTER = REGISTRATE.block("converter", ConverterBlock::new) - .initialProperties(() -> Blocks.IRON_BLOCK) + .initialProperties(SharedProperties::softMetal) .transform(pickaxeOnly()) .blockstate(new ConverterGenerator()::generate) .properties(BlockBehaviour.Properties::noOcclusion) @@ -1305,7 +1284,7 @@ public class TFMGBlocks { //public static final BlockEntry FUSE_BLOCK = // REGISTRATE.block("fuse_block", FuseBlock::new) - // .initialProperties(() -> Blocks.IRON_BLOCK) + // .initialProperties(SharedProperties::softMetal) // .transform(pickaxeOnly()) // .properties(BlockBehaviour.Properties::noOcclusion) // .addLayer(() -> RenderType::cutoutMipped) @@ -1326,7 +1305,7 @@ public class TFMGBlocks { .register(); public static final BlockEntry METAL_SMOKESTACK = REGISTRATE.block("metal_smokestack", SmokestackBlock::new) - .initialProperties(() -> Blocks.IRON_BLOCK) + .initialProperties(SharedProperties::softMetal) .properties(p -> p.requiresCorrectToolForDrops()) .transform(pickaxeOnly()) .blockstate(new SmokestackGenerator()::generate) @@ -1345,7 +1324,7 @@ public class TFMGBlocks { public static final BlockEntry EXHAUST = REGISTRATE.block("exhaust", ExhaustBlock::new) - .initialProperties(() -> Blocks.IRON_BLOCK) + .initialProperties(SharedProperties::softMetal) .addLayer(() -> RenderType::cutoutMipped) .properties(p -> p.sound(SoundType.NETHERITE_BLOCK)) .blockstate(BlockStateGen.directionalBlockProvider(false)) @@ -1439,7 +1418,7 @@ public class TFMGBlocks { .register(); //------------------STORAGE_BLOCKS------------------// public static final BlockEntry STEEL_BLOCK = REGISTRATE.block("steel_block", Block::new) - .initialProperties(() -> Blocks.IRON_BLOCK) + .initialProperties(SharedProperties::softMetal) .properties(p -> p.requiresCorrectToolForDrops()) .onRegister(connectedTextures(() -> new EncasedCTBehaviour(TFMGSpriteShifts.STEEL_BLOCK))) @@ -1457,7 +1436,7 @@ public class TFMGBlocks { .lang("Block of Steel") .register(); public static final BlockEntry CAST_IRON_BLOCK = REGISTRATE.block("cast_iron_block", Block::new) - .initialProperties(() -> Blocks.IRON_BLOCK) + .initialProperties(SharedProperties::softMetal) .properties(p -> p.requiresCorrectToolForDrops()) .onRegister(connectedTextures(() -> new EncasedCTBehaviour(TFMGSpriteShifts.CAST_IRON_BLOCK))) @@ -1474,7 +1453,7 @@ public class TFMGBlocks { .register(); public static final BlockEntry ALUMINUM_BLOCK = REGISTRATE.block("aluminum_block", Block::new) - .initialProperties(() -> Blocks.IRON_BLOCK) + .initialProperties(SharedProperties::softMetal) .properties(p -> p.requiresCorrectToolForDrops()) .onRegister(connectedTextures(() -> new EncasedCTBehaviour(TFMGSpriteShifts.CAST_IRON_BLOCK))) @@ -1504,7 +1483,7 @@ public class TFMGBlocks { .register(); public static final BlockEntry LEAD_BLOCK = REGISTRATE.block("lead_block", Block::new) - .initialProperties(() -> Blocks.IRON_BLOCK) + .initialProperties(SharedProperties::softMetal) .properties(p -> p.requiresCorrectToolForDrops()) .onRegister(connectedTextures(() -> new EncasedCTBehaviour(TFMGSpriteShifts.LEAD_BLOCK))) .onRegister(casingConnectivity((block, cc) -> cc.makeCasing(block, TFMGSpriteShifts.LEAD_BLOCK))) @@ -1520,7 +1499,7 @@ public class TFMGBlocks { .register(); public static final BlockEntry CONSTANTAN_BLOCK = REGISTRATE.block("constantan_block", Block::new) - .initialProperties(() -> Blocks.IRON_BLOCK) + .initialProperties(SharedProperties::softMetal) .properties(p -> p.requiresCorrectToolForDrops()) .transform(pickaxeOnly()) .blockstate(simpleCubeAll("constantan_block")) @@ -1534,7 +1513,7 @@ public class TFMGBlocks { .register(); public static final BlockEntry NICKEL_BLOCK = REGISTRATE.block("nickel_block", Block::new) - .initialProperties(() -> Blocks.IRON_BLOCK) + .initialProperties(SharedProperties::softMetal) .properties(p -> p.requiresCorrectToolForDrops()) .onRegister(connectedTextures(() -> new EncasedCTBehaviour(TFMGSpriteShifts.LEAD_BLOCK))) .onRegister(casingConnectivity((block, cc) -> cc.makeCasing(block, TFMGSpriteShifts.LEAD_BLOCK))) @@ -1549,7 +1528,7 @@ public class TFMGBlocks { .register(); public static final BlockEntry LITHIUM_BLOCK = REGISTRATE.block("lithium_block", LithiumBlock::new) - .initialProperties(() -> Blocks.IRON_BLOCK) + .initialProperties(SharedProperties::softMetal) .properties(p -> p.requiresCorrectToolForDrops()) .onRegister(connectedTextures(() -> new EncasedCTBehaviour(TFMGSpriteShifts.LEAD_BLOCK))) .onRegister(casingConnectivity((block, cc) -> cc.makeCasing(block, TFMGSpriteShifts.LEAD_BLOCK))) @@ -1568,7 +1547,7 @@ public class TFMGBlocks { public static final BlockEntry COAL_COKE_BLOCK = REGISTRATE.block("coal_coke_block", Block::new) - .initialProperties(() -> Blocks.IRON_BLOCK) + .initialProperties(SharedProperties::softMetal) .properties(p -> p.requiresCorrectToolForDrops()) .transform(pickaxeOnly()) .blockstate(simpleCubeAll("coal_coke_block")) @@ -1582,11 +1561,10 @@ public class TFMGBlocks { .lang("Block of Coal Coke") .register(); - public static final BlockEntry CEMENT = REGISTRATE.block("cement", p->new ColoredFallingBlock(new ColorRGBA(-8356741),p)) + public static final BlockEntry CEMENT = REGISTRATE.block("cement", p -> new ColoredFallingBlock(new ColorRGBA(-8356741), p)) .initialProperties(() -> Blocks.CLAY) .tag(BlockTags.MINEABLE_WITH_SHOVEL) - .item() - .build() + .simpleItem() .register(); //------------------DOOR------------------// @@ -1621,9 +1599,6 @@ public class TFMGBlocks { .register(); - - - static { REGISTRATE.setCreativeTab(TFMGCreativeTabs.TFMG_DECORATION); } @@ -1762,7 +1737,7 @@ public class TFMGBlocks { public static final BlockEntry FACTORY_FLOOR = REGISTRATE.block("factory_floor", Block::new) - .initialProperties(() -> Blocks.IRON_BLOCK) + .initialProperties(SharedProperties::softMetal) .properties(p -> p .strength(3.0F) .requiresCorrectToolForDrops() @@ -1772,7 +1747,7 @@ public class TFMGBlocks { .simpleItem() .register(); - // public static final MaterialSet FACTORY_FLOOR_SET = makeVariants(FACTORY_FLOOR, true); + // public static final MaterialSet FACTORY_FLOOR_SET = makeVariants(FACTORY_FLOOR, true); public static final BlockEntry HARDENED_PLANKS = REGISTRATE.block("hardened_planks", Block::new) @@ -1784,7 +1759,7 @@ public class TFMGBlocks { .simpleItem() .register(); - // public static final MaterialSet HARDENED_PLANKS_SET = makeVariants(HARDENED_PLANKS, true); + // public static final MaterialSet HARDENED_PLANKS_SET = makeVariants(HARDENED_PLANKS, true); public static final BlockEntry STEEL_TRAPDOOR = REGISTRATE.block("steel_trapdoor", TrainTrapdoorBlock::new) @@ -1823,7 +1798,7 @@ public class TFMGBlocks { //------------------CONCRETE------------------// public static final BlockEntry REBAR_BLOCK = REGISTRATE.block("rebar_block", SimpleConcreteloggedBlock::new) - .initialProperties(() -> Blocks.IRON_BLOCK) + .initialProperties(SharedProperties::softMetal) .properties(p -> p.noOcclusion()) .properties(p -> p.sound(SoundType.NETHERITE_BLOCK)) .addLayer(() -> RenderType::cutoutMipped) @@ -1833,7 +1808,7 @@ public class TFMGBlocks { .register(); public static final BlockEntry REBAR_FLOOR = REGISTRATE.block("rebar_floor", RebarFloorBlock::new) - .initialProperties(() -> Blocks.IRON_BLOCK) + .initialProperties(SharedProperties::softMetal) .properties(p -> p.noOcclusion()) .properties(p -> p.sound(SoundType.NETHERITE_BLOCK)) .addLayer(() -> RenderType::cutoutMipped) @@ -1843,7 +1818,7 @@ public class TFMGBlocks { .register(); public static final BlockEntry REBAR_WALL = REGISTRATE.block("rebar_wall", RebarWallBlock::new) - .initialProperties(() -> Blocks.IRON_BLOCK) + .initialProperties(SharedProperties::softMetal) .properties(p -> p.noOcclusion()) .properties(p -> p.sound(SoundType.NETHERITE_BLOCK)) .addLayer(() -> RenderType::cutoutMipped) @@ -1853,7 +1828,7 @@ public class TFMGBlocks { .register(); public static final BlockEntry REBAR_PILE = REGISTRATE.block("rebar_pile", TFMGDirectionalBlock::new) - .initialProperties(() -> Blocks.IRON_BLOCK) + .initialProperties(SharedProperties::softMetal) .properties(p -> p.sound(SoundType.NETHERITE_BLOCK)) .addLayer(() -> RenderType::cutoutMipped) .blockstate(BlockStateGen.directionalBlockProvider(true)) @@ -1862,7 +1837,7 @@ public class TFMGBlocks { .register(); public static final BlockEntry REBAR_STAIRS = REGISTRATE.block("rebar_stairs", p -> new RebarStairsBlock(REBAR_PILE.getDefaultState(), p)) - .initialProperties(() -> Blocks.IRON_BLOCK) + .initialProperties(SharedProperties::softMetal) .properties(p -> p.noOcclusion()) .properties(p -> p.sound(SoundType.NETHERITE_BLOCK)) .addLayer(() -> RenderType::cutoutMipped) @@ -1873,7 +1848,7 @@ public class TFMGBlocks { public static final BlockEntry REBAR_PILLAR = REGISTRATE.block("rebar_pillar", RebarPillarBlock::new) - .initialProperties(() -> Blocks.IRON_BLOCK) + .initialProperties(SharedProperties::softMetal) .properties(p -> p.noOcclusion()) .properties(p -> p.sound(SoundType.NETHERITE_BLOCK)) .addLayer(() -> RenderType::cutoutMipped) @@ -1896,8 +1871,7 @@ public class TFMGBlocks { .properties(p -> p.requiresCorrectToolForDrops()) .transform(pickaxeOnly()) .tag(BlockTags.NEEDS_STONE_TOOL) - .item() - .build() + .simpleItem() .register(); public static final MaterialSet ASPHALT_SET = makeVariants(ASPHALT); diff --git a/src/main/java/com/drmangotea/tfmg/registry/TFMGCableTypes.java b/src/main/java/com/drmangotea/tfmg/registry/TFMGCableTypes.java index 60ebee3b..68b520e2 100644 --- a/src/main/java/com/drmangotea/tfmg/registry/TFMGCableTypes.java +++ b/src/main/java/com/drmangotea/tfmg/registry/TFMGCableTypes.java @@ -1,40 +1,28 @@ package com.drmangotea.tfmg.registry; -import com.drmangotea.tfmg.TFMG; -import com.drmangotea.tfmg.TFMGRegistries; import com.drmangotea.tfmg.config.TFMGResistivity; import com.drmangotea.tfmg.content.electricity.connection.cable_type.CableType; import com.drmangotea.tfmg.content.electricity.connection.cable_type.CableTypeEntry; -import com.simibubi.create.api.contraption.ContraptionType; -import com.simibubi.create.api.registry.CreateBuiltInRegistries; -import com.simibubi.create.content.contraptions.Contraption; -import com.tterrag.registrate.util.entry.ItemEntry; -import net.minecraft.core.Holder; -import net.minecraft.core.Registry; -import net.minecraft.resources.ResourceLocation; - -import java.util.function.Supplier; import static com.drmangotea.tfmg.TFMG.REGISTRATE; -import static com.simibubi.create.AllContraptionTypes.BY_LEGACY_NAME; public class TFMGCableTypes { - public static final CableTypeEntry empty = REGISTRATE.cableType("empty", CableType::new) + public static final CableTypeEntry EMPTY = REGISTRATE.cableType("empty", CableType::new) .properties((p) -> p.spool(TFMGItems.COPPER_SPOOL)) .register(); - public static final CableTypeEntry copper = REGISTRATE.cableType("copper", CableType::new) + public static final CableTypeEntry COPPER = REGISTRATE.cableType("copper", CableType::new) .properties((p) -> p.color(0xD8735A).spool(TFMGItems.COPPER_SPOOL)) .transform(TFMGResistivity.setResistivity(0.00188f)) .register(); - public static final CableTypeEntry aluminum = REGISTRATE.cableType("aluminum", CableType::new) + public static final CableTypeEntry ALUMINUM = REGISTRATE.cableType("aluminum", CableType::new) .properties((p) -> p.color(0xEDEFEF).spool(TFMGItems.ALUMINUM_SPOOL)) .transform(TFMGResistivity.setResistivity(0.0027f)) .register(); - public static final CableTypeEntry constantan = REGISTRATE.cableType("constantan", CableType::new) + public static final CableTypeEntry CONSTANTAN = REGISTRATE.cableType("constantan", CableType::new) .properties((p) -> p.color(0xCFC2A8).spool(TFMGItems.CONSTANTAN_SPOOL)) .transform(TFMGResistivity.setResistivity(1f)) .register(); diff --git a/src/main/java/com/drmangotea/tfmg/registry/TFMGEncasedBlocks.java b/src/main/java/com/drmangotea/tfmg/registry/TFMGEncasedBlocks.java index 7030b453..d1cfb83d 100644 --- a/src/main/java/com/drmangotea/tfmg/registry/TFMGEncasedBlocks.java +++ b/src/main/java/com/drmangotea/tfmg/registry/TFMGEncasedBlocks.java @@ -2,9 +2,8 @@ package com.drmangotea.tfmg.registry; import com.drmangotea.tfmg.base.TFMGBuilderTransformers; import com.drmangotea.tfmg.base.TFMGSpriteShifts; -import com.drmangotea.tfmg.content.decoration.encased.TFMGEncasedCogwheelBlock; -import com.drmangotea.tfmg.content.decoration.encased.TFMGEncasedShaftBlock; -import com.simibubi.create.AllBlocks; +import com.drmangotea.tfmg.content.decoration.kinetics.encased.TFMGEncasedCogwheelBlock; +import com.drmangotea.tfmg.content.decoration.kinetics.encased.TFMGEncasedShaftBlock; import com.simibubi.create.content.decoration.encasing.EncasingRegistry; import com.simibubi.create.content.kinetics.simpleRelays.encased.EncasedCogCTBehaviour; import com.simibubi.create.foundation.data.CreateRegistrate; @@ -12,8 +11,8 @@ import com.tterrag.registrate.util.entry.BlockEntry; import net.createmod.catnip.data.Couple; import static com.drmangotea.tfmg.TFMG.REGISTRATE; -import static com.drmangotea.tfmg.content.decoration.encased.TFMGEncasedCogwheelBlock.aluminum; -import static com.drmangotea.tfmg.content.decoration.encased.TFMGEncasedCogwheelBlock.steel; +import static com.drmangotea.tfmg.content.decoration.kinetics.encased.TFMGEncasedCogwheelBlock.aluminum; +import static com.drmangotea.tfmg.content.decoration.kinetics.encased.TFMGEncasedCogwheelBlock.steel; import static com.simibubi.create.foundation.data.TagGen.axeOrPickaxe; public class TFMGEncasedBlocks { diff --git a/src/main/java/com/drmangotea/tfmg/registry/TFMGEntityTypes.java b/src/main/java/com/drmangotea/tfmg/registry/TFMGEntityTypes.java index 2f394b37..6d3029fe 100644 --- a/src/main/java/com/drmangotea/tfmg/registry/TFMGEntityTypes.java +++ b/src/main/java/com/drmangotea/tfmg/registry/TFMGEntityTypes.java @@ -11,10 +11,7 @@ import com.drmangotea.tfmg.content.items.weapons.explosives.pipe_bomb.PipeBomb; import com.drmangotea.tfmg.content.items.weapons.explosives.pipe_bomb.PipeBombRenderer; import com.drmangotea.tfmg.content.items.weapons.explosives.thermite_grenades.ThermiteGrenade; import com.drmangotea.tfmg.content.items.weapons.explosives.thermite_grenades.ThermiteGrenadeRenderer; -import com.drmangotea.tfmg.content.items.weapons.lithium_blade.LithiumSpark; -import com.drmangotea.tfmg.content.items.weapons.lithium_blade.LithiumSparkRenderer; import com.simibubi.create.foundation.data.CreateEntityBuilder; - import com.simibubi.create.foundation.utility.CreateLang; import com.tterrag.registrate.util.entry.EntityEntry; import com.tterrag.registrate.util.nullness.NonNullConsumer; @@ -22,7 +19,6 @@ import com.tterrag.registrate.util.nullness.NonNullFunction; import com.tterrag.registrate.util.nullness.NonNullSupplier; import net.minecraft.client.renderer.entity.EntityRenderer; import net.minecraft.client.renderer.entity.EntityRendererProvider; -import net.minecraft.client.renderer.entity.ItemEntityRenderer; import net.minecraft.world.entity.Entity; import net.minecraft.world.entity.EntityType; import net.minecraft.world.entity.MobCategory; @@ -54,15 +50,16 @@ public class TFMGEntityTypes { register("spark", Spark::new, () -> SparkRenderer::new, MobCategory.MISC, 4, 20, true, true, Spark::build).register(); public static final EntityEntry GREEN_SPARK = - register("green_spark", GreenSpark::new, () -> GreenSparkRenderer::new, - MobCategory.MISC, 4, 20, true, true, GreenSpark::build).register(); + register("green_spark", GreenSpark::new, () -> SparkRenderer::new, + MobCategory.MISC, 4, 20, true, true, Spark::build).register(); + public static final EntityEntry BLUE_SPARK = - register("blue_spark", BlueSpark::new, () -> BlueSparkRenderer::new, - MobCategory.MISC, 4, 20, true, true, BlueSpark::build).register(); + register("blue_spark", BlueSpark::new, () -> SparkRenderer::new, + MobCategory.MISC, 4, 20, true, true, Spark::build).register(); public static final EntityEntry LITHIUM_SPARK = - register("lithium_spark", LithiumSpark::new, () -> LithiumSparkRenderer::new, - MobCategory.MISC, 80, 20, true, true, LithiumSpark::build).register(); + register("lithium_spark", LithiumSpark::new, () -> SparkRenderer::new, + MobCategory.MISC, 4, 20, true, true, Spark::build).register(); private static CreateEntityBuilder register(String name, EntityType.EntityFactory factory, @@ -83,7 +80,7 @@ public class TFMGEntityTypes { .renderer(renderer); } - public static void init(){ + public static void init() { } } diff --git a/src/main/java/com/drmangotea/tfmg/registry/TFMGItems.java b/src/main/java/com/drmangotea/tfmg/registry/TFMGItems.java index 9b38783a..5c4a96bf 100644 --- a/src/main/java/com/drmangotea/tfmg/registry/TFMGItems.java +++ b/src/main/java/com/drmangotea/tfmg/registry/TFMGItems.java @@ -4,7 +4,7 @@ import com.drmangotea.tfmg.TFMG; import com.drmangotea.tfmg.base.TFMGCreativeTabs; import com.drmangotea.tfmg.base.TFMGRegistrate; import com.drmangotea.tfmg.base.TFMGTiers; -import com.drmangotea.tfmg.content.decoration.gearbox.SteelVerticalGearboxItem; +import com.drmangotea.tfmg.content.decoration.kinetics.gearbox.SteelVerticalGearboxItem; import com.drmangotea.tfmg.content.electricity.configuration_wrench.ElectriciansWrenchItem; import com.drmangotea.tfmg.base.debug.DebugCinderBlockItem; import com.drmangotea.tfmg.content.electricity.measurement.MultimeterItem; diff --git a/src/main/java/com/drmangotea/tfmg/registry/TFMGPaletteStoneTypes.java b/src/main/java/com/drmangotea/tfmg/registry/TFMGPaletteStoneTypes.java index 64e2367e..67146c44 100644 --- a/src/main/java/com/drmangotea/tfmg/registry/TFMGPaletteStoneTypes.java +++ b/src/main/java/com/drmangotea/tfmg/registry/TFMGPaletteStoneTypes.java @@ -23,6 +23,8 @@ import static com.drmangotea.tfmg.base.palettes.TFMGPaletteBlockPattern.STANDARD public enum TFMGPaletteStoneTypes { + + BAUXITE(STANDARD_RANGE, r -> r.paletteStoneBlock("bauxite", () -> Blocks.DEEPSLATE, true, true) .properties(p -> p.destroyTime(1.25f)) .register()), @@ -41,8 +43,8 @@ public enum TFMGPaletteStoneTypes { public TFMGPaletteBlockPattern[] variantTypes; public TagKey materialTag; - private TFMGPaletteStoneTypes(TFMGPaletteBlockPattern[] variantTypes, - Function> factory) { + TFMGPaletteStoneTypes(TFMGPaletteBlockPattern[] variantTypes, + Function> factory) { this.factory = factory; this.variantTypes = variantTypes; } diff --git a/src/main/java/com/drmangotea/tfmg/registry/TFMGSoundEvents.java b/src/main/java/com/drmangotea/tfmg/registry/TFMGSoundEvents.java index 19957657..7e722167 100644 --- a/src/main/java/com/drmangotea/tfmg/registry/TFMGSoundEvents.java +++ b/src/main/java/com/drmangotea/tfmg/registry/TFMGSoundEvents.java @@ -3,7 +3,6 @@ package com.drmangotea.tfmg.registry; import com.drmangotea.tfmg.TFMG; import com.google.gson.JsonArray; import com.google.gson.JsonObject; - import net.minecraft.core.Holder; import net.minecraft.core.Vec3i; import net.minecraft.core.registries.Registries; @@ -37,8 +36,6 @@ public class TFMGSoundEvents { public static final Map ALL = new HashMap<>(); public static final SoundEntry - - ENGINE = create("engine") .subtitle("Engine Sounds") .category(SoundSource.BLOCKS) @@ -130,7 +127,8 @@ public class TFMGSoundEvents { } - public record ConfiguredSoundEvent(Supplier event, float volume, float pitch) {} + public record ConfiguredSoundEvent(Supplier event, float volume, float pitch) { + } public static class SoundEntryBuilder { diff --git a/src/main/resources/assets/tfmg/models/block/large_steel_cogwheel.json b/src/main/resources/assets/tfmg/models/block/large_steel_cogwheel.json index 3d7423e9..5c45d513 100644 --- a/src/main/resources/assets/tfmg/models/block/large_steel_cogwheel.json +++ b/src/main/resources/assets/tfmg/models/block/large_steel_cogwheel.json @@ -1,4 +1,5 @@ { + "format_version": "1.21.6", "credit": "Made with Blockbench", "parent": "create:block/large_wheels", "texture_size": [32, 32], @@ -19,8 +20,8 @@ "east": {"uv": [0, 10, 10, 11.5], "texture": "#0"}, "south": {"uv": [0, 10, 10, 11.5], "texture": "#0"}, "west": {"uv": [0, 10, 10, 11.5], "texture": "#0"}, - "up": {"uv": [0, 0, 10, 10], "texture": "#0"}, - "down": {"uv": [0, 0, 10, 10], "texture": "#0"} + "up": {"uv": [0, 0.5, 10, 10.5], "texture": "#0"}, + "down": {"uv": [0, 0.5, 10, 10.5], "texture": "#0"} } }, { @@ -33,8 +34,8 @@ "east": {"uv": [10, 9.5, 11.5, 11], "texture": "#0"}, "south": {"uv": [0, 13, 15, 14.5], "texture": "#0"}, "west": {"uv": [10, 9.5, 11.5, 11], "texture": "#0"}, - "up": {"uv": [0, 11.5, 15, 13], "texture": "#0"}, - "down": {"uv": [0, 11.5, 15, 13], "texture": "#0"} + "up": {"uv": [0, 13, 15, 14.5], "texture": "#0"}, + "down": {"uv": [0, 13, 15, 14.5], "texture": "#0"} } }, { @@ -47,8 +48,8 @@ "east": {"uv": [10, 9.5, 11.5, 11], "texture": "#0"}, "south": {"uv": [0, 13, 15, 14.5], "texture": "#0"}, "west": {"uv": [10, 9.5, 11.5, 11], "texture": "#0"}, - "up": {"uv": [0, 11.5, 15, 13], "texture": "#0"}, - "down": {"uv": [0, 11.5, 15, 13], "texture": "#0"} + "up": {"uv": [0, 13, 15, 14.5], "texture": "#0"}, + "down": {"uv": [0, 13, 15, 14.5], "texture": "#0"} } }, { @@ -61,8 +62,8 @@ "east": {"uv": [0, 13, 15, 14.5], "texture": "#0"}, "south": {"uv": [10, 9.5, 11.5, 11], "texture": "#0"}, "west": {"uv": [0, 13, 15, 14.5], "texture": "#0"}, - "up": {"uv": [0, 11.5, 15, 13], "rotation": 90, "texture": "#0"}, - "down": {"uv": [0, 11.5, 15, 13], "rotation": 90, "texture": "#0"} + "up": {"uv": [0, 13, 15, 14.5], "rotation": 90, "texture": "#0"}, + "down": {"uv": [0, 13, 15, 14.5], "rotation": 90, "texture": "#0"} } }, { @@ -70,12 +71,12 @@ "from": [-2, 6.6, -2], "to": [18, 9.4, 18], "faces": { - "north": {"uv": [0, 10, 10, 11.5], "texture": "#0"}, - "east": {"uv": [0, 10, 10, 11.5], "texture": "#0"}, - "south": {"uv": [0, 10, 10, 11.5], "texture": "#0"}, - "west": {"uv": [0, 10, 10, 11.5], "texture": "#0"}, - "up": {"uv": [0, 0, 10, 10], "texture": "#0"}, - "down": {"uv": [0, 0, 10, 10], "texture": "#0"} + "north": {"uv": [0, 11, 10, 12.5], "texture": "#0"}, + "east": {"uv": [0, 11, 10, 12.5], "texture": "#0"}, + "south": {"uv": [0, 11, 10, 12.5], "texture": "#0"}, + "west": {"uv": [0, 11, 10, 12.5], "texture": "#0"}, + "up": {"uv": [0, 0.5, 10, 10.5], "texture": "#0"}, + "down": {"uv": [0, 0.5, 10, 10.5], "texture": "#0"} } }, { @@ -83,12 +84,12 @@ "from": [0, 4.975, 0], "to": [16, 11.025, 16], "faces": { - "north": {"uv": [10, 0, 12.5, 8], "rotation": 90, "texture": "#0"}, - "east": {"uv": [10, 0, 12.5, 8], "rotation": 90, "texture": "#0"}, - "south": {"uv": [10, 0, 12.5, 8], "rotation": 90, "texture": "#0"}, - "west": {"uv": [10, 0, 12.5, 8], "rotation": 90, "texture": "#0"}, - "up": {"uv": [1, 1, 9, 9], "texture": "#0"}, - "down": {"uv": [1, 1, 9, 9], "texture": "#0"} + "north": {"uv": [10.5, 0.5, 13.525, 8.5], "rotation": 90, "texture": "#0"}, + "east": {"uv": [10.5, 0.5, 13.525, 8.5], "rotation": 90, "texture": "#0"}, + "south": {"uv": [10.5, 0.5, 13.525, 8.5], "rotation": 90, "texture": "#0"}, + "west": {"uv": [10.5, 0.5, 13.525, 8.5], "rotation": 90, "texture": "#0"}, + "up": {"uv": [1, 1.5, 9, 9.5], "texture": "#0"}, + "down": {"uv": [1, 1.5, 9, 9.5], "texture": "#0"} } }, { @@ -101,8 +102,8 @@ "east": {"uv": [0, 13, 15, 14.5], "texture": "#0"}, "south": {"uv": [10, 9.5, 11.5, 11], "texture": "#0"}, "west": {"uv": [0, 13, 15, 14.5], "texture": "#0"}, - "up": {"uv": [0, 11.5, 15, 13], "rotation": 90, "texture": "#0"}, - "down": {"uv": [0, 11.5, 15, 13], "rotation": 90, "texture": "#0"} + "up": {"uv": [0, 13, 15, 14.5], "rotation": 90, "texture": "#0"}, + "down": {"uv": [0, 13, 15, 14.5], "rotation": 90, "texture": "#0"} } }, { @@ -115,8 +116,8 @@ "east": {"uv": [10, 9.5, 11.5, 11], "texture": "#0"}, "south": {"uv": [0, 13, 15, 14.5], "texture": "#0"}, "west": {"uv": [10, 9.5, 11.5, 11], "texture": "#0"}, - "up": {"uv": [0, 11.5, 15, 13], "texture": "#0"}, - "down": {"uv": [0, 11.5, 15, 13], "texture": "#0"} + "up": {"uv": [0, 13, 15, 14.5], "texture": "#0"}, + "down": {"uv": [0, 13, 15, 14.5], "texture": "#0"} } }, { @@ -129,8 +130,8 @@ "east": {"uv": [0, 13, 15, 14.5], "texture": "#0"}, "south": {"uv": [10, 9.5, 11.5, 11], "texture": "#0"}, "west": {"uv": [0, 13, 15, 14.5], "texture": "#0"}, - "up": {"uv": [0, 11.5, 15, 13], "rotation": 90, "texture": "#0"}, - "down": {"uv": [0, 11.5, 15, 13], "rotation": 90, "texture": "#0"} + "up": {"uv": [0, 13, 15, 14.5], "rotation": 90, "texture": "#0"}, + "down": {"uv": [0, 13, 15, 14.5], "rotation": 90, "texture": "#0"} } }, { @@ -142,8 +143,8 @@ "east": {"uv": [10, 9.5, 11.5, 11], "texture": "#0"}, "south": {"uv": [0, 13, 15, 14.5], "texture": "#0"}, "west": {"uv": [10, 9.5, 11.5, 11], "texture": "#0"}, - "up": {"uv": [0, 11.5, 15, 13], "texture": "#0"}, - "down": {"uv": [0, 11.5, 15, 13], "texture": "#0"} + "up": {"uv": [0, 13, 15, 14.5], "texture": "#0"}, + "down": {"uv": [0, 13, 15, 14.5], "texture": "#0"} } }, { @@ -155,8 +156,8 @@ "east": {"uv": [0, 13, 15, 14.5], "texture": "#0"}, "south": {"uv": [10, 9.5, 11.5, 11], "texture": "#0"}, "west": {"uv": [0, 13, 15, 14.5], "texture": "#0"}, - "up": {"uv": [0, 11.5, 15, 13], "rotation": 90, "texture": "#0"}, - "down": {"uv": [0, 11.5, 15, 13], "rotation": 90, "texture": "#0"} + "up": {"uv": [0, 13, 15, 14.5], "rotation": 90, "texture": "#0"}, + "down": {"uv": [0, 13, 15, 14.5], "rotation": 90, "texture": "#0"} } }, { diff --git a/src/main/resources/assets/tfmg/textures/block/capacitor_side.png b/src/main/resources/assets/tfmg/textures/block/capacitor_side.png deleted file mode 100644 index 533b2834..00000000 Binary files a/src/main/resources/assets/tfmg/textures/block/capacitor_side.png and /dev/null differ diff --git a/src/main/resources/assets/tfmg/textures/block/capacitor_side_connected.png b/src/main/resources/assets/tfmg/textures/block/capacitor_side_connected.png deleted file mode 100644 index 04e8ce83..00000000 Binary files a/src/main/resources/assets/tfmg/textures/block/capacitor_side_connected.png and /dev/null differ diff --git a/src/main/resources/assets/tfmg/textures/block/electric_casing.png b/src/main/resources/assets/tfmg/textures/block/electric_casing.png deleted file mode 100644 index 619e49f3..00000000 Binary files a/src/main/resources/assets/tfmg/textures/block/electric_casing.png and /dev/null differ diff --git a/src/main/resources/assets/tfmg/textures/block/electric_casing_connected.png b/src/main/resources/assets/tfmg/textures/block/electric_casing_connected.png deleted file mode 100644 index f32cbe47..00000000 Binary files a/src/main/resources/assets/tfmg/textures/block/electric_casing_connected.png and /dev/null differ diff --git a/src/main/resources/assets/tfmg/textures/block/gasoline_engine.png b/src/main/resources/assets/tfmg/textures/block/gasoline_engine.png deleted file mode 100644 index cd4506a8..00000000 Binary files a/src/main/resources/assets/tfmg/textures/block/gasoline_engine.png and /dev/null differ diff --git a/src/main/resources/assets/tfmg/textures/block/heavy_machinery_casing.png b/src/main/resources/assets/tfmg/textures/block/heavy_machinery_casing.png index 6f34926b..d823c48e 100644 Binary files a/src/main/resources/assets/tfmg/textures/block/heavy_machinery_casing.png and b/src/main/resources/assets/tfmg/textures/block/heavy_machinery_casing.png differ diff --git a/src/main/resources/assets/tfmg/textures/block/heavy_machinery_casing_connected.png b/src/main/resources/assets/tfmg/textures/block/heavy_machinery_casing_connected.png index 635d52a1..ec0fe8e7 100644 Binary files a/src/main/resources/assets/tfmg/textures/block/heavy_machinery_casing_connected.png and b/src/main/resources/assets/tfmg/textures/block/heavy_machinery_casing_connected.png differ diff --git a/src/main/resources/assets/tfmg/textures/block/large_steel_cogwheel.png b/src/main/resources/assets/tfmg/textures/block/large_steel_cogwheel.png index 34e9f34a..d3346fd1 100644 Binary files a/src/main/resources/assets/tfmg/textures/block/large_steel_cogwheel.png and b/src/main/resources/assets/tfmg/textures/block/large_steel_cogwheel.png differ diff --git a/src/main/resources/assets/tfmg/textures/block/low_grade_fuel_engine.png b/src/main/resources/assets/tfmg/textures/block/low_grade_fuel_engine.png deleted file mode 100644 index 9c6fce06..00000000 Binary files a/src/main/resources/assets/tfmg/textures/block/low_grade_fuel_engine.png and /dev/null differ diff --git a/src/main/resources/assets/tfmg/textures/block/voltage_cube.png b/src/main/resources/assets/tfmg/textures/block/ohms_law.png similarity index 100% rename from src/main/resources/assets/tfmg/textures/block/voltage_cube.png rename to src/main/resources/assets/tfmg/textures/block/ohms_law.png diff --git a/src/main/resources/assets/tfmg/textures/block/steel_block.png b/src/main/resources/assets/tfmg/textures/block/steel_block.png index 78afbecd..6e3f2d62 100644 Binary files a/src/main/resources/assets/tfmg/textures/block/steel_block.png and b/src/main/resources/assets/tfmg/textures/block/steel_block.png differ diff --git a/src/main/resources/assets/tfmg/textures/block/steel_block_connected.png b/src/main/resources/assets/tfmg/textures/block/steel_block_connected.png index 0bd5cc81..427804ac 100644 Binary files a/src/main/resources/assets/tfmg/textures/block/steel_block_connected.png and b/src/main/resources/assets/tfmg/textures/block/steel_block_connected.png differ diff --git a/src/main/resources/assets/tfmg/textures/block/steel_casing.png b/src/main/resources/assets/tfmg/textures/block/steel_casing.png index b5b78712..ad14289f 100644 Binary files a/src/main/resources/assets/tfmg/textures/block/steel_casing.png and b/src/main/resources/assets/tfmg/textures/block/steel_casing.png differ diff --git a/src/main/resources/assets/tfmg/textures/block/steel_casing_cable_hub.png b/src/main/resources/assets/tfmg/textures/block/steel_casing_cable_hub.png index 415d0a66..027106c5 100644 Binary files a/src/main/resources/assets/tfmg/textures/block/steel_casing_cable_hub.png and b/src/main/resources/assets/tfmg/textures/block/steel_casing_cable_hub.png differ diff --git a/src/main/resources/assets/tfmg/textures/block/steel_casing_connected.png b/src/main/resources/assets/tfmg/textures/block/steel_casing_connected.png index f65408e1..1d10766c 100644 Binary files a/src/main/resources/assets/tfmg/textures/block/steel_casing_connected.png and b/src/main/resources/assets/tfmg/textures/block/steel_casing_connected.png differ diff --git a/src/main/resources/assets/tfmg/textures/block/steel_coghweel.png b/src/main/resources/assets/tfmg/textures/block/steel_coghweel.png index dfae3ce6..5be935d3 100644 Binary files a/src/main/resources/assets/tfmg/textures/block/steel_coghweel.png and b/src/main/resources/assets/tfmg/textures/block/steel_coghweel.png differ diff --git a/src/main/resources/assets/tfmg/textures/entity/spark.png b/src/main/resources/assets/tfmg/textures/entity/spark.png new file mode 100644 index 00000000..9f94e42c Binary files /dev/null and b/src/main/resources/assets/tfmg/textures/entity/spark.png differ diff --git a/src/main/resources/tfmg.mixins.json b/src/main/resources/tfmg.mixins.json index ce1dd032..5123472a 100644 --- a/src/main/resources/tfmg.mixins.json +++ b/src/main/resources/tfmg.mixins.json @@ -13,8 +13,10 @@ "PipeAttachmentModelMixin", "RecipeProviderMixin", "accessor.FluidTankBlockEntityAccessor", + "accessor.FlywheelBlockEntityMixin", "accessor.ProcessingRecipeAccessor", "accessor.SequencedAssemblyRecipeAccessor", + "accessor.SlidingDoorBlockEntityAccessor", "accessor.TankSegmentAccessor" ], "client": [