Skip to content

Commit

Permalink
release candidate 2 (with reformat)
Browse files Browse the repository at this point in the history
  • Loading branch information
warior456 committed Apr 1, 2023
1 parent 96e6229 commit b2851c6
Show file tree
Hide file tree
Showing 11 changed files with 36 additions and 39 deletions.
20 changes: 10 additions & 10 deletions src/main/java/net/ugi/sculk_depths/SculkDepths.java
Original file line number Diff line number Diff line change
Expand Up @@ -9,15 +9,15 @@
import org.slf4j.LoggerFactory;

public class SculkDepths implements ModInitializer {
public static final String MOD_ID = "sculk_depths";
public static final Logger LOGGER = LoggerFactory.getLogger("sculk_depths");
public static final String MOD_ID = "sculk_depths";
public static final Logger LOGGER = LoggerFactory.getLogger("sculk_depths");

@Override
public void onInitialize() {
ModItemGroup.registerItemgroups();
ModItems.registerModItems();
ModBlocks.registerModBlocks();
Portals.registerModPortals();
LOGGER.info("sculk_depths has loaded");
}
@Override
public void onInitialize() {
ModItemGroup.registerItemgroups();
ModItems.registerModItems();
ModBlocks.registerModBlocks();
Portals.registerModPortals();
LOGGER.info("sculk_depths has loaded");
}
}
14 changes: 7 additions & 7 deletions src/main/java/net/ugi/sculk_depths/SculkDepthsDataGenerator.java
Original file line number Diff line number Diff line change
Expand Up @@ -7,12 +7,12 @@
import net.ugi.sculk_depths.datagen.ModRecipeGenerator;

public class SculkDepthsDataGenerator implements DataGeneratorEntrypoint {
@Override
public void onInitializeDataGenerator(FabricDataGenerator fabricDataGenerator) {
FabricDataGenerator.Pack pack = fabricDataGenerator.createPack();
@Override
public void onInitializeDataGenerator(FabricDataGenerator fabricDataGenerator) {
FabricDataGenerator.Pack pack = fabricDataGenerator.createPack();

pack.addProvider(ModLootTableGenerator::new);
pack.addProvider(ModRecipeGenerator::new);
pack.addProvider(ModModelProvider::new);
}
pack.addProvider(ModLootTableGenerator::new);
pack.addProvider(ModRecipeGenerator::new);
pack.addProvider(ModModelProvider::new);
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -22,8 +22,6 @@ public ModRecipeGenerator(FabricDataOutput output) {
public void generate(Consumer<RecipeJsonProvider> exporter) {




// JUST AN EXAMPLE

}
Expand Down
6 changes: 3 additions & 3 deletions src/main/java/net/ugi/sculk_depths/fluid/KryslumFluid.java
Original file line number Diff line number Diff line change
Expand Up @@ -41,12 +41,12 @@ public Item getBucketItem() {
}

public void randomDisplayTick(World world, BlockPos pos, FluidState state, Random random) {
if (!state.isStill() && !(Boolean)state.get(FALLING)) {
if (!state.isStill() && !(Boolean) state.get(FALLING)) {
if (random.nextInt(64) == 0) {
world.playSound((double)pos.getX() + 0.5D, (double)pos.getY() + 0.5D, (double)pos.getZ() + 0.5D, SoundEvents.BLOCK_SCULK_CATALYST_BLOOM, SoundCategory.BLOCKS, random.nextFloat() * 0.5F + 0.8F, random.nextFloat() + 0.5F, false);
world.playSound((double) pos.getX() + 0.5D, (double) pos.getY() + 0.5D, (double) pos.getZ() + 0.5D, SoundEvents.BLOCK_SCULK_CATALYST_BLOOM, SoundCategory.BLOCKS, random.nextFloat() * 0.5F + 0.8F, random.nextFloat() + 0.5F, false);
}
} else if (random.nextInt(10) == 0) {
world.addParticle(ParticleTypes.SCULK_SOUL, (double)pos.getX() + random.nextDouble(), (double)pos.getY() + random.nextDouble(), (double)pos.getZ() + random.nextDouble(), 0.0D, 0.0D, 0.0D);
world.addParticle(ParticleTypes.SCULK_SOUL, (double) pos.getX() + random.nextDouble(), (double) pos.getY() + random.nextDouble(), (double) pos.getZ() + random.nextDouble(), 0.0D, 0.0D, 0.0D);
}
}

Expand Down
2 changes: 1 addition & 1 deletion src/main/java/net/ugi/sculk_depths/fluid/ModFluids.java
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ public class ModFluids {
public static final FlowableFluid KRYSLUM_STILL = register("kryslum_still", new KryslumFluid.Still());
public static final FlowableFluid KRYSLUM_FLOWING = register("kryslum_flow", new KryslumFluid.Flowing());

private static FlowableFluid register(String name, FlowableFluid flowableFluid){
private static FlowableFluid register(String name, FlowableFluid flowableFluid) {
return Registry.register(Registries.FLUID, new Identifier(SculkDepths.MOD_ID, name), flowableFluid);
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ public SoundEvent getEquipSound() {
}

public Ingredient getRepairIngredient() {
return (Ingredient)this.repairIngredientSupplier.get();
return (Ingredient) this.repairIngredientSupplier.get();
}

public String getName() {
Expand Down
3 changes: 2 additions & 1 deletion src/main/java/net/ugi/sculk_depths/item/ModItemGroup.java
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,8 @@

public class ModItemGroup {
public static ItemGroup SCULK_DEPTHS;
public static void registerItemgroups(){

public static void registerItemgroups() {
SCULK_DEPTHS = FabricItemGroup.builder(new Identifier(SculkDepths.MOD_ID, "sculk_depths"))
.displayName(Text.translatable("itemgroup.sculk_depths"))
.icon(() -> new ItemStack(ModBlocks.UMBRUSK)).build();
Expand Down
13 changes: 6 additions & 7 deletions src/main/java/net/ugi/sculk_depths/item/ModItems.java
Original file line number Diff line number Diff line change
Expand Up @@ -25,26 +25,25 @@ public class ModItems {
//quazarith tools

public static final Item QUAZARITH_SHOVEL = registerItem("quazarith_shovel",
new ShovelItem(ModToolMaterials.QUAZARITH, 2.5F,-3.0F,
new ShovelItem(ModToolMaterials.QUAZARITH, 2.5F, -3.0F,
new FabricItemSettings()));
public static final Item QUAZARITH_PICKAXE = registerItem("quazarith_pickaxe",
new PickaxeItem(ModToolMaterials.QUAZARITH, 2, -2.0F,
new FabricItemSettings()));

public static final Item QUAZARITH_AXE = registerItem("quazarith_axe",
new AxeItem(ModToolMaterials.QUAZARITH, 7,-3.0F,
new AxeItem(ModToolMaterials.QUAZARITH, 7, -3.0F,
new FabricItemSettings()));

public static final Item QUAZARITH_HOE = registerItem("quazarith_hoe",
new HoeItem(ModToolMaterials.QUAZARITH, -4,1.0F,
new HoeItem(ModToolMaterials.QUAZARITH, -4, 1.0F,
new FabricItemSettings()));

public static final Item QUAZARITH_SWORD = registerItem("quazarith_sword",
new SwordItem(ModToolMaterials.QUAZARITH, 6,-2.0F,
new SwordItem(ModToolMaterials.QUAZARITH, 6, -2.0F,
new FabricItemSettings()));



//quazarith armor
public static final Item QUAZARITH_HELMET = registerItem("quazarith_helmet",
new ArmorItem(ModArmorMaterials.QUAZARITH, ArmorItem.Type.HELMET,
Expand All @@ -63,7 +62,7 @@ private static Item registerItem(String name, Item item) {
return Registry.register(Registries.ITEM, new Identifier(SculkDepths.MOD_ID, name), item);
}

public static void addItemsToItemGroup(){
public static void addItemsToItemGroup() {

addToItemGroup(ModItemGroup.SCULK_DEPTHS, KRYSLUM_BUCKET);
addToItemGroup(ModItemGroup.SCULK_DEPTHS, SOUL_HEART);
Expand All @@ -84,7 +83,7 @@ public static void addItemsToItemGroup(){
}

private static void addToItemGroup(ItemGroup group, Item item) {
ItemGroupEvents.modifyEntriesEvent(group).register(entries -> entries.add((item)));
ItemGroupEvents.modifyEntriesEvent(group).register(entries -> entries.add((item)));
}

public static void registerModItems() {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,7 @@

import java.util.function.Supplier;

public enum ModToolMaterials implements ToolMaterial
{
public enum ModToolMaterials implements ToolMaterial {
//GOLD(MiningLevels.WOOD, 32, 12.0f, 0.0f, 22, () -> Ingredient.ofItems(Items.GOLD_INGOT)),
QUAZARITH(6, 3000, 38.29f, 4.0f, 30, () -> Ingredient.ofItems(ModItems.QUAZARITH_INGOT)); //change to quazarith ingot
//deepslate instamine miningspeed: 38.29
Expand Down
8 changes: 4 additions & 4 deletions src/main/java/net/ugi/sculk_depths/mixin/ExampleMixin.java
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,9 @@

@Mixin(TitleScreen.class)
public class ExampleMixin {
@Inject(at = @At("HEAD"), method = "init()V")
private void init(CallbackInfo info) {
SculkDepths.LOGGER.info("This line is printed by Sculk Depths mixin!");
}
@Inject(at = @At("HEAD"), method = "init()V")
private void init(CallbackInfo info) {
SculkDepths.LOGGER.info("This line is printed by Sculk Depths mixin!");
}
}

2 changes: 1 addition & 1 deletion src/main/java/net/ugi/sculk_depths/portal/Portals.java
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ public static void registerModPortals() {
.destDimID(new Identifier("sculk_depths:sculk_depthsdim"))
.tintColor(1, 69, 86)
.lightWithItem(ModItems.SOUL_HEART)
.setPortalSearchYRange(0,120)
.setPortalSearchYRange(0, 120)
.registerIgniteEvent((player, world, portalPos, framePos, portalIgnitionSource) -> {
if (portalIgnitionSource.sourceType == PortalIgnitionSource.SourceType.USEITEM && player != null) {
if (player.isCreative())
Expand Down

0 comments on commit b2851c6

Please sign in to comment.