-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
659b536
commit af27f00
Showing
10 changed files
with
96 additions
and
14 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
32 changes: 32 additions & 0 deletions
32
src/main/java/com/blou/bobacraft/events/ModClientEvents.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
//package com.blou.bobacraft.events; | ||
// | ||
//import net.minecraft.block.Block; | ||
//import net.minecraft.block.Blocks; | ||
//import net.minecraft.world.biome.Biome; | ||
//import net.minecraft.world.biome.Biomes; | ||
//import net.minecraftforge.api.distmarker.Dist; | ||
//import net.minecraftforge.event.world.BlockEvent; | ||
//import net.minecraftforge.eventbus.api.SubscribeEvent; | ||
//import net.minecraftforge.fml.common.Mod; | ||
//import net.minecraftforge.registries.ForgeRegistries; | ||
// | ||
//@Mod.EventBusSubscriber(modid="bobacraft", bus=Mod.EventBusSubscriber.Bus.FORGE, value=Dist.CLIENT) | ||
//public class ModClientEvents { | ||
// | ||
// @SubscribeEvent | ||
// public static void onBreakGrassInJungle(BlockEvent.BreakEvent event) { | ||
// | ||
// Block currentBlock = event.getState().getBlock(); | ||
// Biome currentBiome = event.getWorld().getBiome(event.getPos()); | ||
// | ||
// boolean isGrassBlock = (currentBlock == Blocks.TALL_GRASS); | ||
// boolean inJungle = (currentBiome == ForgeRegistries.BIOMES.getValue(Biomes.JUNGLE.getRegistryName())); | ||
// | ||
// if(isGrassBlock && inJungle) { | ||
//// ItemStack stack = | ||
//// currentBlock.spawnAdditionalDrops(event.getState(), , event.getPos(), stack); | ||
// } | ||
// | ||
// } | ||
// | ||
//} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
29 changes: 29 additions & 0 deletions
29
src/main/java/com/blou/bobacraft/items/PopcornChickenItem.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
package com.blou.bobacraft.items; | ||
|
||
import net.minecraft.item.Food; | ||
import net.minecraft.item.Item; | ||
import net.minecraft.item.ItemGroup; | ||
import net.minecraft.item.Rarity; | ||
|
||
public class PopcornChickenItem extends Item { | ||
|
||
private static final int maxStackSize = 16; | ||
private static final int hunger = 8; // Restores 4 hearts. | ||
private static final float saturation = 1.0f; | ||
|
||
public PopcornChickenItem(ItemGroup itemGroup) { | ||
|
||
super(new Item.Properties() | ||
.group(itemGroup) | ||
.maxStackSize(maxStackSize) | ||
.rarity(Rarity.COMMON) | ||
.food(new Food.Builder() | ||
.hunger(hunger) | ||
.saturation(saturation) | ||
.meat() | ||
.setAlwaysEdible() | ||
.build())); | ||
|
||
} | ||
|
||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
6 changes: 6 additions & 0 deletions
6
src/main/resources/assets/bobacraft/models/item/popcorn_chicken_item.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
{ | ||
"parent": "item/generated", | ||
"textures": { | ||
"layer0": "bobacraft:items/popcorn_chicken_item" | ||
} | ||
} |
Binary file added
BIN
+1.44 KB
src/main/resources/assets/bobacraft/textures/items/popcorn_chicken_item.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
19 changes: 19 additions & 0 deletions
19
src/main/resources/data/bobacraft/recipes/popcorn_chicken_item.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
{ | ||
"type": "minecraft:crafting_shapeless", | ||
"ingredients": [ | ||
{ | ||
"item": "minecraft:cooked_chicken" | ||
}, | ||
{ | ||
"item": "minecraft:wheat" | ||
}, | ||
{ | ||
"item": "minecraft:stick" | ||
} | ||
], | ||
"result": | ||
{ | ||
"item": "bobacraft:popcorn_chicken_item", | ||
"count": 2 | ||
} | ||
} |