This commit is contained in:
2025-07-19 16:58:07 +03:00
commit f310596ff8
41 changed files with 2370 additions and 0 deletions

View File

@@ -0,0 +1,60 @@
package com.ismailkaygisiz.gamblingplus;
import net.minecraft.resources.ResourceLocation;
import net.minecraft.world.item.Item;
import net.minecraftforge.common.ForgeConfigSpec;
import net.minecraftforge.eventbus.api.listener.SubscribeEvent;
import net.minecraftforge.fml.common.Mod;
import net.minecraftforge.fml.event.config.ModConfigEvent;
import net.minecraftforge.registries.ForgeRegistries;
import java.util.List;
import java.util.Set;
import java.util.stream.Collectors;
// An example config class. This is not required, but it's a good idea to have one to keep your config organized.
// Demonstrates how to use Forge's config APIs
@Mod.EventBusSubscriber(modid = GamblingPlusMod.MOD_ID, bus = Mod.EventBusSubscriber.Bus.MOD)
public class Config {
private static final ForgeConfigSpec.Builder BUILDER = new ForgeConfigSpec.Builder();
private static final ForgeConfigSpec.BooleanValue LOG_DIRT_BLOCK = BUILDER
.comment("Whether to log the dirt block on common setup")
.define("logDirtBlock", true);
private static final ForgeConfigSpec.IntValue MAGIC_NUMBER = BUILDER
.comment("A magic number")
.defineInRange("magicNumber", 42, 0, Integer.MAX_VALUE);
public static final ForgeConfigSpec.ConfigValue<String> MAGIC_NUMBER_INTRODUCTION = BUILDER
.comment("What you want the introduction message to be for the magic number")
.define("magicNumberIntroduction", "The magic number is... ");
// a list of strings that are treated as resource locations for items
private static final ForgeConfigSpec.ConfigValue<List<? extends String>> ITEM_STRINGS = BUILDER
.comment("A list of items to log on common setup.")
.defineListAllowEmpty("items", List.of("minecraft:iron_ingot"), Config::validateItemName);
static final ForgeConfigSpec SPEC = BUILDER.build();
public static boolean logDirtBlock;
public static int magicNumber;
public static String magicNumberIntroduction;
public static Set<Item> items;
private static boolean validateItemName(final Object obj) {
return obj instanceof final String itemName && ForgeRegistries.ITEMS.containsKey(ResourceLocation.tryParse(itemName));
}
@SubscribeEvent
static void onLoad(final ModConfigEvent event) {
logDirtBlock = LOG_DIRT_BLOCK.get();
magicNumber = MAGIC_NUMBER.get();
magicNumberIntroduction = MAGIC_NUMBER_INTRODUCTION.get();
// convert the list of strings into a set of items
items = ITEM_STRINGS.get().stream()
.map(itemName -> ForgeRegistries.ITEMS.getValue(ResourceLocation.tryParse(itemName)))
.collect(Collectors.toSet());
}
}

View File

@@ -0,0 +1,71 @@
package com.ismailkaygisiz.gamblingplus;
import com.ismailkaygisiz.gamblingplus.block.ModBlocks;
import com.ismailkaygisiz.gamblingplus.util.ModCreativeTabs;
import com.mojang.logging.LogUtils;
import com.ismailkaygisiz.gamblingplus.item.ModItems;
//import com.ismailkaygisiz.gamblingplus.villager.ModVillagers;
//import com.ismailkaygisiz.gamblingplus.util.ModCreativeTabs;
import net.minecraft.client.Minecraft;
import net.minecraft.world.item.CreativeModeTabs;
import net.minecraftforge.api.distmarker.Dist;
import net.minecraftforge.event.BuildCreativeModeTabContentsEvent;
import net.minecraftforge.eventbus.api.listener.SubscribeEvent;
import net.minecraftforge.fml.common.Mod;
import net.minecraftforge.fml.config.ModConfig;
import net.minecraftforge.fml.event.lifecycle.FMLClientSetupEvent;
import net.minecraftforge.fml.event.lifecycle.FMLCommonSetupEvent;
import net.minecraftforge.fml.javafmlmod.FMLJavaModLoadingContext;
import org.slf4j.Logger;
@Mod(GamblingPlusMod.MOD_ID)
public final class GamblingPlusMod {
public static final String MOD_ID = "ikgamblingplusmod";
private static final Logger LOGGER = LogUtils.getLogger();
public GamblingPlusMod(FMLJavaModLoadingContext context) {
var modBusGroup = context.getModBusGroup();
// Register the commonSetup method for modloading
FMLCommonSetupEvent.getBus(modBusGroup).addListener(this::commonSetup);
ModBlocks.register(modBusGroup);
//ModBlocks.registerBlockItems(modBusGroup);
ModItems.register(modBusGroup);
//ModVillagers.register(modBusGroup);
ModCreativeTabs.register(modBusGroup);
// Register the item to a creative tab
BuildCreativeModeTabContentsEvent.getBus(modBusGroup).addListener(GamblingPlusMod::addCreative);
// Register our mod's ForgeConfigSpec so that Forge can create and load the config file for us
context.registerConfig(ModConfig.Type.COMMON, Config.SPEC);
}
private void commonSetup(final FMLCommonSetupEvent event) {
}
// Add the example block item to the building blocks tab
private static void addCreative(BuildCreativeModeTabContentsEvent event) {
if(event.getTabKey() == CreativeModeTabs.INGREDIENTS) {
event.accept(ModItems.RUBY);
event.accept(ModItems.RAW_RUBY);
}
if(event.getTabKey() == CreativeModeTabs.BUILDING_BLOCKS){
event.accept(ModBlocks.RUBY_BLOCK);
event.accept(ModBlocks.RAW_RUBY_BLOCK);
}
}
// You can use EventBusSubscriber to automatically register all static methods in the class annotated with @SubscribeEvent
@Mod.EventBusSubscriber(modid = MOD_ID, value = Dist.CLIENT)
public static class ClientModEvents {
@SubscribeEvent
public static void onClientSetup(FMLClientSetupEvent event) {
// Some client setup code
LOGGER.info("HELLO FROM CLIENT SETUP");
LOGGER.info("MINECRAFT NAME >> {}", Minecraft.getInstance().getUser().getName());
}
}
}

View File

@@ -0,0 +1,55 @@
/*package com.ismailkaygisiz.gamblingplus.block;
import net.minecraft.core.BlockPos;
import net.minecraft.network.chat.Component;
import net.minecraft.world.InteractionHand;
import net.minecraft.world.InteractionResult;
import net.minecraft.world.entity.player.Player;
import net.minecraft.world.item.ItemStack;
import net.minecraft.world.item.Items;
import net.minecraft.world.level.Level;
import net.minecraft.world.level.block.Block;
import net.minecraft.world.level.block.state.BlockState;
import net.minecraft.world.phys.BlockHitResult;
import java.util.Random;
public class GamblingTableBlock extends Block {
public GamblingTableBlock(Properties properties) { super(properties); }
@Override
protected InteractionResult useItemOn(ItemStack pStack, BlockState pState, Level pLevel, BlockPos pPos, Player pPlayer, InteractionHand pHand, BlockHitResult pHitResult) {
if (!pLevel.isClientSide && pHand == InteractionHand.MAIN_HAND) {
ItemStack held = pPlayer.getItemInHand(pHand);
int bet = 0;
if (held.getItem() == Items.EMERALD && held.getCount() >= 10) bet = 10;
else if (held.getItem() == Items.EMERALD && held.getCount() >= 5) bet = 5;
else if (held.getItem() == Items.EMERALD && held.getCount() >= 1) bet = 1;
if (bet > 0) {
held.shrink(bet);
int roll = new Random().nextInt(100);
if (roll < 40) {
pPlayer.displayClientMessage(net.minecraft.network.chat.Component.literal("Kaybettin!"),true);
} else if (roll < 70) {
pPlayer.giveExperiencePoints(bet * 5);
pPlayer.displayClientMessage(net.minecraft.network.chat.Component.literal("Kazandın! " + (bet * 5) + " XP kazandın."),true);
} else if (roll < 85) {
pPlayer.getInventory().add(new ItemStack(Items.GOLD_INGOT, bet));
pPlayer.displayClientMessage(Component.literal("Kazandın! " + bet + " altın kazandın."),true);
} else if (roll < 95) {
pPlayer.getInventory().add(new ItemStack(Items.DIAMOND, 1));
pPlayer.displayClientMessage(net.minecraft.network.chat.Component.literal("Büyük ödül! 1 elmas kazandın."),true);
} else {
pPlayer.getInventory().add(new ItemStack(Items.EMERALD, bet * 2));
pPlayer.displayClientMessage(net.minecraft.network.chat.Component.literal("Bahsin iki katı kadar zümrüt kazandın!"),true);
}
return InteractionResult.SUCCESS;
} else {
pPlayer.displayClientMessage(net.minecraft.network.chat.Component.literal("Bahis için en az 1 zümrüt olmalı!"),true);
return InteractionResult.FAIL;
}
}
return InteractionResult.SUCCESS;
}
} */

View File

@@ -0,0 +1,47 @@
package com.ismailkaygisiz.gamblingplus.block;
import com.ismailkaygisiz.gamblingplus.GamblingPlusMod;
import com.ismailkaygisiz.gamblingplus.item.ModItems;
import net.minecraft.core.registries.Registries;
import net.minecraft.resources.ResourceKey;
import net.minecraft.resources.ResourceLocation;
import net.minecraft.world.item.BlockItem;
import net.minecraft.world.item.CreativeModeTabs;
import net.minecraft.world.item.Item;
import net.minecraft.world.level.block.Block;
import net.minecraft.world.level.block.Blocks;
import net.minecraft.world.level.block.SoundType;
import net.minecraft.world.level.block.state.BlockBehaviour;
import net.minecraft.world.level.material.MapColor;
import net.minecraftforge.eventbus.api.bus.BusGroup;
import net.minecraftforge.registries.DeferredRegister;
import net.minecraftforge.registries.ForgeRegistries;
import net.minecraftforge.registries.RegistryObject;
import java.util.function.Supplier;
public class ModBlocks {
public static final DeferredRegister<Block> BLOCKS = DeferredRegister.create(ForgeRegistries.BLOCKS, GamblingPlusMod.MOD_ID);
public static final RegistryObject<Block> RUBY_BLOCK = registerBlock("ruby_block", ()-> new Block(BlockBehaviour.Properties.of()
.setId((ResourceKey.create(Registries.BLOCK, ResourceLocation.parse(String.format("%s:%s", GamblingPlusMod.MOD_ID, "ruby_block")))))
.strength(.1f).requiresCorrectToolForDrops().sound(SoundType.IRON)));
public static final RegistryObject<Block> RAW_RUBY_BLOCK = registerBlock("raw_ruby_block", ()-> new Block(BlockBehaviour.Properties.of()
.setId((ResourceKey.create(Registries.BLOCK, ResourceLocation.parse(String.format("%s:%s", GamblingPlusMod.MOD_ID, "raw_ruby_block")))))
.strength(.1f).requiresCorrectToolForDrops()));
public static <T extends Block> void registerBlockItem(String name, RegistryObject<T> block){
ModItems.ITEMS.register(name,()-> new BlockItem(block.get(), new Item.Properties()
.setId(ResourceKey.create(Registries.ITEM, ResourceLocation.parse(String.format("%s:%s", GamblingPlusMod.MOD_ID, name))))
.useItemDescriptionPrefix()));
}
public static <T extends Block> RegistryObject<T> registerBlock(String name, Supplier<T> block){
RegistryObject<T> toReturn = BLOCKS.register(name,block);
registerBlockItem(name, toReturn);
return toReturn;
}
public static void register(BusGroup eventBus) { BLOCKS.register(eventBus); }
}

View File

@@ -0,0 +1,47 @@
package com.ismailkaygisiz.gamblingplus.item;
import com.ismailkaygisiz.gamblingplus.GamblingPlusMod;
//import com.ismailkaygisiz.gamblingplus.item.SpecialEggItem;
import net.minecraft.core.registries.Registries;
import net.minecraft.resources.ResourceKey;
import net.minecraft.resources.ResourceLocation;
import net.minecraft.world.item.CreativeModeTabs;
import net.minecraft.world.item.Item;
import net.minecraft.world.item.SpawnEggItem;
import net.minecraft.world.item.Item.Properties;
//import net.minecraftforge.event.CreativeModeTabEvent;
//import net.minecraftforge.eventbus.api.IEventBus;
import net.minecraftforge.eventbus.api.bus.BusGroup;
import net.minecraftforge.registries.DeferredRegister;
import net.minecraftforge.registries.ForgeRegistries;
import net.minecraftforge.registries.RegistryObject;
public class ModItems {
public static final DeferredRegister<Item> ITEMS = DeferredRegister.create(ForgeRegistries.ITEMS, GamblingPlusMod.MOD_ID);
public static final RegistryObject<Item> RUBY = ITEMS.register("ruby", () ->
new Item(new Item.Properties().useItemDescriptionPrefix().setId(ResourceKey.create(
Registries.ITEM, ResourceLocation.parse(
String.format("%s:%s", GamblingPlusMod.MOD_ID, "ruby")
)))));
public static final RegistryObject<Item> RAW_RUBY = ITEMS.register("raw_ruby", () ->
new Item(new Item.Properties().useItemDescriptionPrefix().setId(ResourceKey.create(
Registries.ITEM, ResourceLocation.parse(
String.format("%s:%s", GamblingPlusMod.MOD_ID, "raw_ruby")
)))));
/*public static final RegistryObject<Item> SPECIAL_EGG = ITEMS.register("special_egg", () -> new SpecialEggItem(new Properties().stacksTo(1)));
public static final RegistryObject<Item> RUBY_WORKER_SPAWN_EGG = ITEMS.register("ruby_worker_spawn_egg", () -> new SpawnEggItem(null, 0xAA0000, 0x880000, new Properties()));
public static final RegistryObject<Item> GAMBLER_SPAWN_EGG = ITEMS.register("gambler_spawn_egg", () -> new SpawnEggItem(null, 0x00AA00, 0x008800, new Properties()));
public static void addItemsToTabs(CreativeModeTabEvent.Register event) {
event.getTab(CreativeModeTabs.INGREDIENTS).accept(RUBY);
event.getTab(CreativeModeTabs.INGREDIENTS).accept(SPECIAL_EGG);
event.getTab(CreativeModeTabs.SPAWN_EGGS).accept(RUBY_WORKER_SPAWN_EGG);
event.getTab(CreativeModeTabs.SPAWN_EGGS).accept(GAMBLER_SPAWN_EGG);
}*/
public static void register(BusGroup eventBus) { ITEMS.register(eventBus); }
}

View File

@@ -0,0 +1,36 @@
/*package com.ismailkaygisiz.gamblingplus.item;
import net.minecraft.world.InteractionHand;
import net.minecraft.world.InteractionResultHolder;
import net.minecraft.world.entity.EntityType;
import net.minecraft.world.entity.LivingEntity;
import net.minecraft.world.entity.player.Player;
import net.minecraft.world.item.Item;
import net.minecraft.world.item.ItemStack;
import net.minecraft.world.item.SpawnEggItem;
import net.minecraft.world.level.Level;
public class SpecialEggItem extends Item {
public SpecialEggItem(Properties properties) { super(properties); }
@Override
public InteractionResultHolder<ItemStack> use(Level level, Player player, InteractionHand hand) {
if (!level.isClientSide) {
var target = player.pick(5.0D, 0.0F, false).getEntity();
if (target instanceof LivingEntity living) {
EntityType<?> type = living.getType();
ItemStack egg = SpawnEggItem.byId(type);
if (egg != null && !egg.isEmpty()) {
if (!player.getInventory().add(egg)) {
player.drop(egg, false);
}
player.sendSystemMessage(net.minecraft.network.chat.Component.literal(type.getDescription().getString() + " yumurtasını aldın!"));
} else {
player.sendSystemMessage(net.minecraft.network.chat.Component.literal("Bu canlı için yumurta yok!"));
}
player.getItemInHand(hand).shrink(1);
return InteractionResultHolder.success(player.getItemInHand(hand));
}
}
return super.use(level, player, hand);
}
} */

View File

@@ -0,0 +1,29 @@
package com.ismailkaygisiz.gamblingplus.util;
import com.ismailkaygisiz.gamblingplus.GamblingPlusMod;
import com.ismailkaygisiz.gamblingplus.block.ModBlocks;
import com.ismailkaygisiz.gamblingplus.item.ModItems;
import net.minecraft.core.registries.Registries;
import net.minecraft.world.item.CreativeModeTab;
import net.minecraft.world.item.ItemStack;
import net.minecraftforge.eventbus.api.bus.BusGroup;
import net.minecraftforge.registries.DeferredRegister;
import net.minecraftforge.registries.ForgeRegistries;
import net.minecraftforge.registries.RegistryObject;
public class ModCreativeTabs {
public static final DeferredRegister<CreativeModeTab> CREATIVE_MODE_TABS = DeferredRegister.create(Registries.CREATIVE_MODE_TAB, GamblingPlusMod.MOD_ID);
public static final RegistryObject<CreativeModeTab> GAMBLING_TAB = CREATIVE_MODE_TABS.register("gambling_tab",
() -> CreativeModeTab.builder()
.icon(() -> new ItemStack(com.ismailkaygisiz.gamblingplus.item.ModItems.RUBY.get()))
.title(net.minecraft.network.chat.Component.translatable("creativetab.ikgamblingplusmod.gambling_tab"))
.displayItems((pParameters, pOutput) -> {
pOutput.accept(ModItems.RUBY.get());
pOutput.accept(ModItems.RAW_RUBY.get());
pOutput.accept(ModBlocks.RUBY_BLOCK.get());
pOutput.accept(ModBlocks.RAW_RUBY_BLOCK.get());
})
.build());
public static void register(BusGroup eventBus) { CREATIVE_MODE_TABS.register(eventBus); }
}

View File

@@ -0,0 +1,48 @@
/*
package com.ismailkaygisiz.gamblingplus.villager;
import com.ismailkaygisiz.gamblingplus.item.ModItems;
import net.minecraft.world.entity.npc.VillagerTrades;
import net.minecraft.world.item.Items;
import net.minecraft.world.item.trading.MerchantOffer;
import net.minecraftforge.event.village.VillagerTradesEvent;
import net.minecraftforge.eventbus.api.SubscribeEvent;
import net.minecraftforge.fml.common.Mod;
@Mod.EventBusSubscriber(bus = Mod.EventBusSubscriber.Bus.FORGE)
public class ModVillagerTrades {
public static void onVillagerTrades(VillagerTradesEvent event) {
if (event.getType().toString().contains("ruby_worker")) {
VillagerTrades.ItemListing[] level1 = new VillagerTrades.ItemListing[] {
(entity, random) -> new MerchantOffer(ModItems.RUBY.get().getDefaultInstance(), new net.minecraft.world.item.ItemStack(Items.EMERALD), 16, 2, 0.05F),
(entity, random) -> new MerchantOffer(ModItems.RUBY.get().getDefaultInstance(), new net.minecraft.world.item.ItemStack(Items.IRON_INGOT), 16, 2, 0.05F),
(entity, random) -> new MerchantOffer(ModItems.RUBY.get().getDefaultInstance(), new net.minecraft.world.item.ItemStack(Items.GOLD_INGOT), 16, 2, 0.05F),
(entity, random) -> new MerchantOffer(ModItems.RUBY.get().getDefaultInstance(), new net.minecraft.world.item.ItemStack(Items.DIAMOND), 8, 2, 0.05F)
};
VillagerTrades.ItemListing[] level5 = new VillagerTrades.ItemListing[] {
(entity, random) -> new MerchantOffer(new net.minecraft.world.item.ItemStack(ModItems.RUBY.get(), 64), new net.minecraft.world.item.ItemStack(Items.EMERALD, 64),
new net.minecraft.world.item.ItemStack(Items.ELYTRA), 1, 30, 0.2F)
};
event.getTrades().put(1, java.util.List.of(level1));
event.getTrades().put(5, java.util.List.of(level5));
}
if (event.getType().toString().contains("gambler")) {
VillagerTrades.ItemListing[] level1 = new VillagerTrades.ItemListing[] {
(entity, random) -> new MerchantOffer(new net.minecraft.world.item.ItemStack(Items.EMERALD, 15), new net.minecraft.world.item.ItemStack(Items.DIAMOND), 8, 2, 0.05F),
(entity, random) -> new MerchantOffer(new net.minecraft.world.item.ItemStack(Items.EMERALD, 5), new net.minecraft.world.item.ItemStack(Items.GOLD_INGOT), 16, 2, 0.05F),
(entity, random) -> new MerchantOffer(new net.minecraft.world.item.ItemStack(Items.EMERALD, 3), new net.minecraft.world.item.ItemStack(Items.IRON_INGOT), 16, 2, 0.05F)
};
VillagerTrades.ItemListing[] level3 = new VillagerTrades.ItemListing[] {
(entity, random) -> new MerchantOffer(new net.minecraft.world.item.ItemStack(Items.EMERALD, 32), new net.minecraft.world.item.ItemStack(Items.CREEPER_SPAWN_EGG), 1, 5, 0.2F),
(entity, random) -> new MerchantOffer(new net.minecraft.world.item.ItemStack(Items.EMERALD, 32), new net.minecraft.world.item.ItemStack(Items.ENDERMAN_SPAWN_EGG), 1, 5, 0.2F)
};
VillagerTrades.ItemListing[] level5 = new VillagerTrades.ItemListing[] {
(entity, random) -> new MerchantOffer(new net.minecraft.world.item.ItemStack(Items.EMERALD, 64), ModItems.SPECIAL_EGG.get().getDefaultInstance(), 1, 30, 0.2F)
};
event.getTrades().put(1, java.util.List.of(level1));
event.getTrades().put(3, java.util.List.of(level3));
event.getTrades().put(5, java.util.List.of(level5));
}
}
} */

View File

@@ -0,0 +1,25 @@
/*package com.ismailkaygisiz.gamblingplus.villager;
import com.ismailkaygisiz.gamblingplus.GamblingPlusMod;
import com.ismailkaygisiz.gamblingplus.block.ModBlocks;
import net.minecraft.world.entity.npc.VillagerProfession;
import net.minecraft.world.entity.npc.VillagerType;
import net.minecraftforge.eventbus.api.bus.BusGroup;
import net.minecraftforge.registries.DeferredRegister;
import net.minecraftforge.registries.ForgeRegistries;
import net.minecraftforge.registries.RegistryObject;
public class ModVillagers {
public static final DeferredRegister<VillagerProfession> PROFESSIONS = DeferredRegister.create(ForgeRegistries.VILLAGER_PROFESSIONS, GamblingPlusMod.MOD_ID);
public static final DeferredRegister<VillagerType> TYPES = DeferredRegister.create(ForgeRegistries.VILLAGER_TYPES, GamblingPlusMod.MOD_ID);
public static final RegistryObject<VillagerProfession> RUBY_WORKER = PROFESSIONS.register("ruby_worker",
() -> new VillagerProfession("ruby_worker", holder -> holder.is(ModBlocks.RUBY_SMITHING_TABLE.get().asItem().builtInRegistryHolder()),
holder -> holder.is(ModBlocks.RUBY_SMITHING_TABLE.get().asItem().builtInRegistryHolder())));
public static final RegistryObject<VillagerProfession> GAMBLER = PROFESSIONS.register("gambler",
() -> new VillagerProfession("gambler", holder -> holder.is(ModBlocks.GAMBLING_TABLE.get().asItem().builtInRegistryHolder()),
holder -> holder.is(ModBlocks.GAMBLING_TABLE.get().asItem().builtInRegistryHolder())));
public static void register(BusGroup eventBus) {
PROFESSIONS.register(eventBus);
TYPES.register(eventBus);
}
} */

View File

@@ -0,0 +1,73 @@
# This is an example mods.toml file. It contains the data relating to the loading mods.
# There are several mandatory fields (#mandatory), and many more that are optional (#optional).
# The overall format is standard TOML format, v0.5.0.
# Note that there are a couple of TOML lists in this file.
# Find more information on toml format here: https://github.com/toml-lang/toml
# The name of the mod loader type to load - for regular FML @Mod mods it should be javafml
modLoader="javafml" #mandatory
# A version range to match for said mod loader - for regular FML @Mod it will be the forge version
loaderVersion="${loader_version_range}" #mandatory This is typically bumped every Minecraft version by Forge. See our download page for lists of versions.
# The license for you mod. This is mandatory metadata and allows for easier comprehension of your redistributive properties.
# Review your options at https://choosealicense.com/. All rights reserved is the default copyright stance, and is thus the default here.
license="${mod_license}"
# A URL to refer people to when problems occur with this mod
#issueTrackerURL="https://change.me.to.your.issue.tracker.example.invalid/" #optional
# If your mod is purely client-side and has no multiplayer functionality (be it dedicated servers or Open to LAN),
# set this to true, and Forge will set the correct displayTest for you and skip loading your mod on dedicated servers.
#clientSideOnly=true #optional - defaults to false if absent
# A list of mods - how many allowed here is determined by the individual mod loader
[[mods]] #mandatory
# The modid of the mod
modId="${mod_id}" #mandatory
# The version number of the mod
version="${mod_version}" #mandatory
# A display name for the mod
displayName="${mod_name}" #mandatory
# A URL to query for updates for this mod. See the JSON update specification https://docs.minecraftforge.net/en/latest/misc/updatechecker/
#updateJSONURL="https://change.me.example.invalid/updates.json" #optional
# A URL for the "homepage" for this mod, displayed in the mod UI
#displayURL="https://change.me.to.your.mods.homepage.example.invalid/" #optional
# A file name (in the root of the mod JAR) containing a logo for display
#logoFile="examplemod.png" #optional
# A text field displayed in the mod UI
#credits="" #optional
# A text field displayed in the mod UI
authors="${mod_authors}" #optional
# Display Test controls the display for your mod in the server connection screen
# MATCH_VERSION means that your mod will cause a red X if the versions on client and server differ. This is the default behaviour and should be what you choose if you have server and client elements to your mod.
# IGNORE_SERVER_VERSION means that your mod will not cause a red X if it's present on the server but not on the client. This is what you should use if you're a server only mod.
# IGNORE_ALL_VERSION means that your mod will not cause a red X if it's present on the client or the server. This is a special case and should only be used if your mod has no server component.
# NONE means that no display test is set on your mod. You need to do this yourself, see IExtensionPoint.DisplayTest for more information. You can define any scheme you wish with this value.
# IMPORTANT NOTE: this is NOT an instruction as to which environments (CLIENT or DEDICATED SERVER) your mod loads on. Your mod should load (and maybe do nothing!) whereever it finds itself.
#displayTest="MATCH_VERSION" # if nothing is specified, MATCH_VERSION is the default when clientSideOnly=false, otherwise IGNORE_ALL_VERSION when clientSideOnly=true (#optional)
# The description text for the mod (multi line!) (#mandatory)
description='''${mod_description}'''
# A dependency - use the . to indicate dependency for a specific modid. Dependencies are optional.
[[dependencies.${mod_id}]] #optional
# the modid of the dependency
modId="forge" #mandatory
# Does this dependency have to exist - if not, ordering below must be specified
mandatory=true #mandatory
# The version range of the dependency
versionRange="${forge_version_range}" #mandatory
# An ordering relationship for the dependency - BEFORE or AFTER required if the dependency is not mandatory
# BEFORE - This mod is loaded BEFORE the dependency
# AFTER - This mod is loaded AFTER the dependency
ordering="NONE"
# Side this dependency is applied on - BOTH, CLIENT, or SERVER
side="BOTH"
# Here's another dependency
[[dependencies.${mod_id}]]
modId="minecraft"
mandatory=true
# This version range declares a minimum of the current minecraft version up to but not including the next major version
versionRange="${minecraft_version_range}"
ordering="NONE"
side="BOTH"
# Features are specific properties of the game environment, that you may want to declare you require. This example declares
# that your mod requires GL version 3.2 or higher. Other features will be added. They are side aware so declaring this won't
# stop your mod loading on the server for example.
#[features.${mod_id}]
#openGLVersion="[3.2,)"

View File

@@ -0,0 +1,7 @@
{
"variants": {
"": {
"model": "ikgamblingplusmod:block/raw_ruby_block"
}
}
}

View File

@@ -0,0 +1,7 @@
{
"variants": {
"": {
"model": "ikgamblingplusmod:block/ruby_block"
}
}
}

View File

@@ -0,0 +1,6 @@
{
"model": {
"type": "minecraft:model",
"model": "ikgamblingplusmod:item/raw_ruby"
}
}

View File

@@ -0,0 +1,6 @@
{
"model": {
"type": "minecraft:model",
"model": "ikgamblingplusmod:item/raw_ruby_block"
}
}

View File

@@ -0,0 +1,6 @@
{
"model": {
"type": "minecraft:model",
"model": "ikgamblingplusmod:item/ruby"
}
}

View File

@@ -0,0 +1,6 @@
{
"model": {
"type": "minecraft:model",
"model": "ikgamblingplusmod:item/ruby_block"
}
}

View File

@@ -0,0 +1,7 @@
{
"item.ikgamblingplusmod.ruby": "Ruby Gem",
"item.ikgamblingplusmod.raw_ruby": "Raw Ruby",
"item.ikgamblingplusmod.ruby_block": "Block of Ruby",
"item.ikgamblingplusmod.raw_ruby_block": "Block of Raw Ruby",
"creativetab.ikgamblingplusmod.gambling_tab": "Gambling Plus"
}

View File

@@ -0,0 +1,6 @@
{
"parent": "minecraft:block/cube_all",
"textures": {
"all": "ikgamblingplusmod:block/raw_ruby_block"
}
}

View File

@@ -0,0 +1,6 @@
{
"parent": "minecraft:block/cube_all",
"textures": {
"all": "ikgamblingplusmod:block/ruby_block"
}
}

View File

@@ -0,0 +1,6 @@
{
"parent": "minecraft:item/generated",
"textures": {
"layer0": "ikgamblingplusmod:item/raw_ruby"
}
}

View File

@@ -0,0 +1,3 @@
{
"parent": "ikgamblingplusmod:block/raw_ruby_block"
}

View File

@@ -0,0 +1,6 @@
{
"parent": "minecraft:item/generated",
"textures": {
"layer0": "ikgamblingplusmod:item/ruby"
}
}

View File

@@ -0,0 +1,3 @@
{
"parent": "ikgamblingplusmod:block/ruby_block"
}

Binary file not shown.

After

Width:  |  Height:  |  Size: 811 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 528 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 544 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 397 B

View File

@@ -0,0 +1,6 @@
{
"pack": {
"description": "${mod_id} resources",
"pack_format": 63
}
}