-
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.
added cherry added loot table modify
- Loading branch information
Showing
68 changed files
with
4,325 additions
and
9 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
70 changes: 70 additions & 0 deletions
70
remappedSrc/com/megatrex4/ukrainian_dlight/UkrainianDelight.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,70 @@ | ||
package com.megatrex4.ukrainian_dlight; | ||
|
||
import com.megatrex4.ukrainian_dlight.block.DrinkBottleBlock; | ||
import com.megatrex4.ukrainian_dlight.block.FoodJarBlocks; | ||
import com.megatrex4.ukrainian_dlight.block.ModBlocks; | ||
import com.megatrex4.ukrainian_dlight.block.entity.ModBlockEntities; | ||
import com.megatrex4.ukrainian_dlight.config.ModConfig; | ||
//import com.megatrex4.ukrainian_dlight.config.UkrainianDelightConfig; | ||
import com.megatrex4.ukrainian_dlight.initialize.Initialise; | ||
import com.megatrex4.ukrainian_dlight.item.ModItemGroups; | ||
import com.megatrex4.ukrainian_dlight.item.ModItems; | ||
import com.megatrex4.ukrainian_dlight.item.ToolTipHelper; | ||
import com.megatrex4.ukrainian_dlight.networking.ModMessages; | ||
import com.megatrex4.ukrainian_dlight.recipe.ModRecipes; | ||
import com.megatrex4.ukrainian_dlight.screen.ModScreenHandlers; | ||
import com.megatrex4.ukrainian_dlight.screen.ModScreens; | ||
import me.shedaniel.autoconfig.AutoConfig; | ||
import me.shedaniel.autoconfig.serializer.Toml4jConfigSerializer; | ||
import net.fabricmc.api.ModInitializer; | ||
|
||
import net.minecraft.entity.damage.DamageType; | ||
import net.minecraft.registry.RegistryKey; | ||
import net.minecraft.registry.RegistryKeys; | ||
import net.minecraft.text.MutableText; | ||
import net.minecraft.text.Text; | ||
import net.minecraft.util.Identifier; | ||
import org.slf4j.Logger; | ||
import org.slf4j.LoggerFactory; | ||
|
||
public class UkrainianDelight implements ModInitializer { | ||
public static final String MOD_ID = "ukrainian_delight"; | ||
public static final Logger LOGGER = LoggerFactory.getLogger(MOD_ID); | ||
public static final RegistryKey<DamageType> GLASS_DAMAGE = RegistryKey.of(RegistryKeys.DAMAGE_TYPE, new Identifier("ukrainian_delight", "glass_damage")); | ||
|
||
|
||
public static Identifier id(String id) { | ||
return new Identifier(MOD_ID, id); | ||
} | ||
|
||
public static MutableText i18n(String key, Object... args) { | ||
return Text.translatable(MOD_ID + "." + key, args); | ||
} | ||
|
||
|
||
@Override | ||
public void onInitialize() { | ||
|
||
RegistryKey<DamageType> GLASS_DAMAGE; | ||
|
||
FoodJarBlocks.registerFoodBlocks(); | ||
DrinkBottleBlock.registerDrinkBlock(); | ||
ModBlocks.registerModBlocks(); | ||
ModItems.registerModItems(); | ||
ModItemGroups.registerItemGroups(); | ||
ToolTipHelper.registerTooltip(); | ||
ModBlockEntities.registerBlockEntities(); | ||
ModScreenHandlers.registerModScreenHandlers(); | ||
ModMessages.registerS2CPackets(); | ||
ModRecipes.registerRecipes(); | ||
ModScreens.registerScreens(); | ||
ModConfig.loadConfig(); | ||
Initialise.register(); | ||
|
||
LOGGER.info("Hello Fabric world it's " + MOD_ID + "!"); | ||
} | ||
|
||
public static void saveConfig() { | ||
ModConfig.saveConfig(); | ||
} | ||
} |
11 changes: 11 additions & 0 deletions
11
remappedSrc/com/megatrex4/ukrainian_dlight/UkrainianDelightDataGenerator.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,11 @@ | ||
package com.megatrex4.ukrainian_dlight; | ||
|
||
import net.fabricmc.fabric.api.datagen.v1.DataGeneratorEntrypoint; | ||
import net.fabricmc.fabric.api.datagen.v1.FabricDataGenerator; | ||
|
||
public class UkrainianDelightDataGenerator implements DataGeneratorEntrypoint { | ||
@Override | ||
public void onInitializeDataGenerator(FabricDataGenerator fabricDataGenerator) { | ||
|
||
} | ||
} |
18 changes: 18 additions & 0 deletions
18
remappedSrc/com/megatrex4/ukrainian_dlight/UkrainianDeligthClient.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,18 @@ | ||
package com.megatrex4.ukrainian_dlight; | ||
|
||
import com.megatrex4.ukrainian_dlight.screen.BrewingKegScreen; | ||
import com.megatrex4.ukrainian_dlight.screen.ModScreenHandlers; | ||
import net.fabricmc.api.ClientModInitializer; | ||
import net.fabricmc.fabric.api.blockrenderlayer.v1.BlockRenderLayerMap; | ||
import net.fabricmc.fabric.api.client.rendering.v1.EntityModelLayerRegistry; | ||
import net.fabricmc.fabric.api.client.rendering.v1.EntityRendererRegistry; | ||
import net.minecraft.client.gui.screen.ingame.HandledScreens; | ||
import net.minecraft.client.render.RenderLayer; | ||
|
||
public class UkrainianDeligthClient implements ClientModInitializer { | ||
|
||
@Override | ||
public void onInitializeClient() { | ||
HandledScreens.register(ModScreenHandlers.BREWING_KEG_SCREEN_HANDLER, BrewingKegScreen::new); | ||
} | ||
} |
42 changes: 42 additions & 0 deletions
42
remappedSrc/com/megatrex4/ukrainian_dlight/block/DrinkBottleBlock.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,42 @@ | ||
package com.megatrex4.ukrainian_dlight.block; | ||
|
||
import com.megatrex4.ukrainian_dlight.UkrainianDelight; | ||
import com.megatrex4.ukrainian_dlight.block.custom.BottleBlock; | ||
import com.megatrex4.ukrainian_dlight.item.DrinkBlockItem; | ||
import net.minecraft.block.Block; | ||
import net.minecraft.entity.effect.StatusEffectInstance; | ||
import net.minecraft.entity.effect.StatusEffects; | ||
import net.minecraft.item.BlockItem; | ||
import net.minecraft.item.FoodComponent; | ||
import net.minecraft.item.Item; | ||
import net.minecraft.registry.Registries; | ||
import net.minecraft.registry.Registry; | ||
import net.minecraft.util.Identifier; | ||
|
||
public class DrinkBottleBlock { | ||
public static final Block WINE_BOTTLE = registerBlock("wine_bottle", new BottleBlock(), new FoodComponent.Builder() | ||
.hunger(6).saturationModifier(0.6f) | ||
.statusEffect(new StatusEffectInstance(StatusEffects.REGENERATION, 30 * 20, 3), 1.0f) | ||
.statusEffect(new StatusEffectInstance(StatusEffects.ABSORPTION, 30 * 20, 3), 1.0f) | ||
.alwaysEdible() | ||
.build()); | ||
|
||
private static Block registerBlock(String name, Block block, FoodComponent foodComponent) { | ||
registerBlockItem(name, block, foodComponent); | ||
return Registry.register(Registries.BLOCK, new Identifier(UkrainianDelight.MOD_ID, name), block); | ||
} | ||
|
||
private static Item registerBlockItem(String name, Block block, FoodComponent foodComponent) { | ||
Item item; | ||
if (foodComponent != null) { | ||
item = new DrinkBlockItem(block, foodComponent); | ||
} else { | ||
item = new BlockItem(block, new Item.Settings()); | ||
} | ||
return Registry.register(Registries.ITEM, new Identifier(UkrainianDelight.MOD_ID, name), item); | ||
} | ||
|
||
public static void registerDrinkBlock() { | ||
UkrainianDelight.LOGGER.info("Registering Drink Blocks for " + UkrainianDelight.MOD_ID); | ||
} | ||
} |
70 changes: 70 additions & 0 deletions
70
remappedSrc/com/megatrex4/ukrainian_dlight/block/FoodJarBlocks.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,70 @@ | ||
package com.megatrex4.ukrainian_dlight.block; | ||
|
||
import com.megatrex4.ukrainian_dlight.UkrainianDelight; | ||
import com.megatrex4.ukrainian_dlight.block.custom.JarBlock; | ||
import com.megatrex4.ukrainian_dlight.item.FoodBlockItem; | ||
import net.minecraft.block.Block; | ||
import net.minecraft.item.BlockItem; | ||
import net.minecraft.item.FoodComponent; | ||
import net.minecraft.item.Item; | ||
import net.minecraft.registry.Registries; | ||
import net.minecraft.registry.Registry; | ||
import net.minecraft.util.Identifier; | ||
|
||
public class FoodJarBlocks { | ||
|
||
// New Jar Blocks | ||
public static final Block JAR = registerBlock("jar", new JarBlock(), null); | ||
|
||
//JAMS | ||
public static final Block APPLE_JAM = registerBlock("apple_jam", new JarBlock(), new FoodComponent.Builder() | ||
.hunger(4) | ||
.saturationModifier(0.3f) | ||
.build()); | ||
|
||
//JARRED VEGETABLES | ||
public static final Block JARRED_TOMATOES = registerBlock("jarred_tomatoes", new JarBlock(), new FoodComponent.Builder() | ||
.hunger(6).saturationModifier(0.6f) | ||
//.statusEffect(new StatusEffectInstance(StatusEffects.REGENERATION, 3 * 20, 3), 1.0f) | ||
.build()); | ||
|
||
public static final Block JARRED_CABBAGE = registerBlock("jarred_cabbage", new JarBlock(), new FoodComponent.Builder() | ||
.hunger(6).saturationModifier(0.6f) | ||
.build()); | ||
|
||
public static final Block JARRED_BEETROOT = registerBlock("jarred_beetroot", new JarBlock(), new FoodComponent.Builder() | ||
.hunger(6).saturationModifier(0.6f) | ||
.build()); | ||
|
||
public static final Block JARRED_CARROT = registerBlock("jarred_carrot", new JarBlock(), new FoodComponent.Builder() | ||
.hunger(6).saturationModifier(0.6f) | ||
.build()); | ||
|
||
public static final Block JARRED_ONION = registerBlock("jarred_onion", new JarBlock(), new FoodComponent.Builder() | ||
.hunger(6).saturationModifier(0.6f) | ||
.build()); | ||
|
||
public static final Block JARRED_BORSCHT = registerBlock("jarred_borscht", new JarBlock(), new FoodComponent.Builder() | ||
.hunger(6).saturationModifier(0.6f) | ||
.build()); | ||
|
||
|
||
private static Block registerBlock(String name, Block block, FoodComponent foodComponent) { | ||
registerBlockItem(name, block, foodComponent); | ||
return Registry.register(Registries.BLOCK, new Identifier(UkrainianDelight.MOD_ID, name), block); | ||
} | ||
|
||
private static Item registerBlockItem(String name, Block block, FoodComponent foodComponent) { | ||
Item item; | ||
if (foodComponent != null) { | ||
item = new FoodBlockItem(block, foodComponent); | ||
} else { | ||
item = new BlockItem(block, new Item.Settings()); | ||
} | ||
return Registry.register(Registries.ITEM, new Identifier(UkrainianDelight.MOD_ID, name), item); | ||
} | ||
|
||
public static void registerFoodBlocks() { | ||
UkrainianDelight.LOGGER.info("Registering Food Blocks for " + UkrainianDelight.MOD_ID); | ||
} | ||
} |
45 changes: 45 additions & 0 deletions
45
remappedSrc/com/megatrex4/ukrainian_dlight/block/ModBlocks.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,45 @@ | ||
package com.megatrex4.ukrainian_dlight.block; | ||
|
||
import com.megatrex4.ukrainian_dlight.UkrainianDelight; | ||
import com.megatrex4.ukrainian_dlight.block.custom.BrewingKegBlock; | ||
import com.megatrex4.ukrainian_dlight.block.custom.SaltBlock; | ||
import net.fabricmc.fabric.api.object.builder.v1.block.FabricBlockSettings; | ||
import net.minecraft.block.Block; | ||
import net.minecraft.block.Blocks; | ||
import net.minecraft.item.BlockItem; | ||
import net.minecraft.item.Item; | ||
import net.minecraft.registry.Registries; | ||
import net.minecraft.registry.Registry; | ||
import net.minecraft.sound.BlockSoundGroup; | ||
import net.minecraft.util.Identifier; | ||
|
||
public class ModBlocks { | ||
|
||
public static final Block SALT_BLOCK = registerBlock("salt_block", | ||
new SaltBlock(Block.Settings.copy(Blocks.STONE).sounds(BlockSoundGroup.STONE))); | ||
|
||
public static final Block SALT_BAG = registerBlock("salt_bag", | ||
new Block(FabricBlockSettings.copyOf(Blocks.WHITE_WOOL).sounds(BlockSoundGroup.WOOL))); | ||
|
||
public static final Block CUCUMBER_CRATE = registerBlock("cucumber_crate", | ||
new Block(FabricBlockSettings.copyOf(Blocks.OAK_PLANKS).sounds(BlockSoundGroup.WOOD))); | ||
|
||
public static final Block BREWING_KEG = registerBlock("brewing_keg", | ||
new BrewingKegBlock(FabricBlockSettings.copyOf(Blocks.OAK_PLANKS).sounds(BlockSoundGroup.WOOD).nonOpaque())); | ||
|
||
private static Block registerBlock(String name, Block block){ | ||
registerBlockItem(name, block); | ||
return Registry.register(Registries.BLOCK, new Identifier(UkrainianDelight.MOD_ID, name), block); | ||
} | ||
|
||
private static Item registerBlockItem(String name, Block block){ | ||
return Registry.register(Registries.ITEM, new Identifier(UkrainianDelight.MOD_ID, name), | ||
new BlockItem(block, new Item.Settings())); | ||
} | ||
|
||
public static void registerModBlocks() { | ||
UkrainianDelight.LOGGER.info("Registering Mod Blocks for " + UkrainianDelight.MOD_ID); | ||
} | ||
|
||
|
||
} |
Oops, something went wrong.