Skip to content

Commit

Permalink
made StoneType use getter
Browse files Browse the repository at this point in the history
  • Loading branch information
Trinsdar committed Feb 6, 2025
1 parent 3b61cd8 commit 3a5fc5a
Showing 1 changed file with 10 additions and 44 deletions.
54 changes: 10 additions & 44 deletions common/src/main/java/muramasa/antimatter/ore/StoneType.java
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
package muramasa.antimatter.ore;

import it.unimi.dsi.fastutil.objects.ObjectArrayList;
import lombok.Getter;
import muramasa.antimatter.AntimatterAPI;
import muramasa.antimatter.block.BlockStone;
import muramasa.antimatter.material.Material;
Expand All @@ -21,20 +22,29 @@

public class StoneType implements ISharedAntimatterObject, IRegistryEntryProvider {

@Getter
private final String domain, id;
//private int harvestLevel;
private boolean gravity, requiresTool;
public boolean generateBlock, generateOre = true;
@Getter
private final Material material;
private Texture[] textures;
protected Texture defaultTexture;
@Getter
private final SoundType soundType;
@Getter
private BlockState state;
private Supplier<BlockState> stateSupplier;
@Getter
private int harvestLevel, fallingDustColor;
@Getter
private float hardness, resistence;
@Getter
private TagKey<Block> toolType;
@Getter
private net.minecraft.world.level.material.Material blockMaterial;
@Getter
private boolean sandLike = false;

public StoneType(String domain, String id, Material material, Texture texture, SoundType soundType, boolean generateBlock) {
Expand Down Expand Up @@ -117,23 +127,11 @@ public void onRegistryBuild(RegistryType registry) {
if (generateBlock && registry == RegistryType.BLOCKS) setState(new BlockStone(this));
}

public String getDomain() {
return domain;
}

@Override
public String getId() {
return id;
}

public Material getMaterial() {
return material;
}

public BlockState getState() {
return state;
}

public Texture getTexture() {
return defaultTexture;
}
Expand All @@ -142,22 +140,6 @@ public Texture[] getTextures() {
return textures != null ? textures : new Texture[]{getTexture()};
}

public SoundType getSoundType() {
return soundType;
}

public TagKey<Block> getToolType() {
return toolType;
}

public int getFallingDustColor() {
return fallingDustColor;
}

public net.minecraft.world.level.material.Material getBlockMaterial() {
return blockMaterial;
}

public boolean doesGenerateBlock() {
return generateBlock;
}
Expand All @@ -170,10 +152,6 @@ public boolean doesRequireTool() {
return requiresTool;
}

public boolean isSandLike() {
return sandLike;
}

public StoneType setState(Block block) {
this.state = block.defaultBlockState();
return this;
Expand All @@ -189,18 +167,6 @@ public StoneType setStateSupplier(Supplier<BlockState> blockState) {
return this;
}

public int getHarvestLevel() {
return harvestLevel;
}

public float getHardness() {
return hardness;
}

public float getResistence() {
return resistence;
}

public boolean getGravity() {
return gravity;
}
Expand Down

0 comments on commit 3a5fc5a

Please sign in to comment.