Skip to content

Commit

Permalink
Configurable impact for tiered millstones & crushing wheels
Browse files Browse the repository at this point in the history
Update version
  • Loading branch information
Electrolyte220 committed Aug 30, 2023
1 parent 5df88fa commit 70915ce
Show file tree
Hide file tree
Showing 7 changed files with 255 additions and 66 deletions.
2 changes: 1 addition & 1 deletion build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ plugins {
id 'org.spongepowered.mixin' version '0.7-SNAPSHOT'
}

version = '0.0.2'
version = '0.0.3'
group = 'electrolyte.greate' // http://maven.apache.org/guides/mini/guide-naming-conventions.html
archivesBaseName = 'greate'

Expand Down
251 changes: 221 additions & 30 deletions src/main/java/electrolyte/greate/GreateConfig.java
Original file line number Diff line number Diff line change
Expand Up @@ -11,61 +11,252 @@ public class GreateConfig {

@Configurable
@Synchronized
@Range(min = 1)
@Comment("Maximum stress capacity for ULS tier machines")
public double ULS_CAPACITY = 8;
@Comment("Settings related to ULS tier Machines")
public ULS ULS = new ULS();

@Configurable
@Synchronized
@Range(min = 1)
@Comment("Maximum stress capacity for LS tier machines")
public double LS_CAPACITY = 32;
@Comment("Settings related to LS tier Machines")
public LS LS = new LS();

@Configurable
@Synchronized
@Range(min = 1)
@Comment("Maximum stress capacity for MS tier machines")
public double MS_CAPACITY = 128;
@Comment("Settings related to MS tier Machines")
public MS MS = new MS();

@Configurable
@Synchronized
@Range(min = 1)
@Comment("Maximum stress capacity for HS tier machines")
public double HS_CAPACITY = 512;
@Comment("Settings related to HS tier Machines")
public HS HS = new HS();

@Configurable
@Synchronized
@Range(min = 1)
@Comment("Maximum stress capacity for ES tier machines")
public double ES_CAPACITY = 2048;
@Comment("Settings related to ES tier Machines")
public ES ES = new ES();

@Configurable
@Synchronized
@Range(min = 1)
@Comment("Maximum stress capacity for IS tier machines")
public double IS_CAPACITY = 8192;
@Comment("Settings related to IS tier Machines")
public IS IS = new IS();

@Configurable
@Synchronized
@Range(min = 1)
@Comment("Maximum stress capacity for LuS tier machines")
public double LUS_CAPACITY = 32768;
@Comment("Settings related to LUS tier Machines")
public LUS LUS = new LUS();

@Configurable
@Synchronized
@Range(min = 1)
@Comment("Maximum stress capacity for ZPMS tier machines")
public double ZPMS_CAPACITY = 131072;
@Comment("Settings related to ZPM tier Machines")
public ZPM ZPM = new ZPM();

@Configurable
@Synchronized
@Range(min = 1)
@Comment("Maximum stress capacity for US tier machines")
public double US_CAPACITY = 524288;
@Comment("Settings related to US tier Machines")
public US US = new US();

@Configurable
@Synchronized
@Range(min = 1)
@Comment("Maximum stress capacity for UHS tier machines")
public double UHS_CAPACITY = 2097152;
@Comment("Settings related to UHS tier Machines")
public UHS UHS = new UHS();

public static class ULS {
@Configurable
@Synchronized
@Range(min = 1)
@Comment("Maximum stress capacity for ULS tier machines")
public double CAPACITY = 8;

@Configurable
@Synchronized
@Range(min = 0)
@Comment("Stress impact for a ULS tier millstone")
public double MILLSTONE_IMPACT = 0.5;

@Configurable
@Synchronized
@Range(min = 0)
@Comment("Stress impact for a ULS tier crushing wheel")
public double CRUSHING_WHEEL_IMPACT = 0.5;
}

public static class LS {
@Configurable
@Synchronized
@Range(min = 1)
@Comment("Maximum stress capacity for LS tier machines")
public double CAPACITY = 32;

@Configurable
@Synchronized
@Range(min = 0)
@Comment("Stress impact for a LS tier millstone")
public double MILLSTONE_IMPACT = 1.0;

@Configurable
@Synchronized
@Range(min = 0)
@Comment("Stress impact for a LS tier crushing wheel")
public double CRUSHING_WHEEL_IMPACT = 1.0;
}

public static class MS {
@Configurable
@Synchronized
@Range(min = 1)
@Comment("Maximum stress capacity for MS tier machines")
public double CAPACITY = 128;

@Configurable
@Synchronized
@Comment("Stress impact for a MS tier millstone")
@Range(min = 0)
public double MILLSTONE_IMPACT = 1.5;

@Configurable
@Synchronized
@Range(min = 0)
@Comment("Stress impact for a MS tier crushing wheel")
public double CRUSHING_WHEEL_IMPACT = 1.5;
}

public static class HS {
@Configurable
@Synchronized
@Range(min = 1)
@Comment("Maximum stress capacity for HS tier machines")
public double CAPACITY = 512;

@Configurable
@Synchronized
@Range(min = 0)
@Comment("Stress impact for a HS tier millstone")
public double MILLSTONE_IMPACT = 2.0;

@Configurable
@Synchronized
@Range(min = 0)
@Comment("Stress impact for a HS tier crushing wheel")
public double CRUSHING_WHEEL_IMPACT = 2.0;
}

public static class ES {
@Configurable
@Synchronized
@Range(min = 1)
@Comment("Maximum stress capacity for ES tier machines")
public double CAPACITY = 2048;

@Configurable
@Synchronized
@Range(min = 0)
@Comment("Stress impact for a ES tier millstone")
public double MILLSTONE_IMPACT = 2.5;

@Configurable
@Synchronized
@Range(min = 0)
@Comment("Stress impact for a ES tier crushing wheel")
public double CRUSHING_WHEEL_IMPACT = 2.5;
}

public static class IS {
@Configurable
@Synchronized
@Range(min = 1)
@Comment("Maximum stress capacity for IS tier machines")
public double CAPACITY = 8192;

@Configurable
@Synchronized
@Range(min = 0)
@Comment("Stress impact for a IS tier millstone")
public double MILLSTONE_IMPACT = 3.0;

@Configurable
@Synchronized
@Range(min = 0)
@Comment("Stress impact for a IS tier crushing wheel")
public double CRUSHING_WHEEL_IMPACT = 3.0;

}

public static class LUS {
@Configurable
@Synchronized
@Range(min = 1)
@Comment("Maximum stress capacity for LuS tier machines")
public double CAPACITY = 32768;

@Configurable
@Synchronized
@Range(min = 0)
@Comment("Stress impact for a LUS tier millstone")
public double MILLSTONE_IMPACT = 3.5;

@Configurable
@Synchronized
@Range(min = 0)
@Comment("Stress impact for a LUS tier crushing wheel")
public double CRUSHING_WHEEL_IMPACT = 3.5;
}

public static class ZPM {
@Configurable
@Synchronized
@Range(min = 1)
@Comment("Maximum stress capacity for ZPM tier machines")
public double CAPACITY = 131072;

@Configurable
@Synchronized
@Range(min = 0)
@Comment("Stress impact for a ZPM tier millstone")
public double MILLSTONE_IMPACT = 4.0;

@Configurable
@Synchronized
@Range(min = 0)
@Comment("Stress impact for a ZPM tier crushing wheel")
public double CRUSHING_WHEEL_IMPACT = 4.0;
}

public static class US {
@Configurable
@Synchronized
@Range(min = 1)
@Comment("Maximum stress capacity for US tier machines")
public double CAPACITY = 524288;

@Configurable
@Synchronized
@Range(min = 0)
@Comment("Stress impact for a US tier millstone")
public double MILLSTONE_IMPACT = 4.5;

@Configurable
@Synchronized
@Range(min = 0)
@Comment("Stress impact for a US tier crushing wheel")
public double CRUSHING_WHEEL_IMPACT = 4.5;
}

public static class UHS {
@Configurable
@Synchronized
@Range(min = 1)
@Comment("Maximum stress capacity for UHS tier machines")
public double CAPACITY = 2097152;

@Configurable
@Synchronized
@Range(min = 0)
@Comment("Stress impact for a UHS tier millstone")
public double MILLSTONE_IMPACT = 5.0;

@Configurable
@Synchronized
@Range(min = 0)
@Comment("Stress impact for a UHS tier crushing wheel")
public double CRUSHING_WHEEL_IMPACT = 5.0;
}
}
20 changes: 10 additions & 10 deletions src/main/java/electrolyte/greate/GreateEnums.java
Original file line number Diff line number Diff line change
Expand Up @@ -9,16 +9,16 @@
public class GreateEnums {

public enum TIER implements Comparable<TIER> {
ULTRA_LOW("ULS", Greate.CONFIG.ULS_CAPACITY, ChatFormatting.WHITE),
LOW("LS", Greate.CONFIG.LS_CAPACITY, ChatFormatting.GRAY),
MEDIUM("MS", Greate.CONFIG.MS_CAPACITY, ChatFormatting.AQUA),
HIGH("HS", Greate.CONFIG.HS_CAPACITY, ChatFormatting.GOLD),
EXTREME("ES", Greate.CONFIG.ES_CAPACITY, ChatFormatting.DARK_PURPLE),
INSANE("IS", Greate.CONFIG.IS_CAPACITY, ChatFormatting.DARK_BLUE),
LUDICRIOUS("LuS", Greate.CONFIG.LUS_CAPACITY, ChatFormatting.LIGHT_PURPLE),
ZPM("ZPMS", Greate.CONFIG.ZPMS_CAPACITY, ChatFormatting.RED),
ULTIMATE("US", Greate.CONFIG.US_CAPACITY, ChatFormatting.DARK_AQUA),
ULTIMATE_HIGH("UHS", Greate.CONFIG.UHS_CAPACITY, ChatFormatting.DARK_RED);
ULTRA_LOW("ULS", Greate.CONFIG.ULS.CAPACITY, ChatFormatting.WHITE),
LOW("LS", Greate.CONFIG.LS.CAPACITY, ChatFormatting.GRAY),
MEDIUM("MS", Greate.CONFIG.MS.CAPACITY, ChatFormatting.AQUA),
HIGH("HS", Greate.CONFIG.HS.CAPACITY, ChatFormatting.GOLD),
EXTREME("ES", Greate.CONFIG.ES.CAPACITY, ChatFormatting.DARK_PURPLE),
INSANE("IS", Greate.CONFIG.IS.CAPACITY, ChatFormatting.DARK_BLUE),
LUDICRIOUS("LuS", Greate.CONFIG.LUS.CAPACITY, ChatFormatting.LIGHT_PURPLE),
ZPM("ZPMS", Greate.CONFIG.ZPM.CAPACITY, ChatFormatting.RED),
ULTIMATE("US", Greate.CONFIG.US.CAPACITY, ChatFormatting.DARK_AQUA),
ULTIMATE_HIGH("UHS", Greate.CONFIG.UHS.CAPACITY, ChatFormatting.DARK_RED);

private final String name;
private final double stressCapacity;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,6 @@
import com.tterrag.registrate.builders.ItemBuilder;
import com.tterrag.registrate.util.entry.BlockEntry;
import com.tterrag.registrate.util.nullness.NonNullUnaryOperator;
import electrolyte.greate.GreateEnums.TIER;
import electrolyte.greate.content.kinetics.crusher.TieredCrushingWheelBlock;
import electrolyte.greate.content.kinetics.gearbox.TieredGearboxBlock;
import electrolyte.greate.content.kinetics.gearbox.TieredVerticalGearboxItem;
Expand All @@ -28,7 +27,6 @@
import net.minecraft.core.Direction;
import net.minecraft.resources.ResourceLocation;
import net.minecraft.world.level.ItemLike;
import net.minecraft.world.level.block.Block;
import net.minecraft.world.level.block.state.BlockBehaviour;
import net.minecraftforge.client.model.generators.loaders.ObjModelBuilder;

Expand Down Expand Up @@ -151,5 +149,4 @@ public static <B extends TieredCrushingWheelBlock, P> NonNullUnaryOperator<Block
.end();
}).build();
}

}
Loading

0 comments on commit 70915ce

Please sign in to comment.