Skip to content

Commit

Permalink
Chat whats the how casual are commit names supposed to be (Error coun…
Browse files Browse the repository at this point in the history
…t at 1066)

Idk I just got here
Anyways I did some simple stuff.
  • Loading branch information
Siuolplex committed Nov 20, 2023
1 parent fd5a744 commit ebc91bb
Show file tree
Hide file tree
Showing 6 changed files with 39 additions and 24 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,7 @@
import net.minecraft.world.level.block.Block;
import net.minecraft.world.level.block.Blocks;
import net.minecraft.world.level.block.SoundType;
import net.minecraft.world.level.material.Material;
import net.minecraft.world.level.material.MaterialColor;
import net.minecraft.world.level.material.MapColor;
import org.violetmoon.quark.base.config.Config;
import org.violetmoon.quark.base.config.ConfigFlagManager;
import org.violetmoon.quark.content.building.block.MyalitePillarBlock;
Expand Down Expand Up @@ -36,18 +35,18 @@ public final void register(ZRegister event) {
expandVanillaStone(event, this, Blocks.TUFF, "tuff");

BooleanSupplier _true = () -> true;
add(event, "granite", MaterialColor.DIRT, SoundType.STONE, _true);
add(event, "diorite", MaterialColor.QUARTZ, SoundType.STONE, _true);
add(event, "andesite", MaterialColor.STONE, SoundType.STONE, _true);
add(event, "calcite", MaterialColor.TERRACOTTA_WHITE, SoundType.CALCITE, _true);
add(event, "dripstone", MaterialColor.TERRACOTTA_BROWN, SoundType.DRIPSTONE_BLOCK, _true);
add(event, "tuff", MaterialColor.TERRACOTTA_GRAY, SoundType.TUFF, _true);
add(event, "granite", MapColor.DIRT, SoundType.STONE, _true);
add(event, "diorite", MapColor.QUARTZ, SoundType.STONE, _true);
add(event, "andesite", MapColor.STONE, SoundType.STONE, _true);
add(event, "calcite", MapColor.TERRACOTTA_WHITE, SoundType.CALCITE, _true);
add(event, "dripstone", MapColor.TERRACOTTA_BROWN, SoundType.DRIPSTONE_BLOCK, _true);
add(event, "tuff", MapColor.TERRACOTTA_GRAY, SoundType.TUFF, _true);

add(event, "limestone", MaterialColor.STONE, SoundType.STONE, () -> NewStoneTypesModule.enableLimestone);
add(event, "jasper", MaterialColor.TERRACOTTA_RED, SoundType.STONE, () -> NewStoneTypesModule.enableJasper);
add(event, "shale", MaterialColor.ICE, SoundType.STONE, () -> NewStoneTypesModule.enableShale);
add(event, "limestone", MapColor.STONE, SoundType.STONE, () -> NewStoneTypesModule.enableLimestone);
add(event, "jasper", MapColor.TERRACOTTA_RED, SoundType.STONE, () -> NewStoneTypesModule.enableJasper);
add(event, "shale", MapColor.ICE, SoundType.STONE, () -> NewStoneTypesModule.enableShale);

add(event, "myalite", MaterialColor.COLOR_PURPLE, SoundType.STONE, () -> NewStoneTypesModule.enableMyalite, MyaliteBlock::new, MyalitePillarBlock::new);
add(event, "myalite", MapColor.COLOR_PURPLE, SoundType.STONE, () -> NewStoneTypesModule.enableMyalite, MyaliteBlock::new, MyalitePillarBlock::new);
}

@PlayEvent
Expand All @@ -65,13 +64,14 @@ public static void expandVanillaStone(ZRegister event, ZetaModule module, Block
NewStoneTypesModule.makeStone(event, module, raw, name, null, null, () -> true, null, ZetaBlock::new);
}

private void add(ZRegister event, String name, MaterialColor color, SoundType sound, BooleanSupplier cond) {
private void add(ZRegister event, String name, MapColor color, SoundType sound, BooleanSupplier cond) {
add(event, name, color, sound, cond, ZetaBlock::new, ZetaPillarBlock::new);
}

private void add(ZRegister event, String name, MaterialColor color, SoundType sound, BooleanSupplier cond, ZetaBlock.Constructor<ZetaBlock> constr, ZetaBlock.Constructor<ZetaPillarBlock> pillarConstr) {
Block.Properties props = Block.Properties.of(Material.STONE, color)
private void add(ZRegister event, String name, MapColor color, SoundType sound, BooleanSupplier cond, ZetaBlock.Constructor<ZetaBlock> constr, ZetaBlock.Constructor<ZetaPillarBlock> pillarConstr) {
Block.Properties props = Block.Properties.of()
.requiresCorrectToolForDrops()
.mapColor(color)
.sound(sound)
.strength(1.5F, 6.0F);

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ public SleepGoal(Foxhound foxhound) {

@Override
public boolean canUse() {
if (!this.foxhound.isTame() || this.foxhound.isInWater() || !this.foxhound.isOnGround())
if (!this.foxhound.isTame() || this.foxhound.isInWater() || !this.foxhound.onGround())
return false;
else {
LivingEntity living = this.foxhound.getOwner();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -169,7 +169,7 @@ public void tick() {
if (angeryTicks > 0 && isAlive()) {
angeryTicks--;

if (isOnGround()) {
if (onGround()) {
int dangerRange = 3;
double x = getX() + getBbWidth() / 2;
double y = getY();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -73,8 +73,10 @@ public Multimap<Attribute, AttributeModifier> getDefaultAttributeModifiers(Equip
UUID uuid = UUID.fromString("2AD3F246-FEE1-4E67-B886-69FD380BB150");
builder.put(Attributes.ARMOR, new AttributeModifier(uuid, "Armor modifier", 1, AttributeModifier.Operation.ADDITION));
builder.put(Attributes.LUCK, new AttributeModifier(uuid, "Armor luck modifier", 1, AttributeModifier.Operation.ADDITION));
builder.put(ForgeMod.REACH_DISTANCE.get(), new AttributeModifier(uuid, "Armor reach modifier", 2, AttributeModifier.Operation.ADDITION));

//Todo: Check me ig
builder.put(ForgeMod.ENTITY_REACH.get(), new AttributeModifier(uuid, "Armor entity reach modifier", 2, AttributeModifier.Operation.ADDITION));
builder.put(ForgeMod.BLOCK_REACH.get(), new AttributeModifier(uuid, "Armor block reach modifier", 2, AttributeModifier.Operation.ADDITION));

attributes = builder.build();
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ public class WantLoveGoal extends Goal {
private static final String PET_TIME = "quark:PetTime";

public static void setPetTime(TamableAnimal entity) {
entity.getPersistentData().putLong(PET_TIME, entity.level.getGameTime());
entity.getPersistentData().putLong(PET_TIME, entity.level().getGameTime());
}

public static boolean canPet(TamableAnimal entity) {
Expand All @@ -37,7 +37,7 @@ public static long timeSinceLastPet(TamableAnimal entity) {
return 0;

long lastPetAt = entity.getPersistentData().getLong(PET_TIME);
return entity.level.getGameTime() - lastPetAt;
return entity.level().getGameTime() - lastPetAt;
}

private final TamableAnimal creature;
Expand All @@ -63,15 +63,15 @@ public boolean canUse() {
double distanceToTarget = this.creature.distanceToSqr(this.leapTarget);

return 4 <= distanceToTarget && distanceToTarget <= 16 &&
this.creature.isOnGround() && this.creature.getRandom().nextInt(5) == 0;
this.creature.onGround() && this.creature.getRandom().nextInt(5) == 0;
}
}

@Override
public boolean canContinueToUse() {
if (!WantLoveGoal.needsPets(creature))
return false;
return !this.creature.isOnGround();
return !this.creature.onGround();
}

@Override
Expand Down
15 changes: 14 additions & 1 deletion src/main/resources/assets/quark/attribute_tooltips.json
Original file line number Diff line number Diff line change
Expand Up @@ -141,7 +141,20 @@
},
"texture": "quark:attribute/gravity"
},
"forge:reach_distance": {
"forge:block_reach": {
"display": {
"mainhand": "difference",
"offhand": "difference",
"feet": "difference",
"legs": "difference",
"chest": "difference",
"head": "difference",
"potion": "difference"
},
"texture": "quark:attribute/reach_distance",
"compare": "higher_better"
},
"forge:entity_reach": {
"display": {
"mainhand": "difference",
"offhand": "difference",
Expand Down

0 comments on commit ebc91bb

Please sign in to comment.