Skip to content

Commit

Permalink
update fluidStack
Browse files Browse the repository at this point in the history
added cherry
added loot table modify
  • Loading branch information
MEGATREX4 committed Jul 31, 2024
1 parent 2962c61 commit 7d91db5
Show file tree
Hide file tree
Showing 68 changed files with 4,325 additions and 9 deletions.
9 changes: 7 additions & 2 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -11,9 +11,10 @@ base {
}

repositories {
/* REI Integration */
mavenCentral()
maven { url "https://maven.fabricmc.net/" }

maven { url "https://maven.shedaniel.me/" }
/* Mod Menu Integration */
maven { url "https://maven.terraformersmc.com/releases/" }

exclusiveContent {
Expand Down Expand Up @@ -57,6 +58,10 @@ dependencies {
exclude(group: "net.fabricmc.fabric-api")
}

// Jade compat
modImplementation "maven.modrinth:jade:${jade_version}"


}

processResources {
Expand Down
3 changes: 3 additions & 0 deletions gradle.properties
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,9 @@ loader_version=0.15.11
rei_api_version=12.1.725
rei_version=12.1.725

# Jade
jade_version=11.10.0+fabric

#Dependencies
farmersdelight_version:1.4.2
fabric_version=0.83.0+1.20
Expand Down
70 changes: 70 additions & 0 deletions remappedSrc/com/megatrex4/ukrainian_dlight/UkrainianDelight.java
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();
}
}
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) {

}
}
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);
}
}
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);
}
}
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 remappedSrc/com/megatrex4/ukrainian_dlight/block/ModBlocks.java
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);
}


}
Loading

0 comments on commit 7d91db5

Please sign in to comment.