Skip to content

Commit

Permalink
work early morning nov 30
Browse files Browse the repository at this point in the history
  • Loading branch information
Bluelightning26 committed Nov 30, 2024
1 parent 0793feb commit 534b445
Show file tree
Hide file tree
Showing 23 changed files with 177 additions and 5 deletions.
22 changes: 18 additions & 4 deletions src/main/java/net/pengi/potatoperks/block/ModBlocks.java
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
public class ModBlocks {
public static final Block PINK_POTATO_BLOCK = registerBlock("pink_potato_block",
new Block(AbstractBlock.Settings.create()
.strength(1f)
.strength(0.5f)
.requiresTool()
.sounds(BlockSoundGroup.FLOWERING_AZALEA)
.velocityMultiplier(1.25f)
Expand All @@ -27,21 +27,33 @@ public class ModBlocks {

public static final Block BLUE_POTATO_BLOCK = registerBlock("blue_potato_block",
new Block(AbstractBlock.Settings.create()
.strength(1f)
.strength(0.5f)
.requiresTool()
.sounds(BlockSoundGroup.FLOWERING_AZALEA)
.jumpVelocityMultiplier(2f)

));

public static final Block ORANGE_POTATO_BLOCK = registerBlock("orange_potato_block",
new ExperienceDroppingBlock(UniformIntProvider.create(5,10), AbstractBlock.Settings.create()
.strength(1f)
new Block(AbstractBlock.Settings.create()
.strength(0.5f)
.requiresTool()
.sounds(BlockSoundGroup.FLOWERING_AZALEA)
));

public static final Block PETRIFIED_POTATO_ORE = registerBlock("petrified_potato_ore",
new ExperienceDroppingBlock(UniformIntProvider.create(2,5), AbstractBlock.Settings.create()
.strength(2f)
.requiresTool()
.sounds(BlockSoundGroup.AZALEA_LEAVES)
));

public static final Block PURPLE_POTATO_BLOCK = registerBlock("purple_potato_block",
new Block(AbstractBlock.Settings.create()
.strength(0.5f)
.requiresTool()
.sounds(BlockSoundGroup.FLOWERING_AZALEA)
));



Expand All @@ -63,6 +75,8 @@ public static void registerModBlocks() {
entries.add(ModBlocks.PINK_POTATO_BLOCK);
entries.add(ModBlocks.BLUE_POTATO_BLOCK);
entries.add(ModBlocks.ORANGE_POTATO_BLOCK);
entries.add(ModBlocks.PETRIFIED_POTATO_ORE);
entries.add(ModBlocks.PURPLE_POTATO_BLOCK);
});
}
}
10 changes: 10 additions & 0 deletions src/main/java/net/pengi/potatoperks/item/ModItems.java
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,11 @@ public class ModItems {

public static final Item PINK_POTATO = registerItem("pink_potato", new Item(new Item.Settings()));

public static final Item BLUE_POTATO = registerItem("blue_potato", new Item(new Item.Settings()));

public static final Item ORANGE_POTATO = registerItem("orange_potato", new Item(new Item.Settings()));

public static final Item PURPLE_POTATO = registerItem("purple_potato", new Item(new Item.Settings()));



Expand All @@ -23,7 +28,12 @@ public static void registerModItems(){
PotatoPerks.LOGGER.info("Registering Mod Items for " + PotatoPerks.MOD_ID);

ItemGroupEvents.modifyEntriesEvent(ItemGroups.INGREDIENTS).register(entries -> {

entries.add(PINK_POTATO);
entries.add(BLUE_POTATO);
entries.add(ORANGE_POTATO);
entries.add(PURPLE_POTATO);

} );
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
{
"variants": {
"": {
"model": "potatoperks:block/petrified_potato_ore"
}
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
{
"variants": {
"": {
"model": "potatoperks:block/purple_potato_block"
}
}
}
7 changes: 6 additions & 1 deletion src/main/resources/assets/potatoperks/lang/en_us.json
Original file line number Diff line number Diff line change
@@ -1,8 +1,13 @@
{
"item.potatoperks.pink_potato": "Pink Potato",
"item.potatoperks.blue_potato": "Blue Potato",
"item.potatoperks.orange_potato": "Orange Potato",
"item.potatoperks.purple_potato": "Purple Potato",

"block.potatoperks.pink_potato_block": "Block of Pink Potato",
"block.potatoperks.blue_potato_block": "Block of Blue Potato",
"block.potatoperks.orange_potato_block": "Block of Orange Potato"
"block.potatoperks.orange_potato_block": "Block of Orange Potato",
"block.potatoperks.petrified_potato_ore": "Petrified Potato Ore",
"block.potatoperks.purple_potato_block": "Block of Purple Potato"

}
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
{
"parent": "minecraft:block/cube_all",
"textures": {
"all": "potatoperks:block/petrified_potato_ore"
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
{
"parent": "minecraft:block/cube_all",
"textures": {
"all": "potatoperks:block/purple_potato_block"
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
{
"parent": "minecraft:item/generated",
"textures": {
"layer0": "potatoperks:item/blue_potato"
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
{
"parent": "minecraft:item/generated",
"textures": {
"layer0": "potatoperks:item/orange_potato"
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
{
"parent": "potatoperks:block/petrified_potato_ore"
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
{
"parent": "minecraft:item/generated",
"textures": {
"layer0": "potatoperks:item/purple_potato"
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
{
"parent": "potatoperks:block/purple_potato_block"
}
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.
13 changes: 13 additions & 0 deletions src/main/resources/data/potatoperks/recipe/blue_potato.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
{
"type": "minecraft:crafting_shapeless",
"category": "building",
"ingredients": [
{
"item": "potatoperks:blue_potato_block"
}
],
"result": {
"count": 9,
"id": "potatoperks:blue_potato"
}
}
18 changes: 18 additions & 0 deletions src/main/resources/data/potatoperks/recipe/blue_potato_block.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
{
"type": "minecraft:crafting_shaped",
"category": "misc",
"key": {
"#": {
"item": "potatoperks:blue_potato"
}
},
"pattern": [
"###",
"###",
"###"
],
"result": {
"count": 1,
"id": "potatoperks:blue_potato_block"
}
}
13 changes: 13 additions & 0 deletions src/main/resources/data/potatoperks/recipe/orange_potato.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
{
"type": "minecraft:crafting_shapeless",
"category": "building",
"ingredients": [
{
"item": "potatoperks:orange_potato_block"
}
],
"result": {
"count": 9,
"id": "potatoperks:orange_potato"
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
{
"type": "minecraft:crafting_shaped",
"category": "misc",
"key": {
"#": {
"item": "potatoperks:orange_potato"
}
},
"pattern": [
"###",
"###",
"###"
],
"result": {
"count": 1,
"id": "potatoperks:orange_potato_block"
}
}
13 changes: 13 additions & 0 deletions src/main/resources/data/potatoperks/recipe/purple_potato.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
{
"type": "minecraft:crafting_shapeless",
"category": "building",
"ingredients": [
{
"item": "potatoperks:purple_potato_block"
}
],
"result": {
"count": 9,
"id": "potatoperks:purple_potato"
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
{
"type": "minecraft:crafting_shaped",
"category": "misc",
"key": {
"#": {
"item": "potatoperks:purple_potato"
}
},
"pattern": [
"###",
"###",
"###"
],
"result": {
"count": 1,
"id": "potatoperks:purple_potato_block"
}
}

0 comments on commit 534b445

Please sign in to comment.