Skip to content

Commit

Permalink
Java 17, added muria tools, and worldgen
Browse files Browse the repository at this point in the history
(tysm astra)
  • Loading branch information
JaegerwaldDev committed Jan 11, 2025
1 parent 55ccf17 commit 751c096
Show file tree
Hide file tree
Showing 51 changed files with 1,067 additions and 92 deletions.
2 changes: 1 addition & 1 deletion build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ processResources {
}
}

def targetJavaVersion = 21
def targetJavaVersion = 17
tasks.withType(JavaCompile).configureEach {
// ensure that the encoding is set to UTF-8, no matter what the system default is
// this fixes some edge cases with special characters not displaying correctly
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ public class VoidlingsClient implements ClientModInitializer {
public void onInitializeClient() {
// This entrypoint is suitable for setting up client-specific logic, such as rendering.
registerBlockCutout(ModBlocks.ACID_SPROUTS);
registerBlockCutout(ModBlocks.ACID_ROOTS);
registerBlockCutout(ModBlocks.VOID_TANGLE);
registerBlockCutout(ModBlocks.VOID_TANGLE_PLANT);
registerBlockCutout(ModBlocks.POTTED_VOID_TANGLE);
Expand Down
13 changes: 13 additions & 0 deletions src/main/java/dev/jaegerwald/voidlings/block/ModBlocks.java
Original file line number Diff line number Diff line change
Expand Up @@ -65,6 +65,18 @@ public class ModBlocks {
.luminance(state -> 8)
)
);
public static final Block ACID_ROOTS = registerBlock("acid_roots",
new AcidFolliageBlock(
AbstractBlock.Settings.create()
.mapColor(MapColor.DARK_AQUA)
.replaceable()
.noCollision()
.breakInstantly()
.sounds(BlockSoundGroup.WET_GRASS)
.offset(AbstractBlock.OffsetType.XZ)
.pistonBehavior(PistonBehavior.DESTROY)
)
);

public static final Block ACID_MILDEW = registerBlock("acid_mildew",
new AcidMildewBlock(
Expand Down Expand Up @@ -132,6 +144,7 @@ public class ModBlocks {
.breakInstantly()
.sounds(BlockSoundGroup.WET_GRASS)
.pistonBehavior(PistonBehavior.DESTROY)
.ticksRandomly()
),
false
);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@
import net.minecraft.registry.Registries;
import net.minecraft.registry.Registry;
import net.minecraft.text.Text;
import net.minecraft.util.Identifier;

public class ModItemGroups {
public static final ItemGroup VOIDLINGS_GROUP = Registry.register(Registries.ITEM_GROUP,
Expand All @@ -31,6 +30,7 @@ public class ModItemGroups {
entries.add(ModItems.BLACK_ACID_CHUNK);

entries.add(ModBlocks.ACID_SPROUTS);
entries.add(ModBlocks.ACID_ROOTS);

entries.add(ModBlocks.ACID_MILDEW);
entries.add(ModBlocks.ACID_MILDEW_CARPET);
Expand All @@ -50,12 +50,18 @@ public class ModItemGroups {
entries.add(ModItems.MURIA_INGOT);
entries.add(ModBlocks.MURIA_BLOCK);

entries.add(ModItems.MURIA_SHOVEL);
entries.add(ModItems.MURIA_PICKAXE);
entries.add(ModItems.MURIA_AXE);
entries.add(ModItems.MURIA_HOE);

entries.add(ModItems.FENNEC_MASK);
entries.add(ModItems.REPLICA_WHISKERS);

entries.add(ModItems.SURGEONS_BLADE);
entries.add(ModItems.PIERCED_MURIA_HANDLE);


entries.add(ModItems.VOIDLING_HEART);
entries.add(ModItems.BROKEN_VOIDLING_HEART);
}).build());
Expand Down
10 changes: 5 additions & 5 deletions src/main/java/dev/jaegerwald/voidlings/item/ModItems.java
Original file line number Diff line number Diff line change
Expand Up @@ -2,15 +2,10 @@

import dev.jaegerwald.voidlings.Voidlings;
import dev.jaegerwald.voidlings.block.ModBlocks;
import net.fabricmc.fabric.api.itemgroup.v1.ItemGroupEvents;
import net.minecraft.block.Blocks;
import net.minecraft.item.FoodComponent;
import net.minecraft.item.FoodComponents;
import net.minecraft.item.*;
import dev.jaegerwald.voidlings.item.FennecMaskItem;
import net.minecraft.registry.Registries;
import net.minecraft.registry.Registry;
import net.minecraft.util.Identifier;

public class ModItems {
// public static final Item BLACK_ACID = registerItem("black_acid", new Item(new Item.Settings()));
Expand Down Expand Up @@ -43,6 +38,11 @@ public class ModItems {
public static final Item FRAMED_CLOTH = registerItem("framed_cloth", new Item(new Item.Settings()));
public static final Item MURIA_INGOT = registerItem("muria_ingot", new Item(new Item.Settings()));

public static final Item MURIA_SHOVEL = registerItem("muria_shovel", new ShovelItem(ModToolMaterials.MURIA, 1.5F, -2.0F, new Item.Settings()));
public static final Item MURIA_PICKAXE = registerItem("muria_pickaxe", new PickaxeItem(ModToolMaterials.MURIA, 1, -2.0F, new Item.Settings()));
public static final Item MURIA_AXE = registerItem("muria_axe", new AxeItem(ModToolMaterials.MURIA, 6.0F, -2.0F, new Item.Settings()));
public static final Item MURIA_HOE = registerItem("muria_hoe", new HoeItem(ModToolMaterials.MURIA, -3, 0.0F, new Item.Settings()));

public static final Item FENNEC_MASK = registerItem("fennec_mask", new FennecMaskItem(new Item.Settings()));
public static final Item REPLICA_WHISKERS = registerItem("replica_whiskers", new Item(new Item.Settings()));

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,9 @@ public void tick() {
velocityY += (lightAt(x, y - 0.5, z) - lightAt(x, y + 0.5, z)) * 0.01 + Math.sin(age * 0.08) * 0.001;
velocityZ += (lightAt(x, y, z - 0.5) - lightAt(x, y, z + 0.5)) * 0.01 + Math.cos(age * 0.1) * 0.002;

if (world.getClosestPlayer(x, y, z, 32, false) instanceof PlayerEntity player) {
PlayerEntity player;
if (world.getClosestPlayer(x, y, z, 32, false) instanceof PlayerEntity) {
player = (PlayerEntity) world.getClosestPlayer(x, y, z, 32, false);
Vec3d playerVelocity = player.getVelocity();
velocityX += playerVelocity.getX() * 0.04;
velocityY += (playerVelocity.getY() + 0.08) * 0.04;
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
{
"variants": {
"": {
"model": "voidlings:block/acid_roots"
}
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
{
"parent": "minecraft:block/cross",
"textures": {
"cross": "voidlings:block/acid_roots"
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
{
"parent": "minecraft:item/generated",
"textures": {
"layer0": "voidlings:item/acid_roots"
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
{
"parent": "minecraft:item/handheld",
"textures": {
"layer0": "voidlings:item/muria_axe"
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
{
"parent": "minecraft:item/handheld",
"textures": {
"layer0": "voidlings:item/muria_hoe"
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
{
"parent": "minecraft:item/handheld",
"textures": {
"layer0": "voidlings:item/muria_pickaxe"
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
{
"parent": "minecraft:item/handheld",
"textures": {
"layer0": "voidlings:item/muria_shovel"
}
}
9 changes: 7 additions & 2 deletions src/main/resources/assets/voidlings/sounds.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@
"voidlings:item/surgeons_blade/stab"
]
},
"item.surgeons_blade.voidling_breath": {
"subtitle": "subtitles.voidlings.item.surgeons_blade.voidling_breath",
"entity.voidling.breath": {
"subtitle": "subtitles.voidlings.entity.voidling.breath",
"sounds": [
"voidlings:item/surgeons_blade/voidling_breath"
]
Expand All @@ -17,5 +17,10 @@
"minecraft:item/sweet_berries/pick_from_bush1",
"minecraft:item/sweet_berries/pick_from_bush2"
]
},
"ambient.hollow.loop": {
"sounds": [
"voidlings:ambient/hollow"
]
}
}
Binary file not shown.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
playsound voidlings:item.surgeons_blade.voidling_breath player @a ~ ~ ~ 0.75 1
playsound voidlings:entity.voidling.breath player @a ~ ~ ~ 0.75 1
execute unless entity @s[tag=voidlings.stabbed] run give @s voidlings:broken_voidling_heart 1

effect give @s minecraft:slowness 30 3 true
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
playsound voidlings:item.surgeons_blade.voidling_breath player @a ~ ~ ~ 0.75 1
playsound voidlings:entity.voidling.breath player @a ~ ~ ~ 0.75 1
execute unless entity @s[tag=voidlings.stabbed] run give @s voidlings:broken_voidling_heart 1

effect give @s minecraft:slowness 30 3 true
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
{
"type": "minecraft:block",
"pools": [
{
"bonus_rolls": 0.0,
"conditions": [
{
"condition": "minecraft:match_tool",
"predicate": {
"items": [
"minecraft:shears"
]
}
}
],
"entries": [
{
"type": "minecraft:item",
"name": "voidlings:acid_roots"
}
],
"rolls": 1.0
}
],
"random_sequence": "voidlings:blocks/acid_roots"
}
21 changes: 21 additions & 0 deletions src/main/resources/data/voidlings/recipes/muria_axe.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
{
"type": "minecraft:crafting_shaped",
"category": "equipment",
"key": {
"#": {
"item": "voidlings:muria_rod"
},
"X": {
"item": "voidlings:muria_ingot"
}
},
"pattern": [
"XX",
"X#",
" #"
],
"result": {
"item": "voidlings:muria_axe"
},
"show_notification": true
}
21 changes: 21 additions & 0 deletions src/main/resources/data/voidlings/recipes/muria_hoe.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
{
"type": "minecraft:crafting_shaped",
"category": "equipment",
"key": {
"#": {
"item": "voidlings:muria_rod"
},
"X": {
"item": "voidlings:muria_ingot"
}
},
"pattern": [
"XX",
" #",
" #"
],
"result": {
"item": "voidlings:muria_hoe"
},
"show_notification": true
}
1 change: 0 additions & 1 deletion src/main/resources/data/voidlings/recipes/muria_ingot.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
{
"type": "minecraft:crafting_shapeless",
"category": "misc",
"group": "netherite_ingot",
"ingredients": [
{
"item": "voidlings:raw_muria"
Expand Down
Original file line number Diff line number Diff line change
@@ -1,14 +1,13 @@
{
"type": "minecraft:crafting_shapeless",
"category": "misc",
"group": "netherite_ingot",
"ingredients": [
{
"item": "minecraft:netherite_block"
"item": "voidlings:muria_block"
}
],
"result": {
"count": 9,
"item": "minecraft:netherite_ingot"
"item": "voidlings:muria_ingot"
}
}
21 changes: 21 additions & 0 deletions src/main/resources/data/voidlings/recipes/muria_pickaxe.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
{
"type": "minecraft:crafting_shaped",
"category": "equipment",
"key": {
"#": {
"item": "voidlings:muria_rod"
},
"X": {
"item": "voidlings:muria_ingot"
}
},
"pattern": [
"XXX",
" # ",
" # "
],
"result": {
"item": "voidlings:muria_pickaxe"
},
"show_notification": true
}
21 changes: 21 additions & 0 deletions src/main/resources/data/voidlings/recipes/muria_shovel.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
{
"type": "minecraft:crafting_shaped",
"category": "equipment",
"key": {
"#": {
"item": "voidlings:muria_rod"
},
"X": {
"item": "voidlings:muria_ingot"
}
},
"pattern": [
"X",
"#",
"#"
],
"result": {
"item": "voidlings:muria_shovel"
},
"show_notification": true
}
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
}
},
"result": {
"item": "voidlings:pierced_muria_handle",
"item": "voidlings:surgeons_blade",
"count": 1
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
{
"values": [
"voidlings:black_acid",
"voidlings:liquid_acid",
"voidlings:acid_mildew"
]
}
Loading

0 comments on commit 751c096

Please sign in to comment.