Rebrand as BCx-modern, a 1.7.10 port of BCx
Position this mod as a port of BCx from the Minecraft 1.2.5 era. - Rename the mod to BCx-modern (modid bcxmodern) and the package to net.kanawo.bcxmodern; the main class is now BCxModern and takes its version from Tags.VERSION. - Move assets to assets/bcxmodern and rename the lang key and EMC save data to match. - Fill in mcmod.info (description, author agomizi1cm, credits, dependencies) and the LICENSE copyright holder. - Add a README. - Remove template leftovers: CODEOWNERS, LICENSE-template, the greeting Config, template comments, empty event handlers and the commented-out NEI dependency. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
1 parent
ecde802cdb
commit
28b1841c2a
27 files changed
+150
-194
No files matched your search
@@ -1,3 +0,0 @@
|
|||||||
# Any Github changes require admin approval
|
|
||||||
/.github/** @GTNewHorizons/admin
|
|
||||||
|
|
||||||
@@ -1,21 +0,0 @@
|
|||||||
MIT License
|
|
||||||
|
|
||||||
Copyright (c) <year> <copyright holders>
|
|
||||||
|
|
||||||
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
||||||
of this software and associated documentation files (the "Software"), to deal
|
|
||||||
in the Software without restriction, including without limitation the rights
|
|
||||||
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
||||||
copies of the Software, and to permit persons to whom the Software is
|
|
||||||
furnished to do so, subject to the following conditions:
|
|
||||||
|
|
||||||
The above copyright notice and this permission notice shall be included in all
|
|
||||||
copies or substantial portions of the Software.
|
|
||||||
|
|
||||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
||||||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
||||||
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
||||||
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
||||||
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
||||||
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
||||||
SOFTWARE.
|
|
||||||
@@ -0,0 +1,38 @@
|
|||||||
|
# BCx-modern
|
||||||
|
|
||||||
|
Minecraft 1.2.5 時代の BuildCraft × Equivalent Exchange アドオン「BCx」を、Minecraft 1.7.10 (Forge 10.13.4.1614) 向けに移植したものです。
|
||||||
|
|
||||||
|
## 追加要素
|
||||||
|
|
||||||
|
### EMC Builder
|
||||||
|
|
||||||
|
BuildCraft の Builder を拡張し、建築に必要な資材を EMC で支払えるようにしたブロックです。
|
||||||
|
|
||||||
|
- 内部インベントリや液体タンクにある資材が先に使われ、足りない分を EMC で補います(EMC 値 1:1)。
|
||||||
|
- EMC はワールドごと・プレイヤーごとに保存され、同じプレイヤーが所有する EMC Builder はすべて同じ残高を共有します。
|
||||||
|
- GUI の EMC スロットにアイテムを入れると、Transmutation Table と同様に EMC に変換されます。
|
||||||
|
- レシピ: Builder + Transmutation Table(不定形)
|
||||||
|
|
||||||
|
## 必要な Mod
|
||||||
|
|
||||||
|
- BuildCraft 7.1.x(Builders)
|
||||||
|
- ProjectE
|
||||||
|
|
||||||
|
## ビルド
|
||||||
|
|
||||||
|
開発用の依存 jar(`libs/` に配置、リポジトリには含まない):
|
||||||
|
|
||||||
|
- `buildcraft-7.1.27-dev.jar`(BuildCraft で `gradlew deobfJar`)
|
||||||
|
- `FMProjectE-*-dev.jar`(FMProjectE で `gradlew jar`)
|
||||||
|
|
||||||
|
```bash
|
||||||
|
./gradlew build
|
||||||
|
```
|
||||||
|
|
||||||
|
## 作者
|
||||||
|
|
||||||
|
agomizi1cm
|
||||||
|
|
||||||
|
## ライセンス
|
||||||
|
|
||||||
|
MIT
|
||||||
@@ -34,8 +34,6 @@
|
|||||||
* For more details, see https://docs.gradle.org/8.0.1/userguide/java_library_plugin.html#sec:java_library_configurations_graph
|
* For more details, see https://docs.gradle.org/8.0.1/userguide/java_library_plugin.html#sec:java_library_configurations_graph
|
||||||
*/
|
*/
|
||||||
dependencies {
|
dependencies {
|
||||||
//runtimeOnlyNonPublishable("com.github.GTNewHorizons:NotEnoughItems:2.7.69-GTNH:dev")
|
|
||||||
|
|
||||||
// Local deobfuscated (MCP-named) dev jars placed in libs/:
|
// Local deobfuscated (MCP-named) dev jars placed in libs/:
|
||||||
// - BuildCraft 7.1.27 (gradlew deobfJar -> buildcraft-7.1.27-dev.jar)
|
// - BuildCraft 7.1.27 (gradlew deobfJar -> buildcraft-7.1.27-dev.jar)
|
||||||
// - FMProjectE (gradlew jar -> FMProjectE-*-dev.jar)
|
// - FMProjectE (gradlew jar -> FMProjectE-*-dev.jar)
|
||||||
|
|||||||
+4
-4
@@ -3,15 +3,15 @@
|
|||||||
gtnh.settings.blowdryerTag = 0.2.2
|
gtnh.settings.blowdryerTag = 0.2.2
|
||||||
|
|
||||||
# Human-readable mod name, available for mcmod.info population.
|
# Human-readable mod name, available for mcmod.info population.
|
||||||
modName = EMCBuilder
|
modName = BCx-modern
|
||||||
|
|
||||||
# Case-sensitive identifier string, available for mcmod.info population and used for automatic mixin JSON generation.
|
# Case-sensitive identifier string, available for mcmod.info population and used for automatic mixin JSON generation.
|
||||||
# Conventionally lowercase.
|
# Conventionally lowercase.
|
||||||
modId = emcbuilder
|
modId = bcxmodern
|
||||||
|
|
||||||
# Root package of the mod, used to find various classes in other properties,
|
# Root package of the mod, used to find various classes in other properties,
|
||||||
# mcmod.info substitution, enabling assertions in run tasks, etc.
|
# mcmod.info substitution, enabling assertions in run tasks, etc.
|
||||||
modGroup = net.kanawo.emcbuilder
|
modGroup = net.kanawo.bcxmodern
|
||||||
|
|
||||||
# Whether to use modGroup as the maven publishing group.
|
# Whether to use modGroup as the maven publishing group.
|
||||||
# When false, com.github.GTNewHorizons is used.
|
# When false, com.github.GTNewHorizons is used.
|
||||||
@@ -74,7 +74,7 @@ enableGenericInjection = true
|
|||||||
# Generate a class with a String field for the mod version named as defined below.
|
# Generate a class with a String field for the mod version named as defined below.
|
||||||
# If generateGradleTokenClass is empty or not missing, no such class will be generated.
|
# If generateGradleTokenClass is empty or not missing, no such class will be generated.
|
||||||
# If gradleTokenVersion is empty or missing, the field will not be present in the class.
|
# If gradleTokenVersion is empty or missing, the field will not be present in the class.
|
||||||
generateGradleTokenClass = net.kanawo.emcbuilder.Tags
|
generateGradleTokenClass = net.kanawo.bcxmodern.Tags
|
||||||
|
|
||||||
# Name of the token containing the project's current version to generate/replace.
|
# Name of the token containing the project's current version to generate/replace.
|
||||||
gradleTokenVersion = VERSION
|
gradleTokenVersion = VERSION
|
||||||
|
|||||||
@@ -0,0 +1,37 @@
|
|||||||
|
package net.kanawo.bcxmodern;
|
||||||
|
|
||||||
|
import org.apache.logging.log4j.LogManager;
|
||||||
|
import org.apache.logging.log4j.Logger;
|
||||||
|
|
||||||
|
import cpw.mods.fml.common.Mod;
|
||||||
|
import cpw.mods.fml.common.SidedProxy;
|
||||||
|
import cpw.mods.fml.common.event.FMLInitializationEvent;
|
||||||
|
import cpw.mods.fml.common.event.FMLPreInitializationEvent;
|
||||||
|
|
||||||
|
@Mod(
|
||||||
|
modid = BCxModern.MODID,
|
||||||
|
version = Tags.VERSION,
|
||||||
|
name = "BCx-modern",
|
||||||
|
acceptedMinecraftVersions = "[1.7.10]",
|
||||||
|
dependencies = "required-after:BuildCraft|Builders;required-after:ProjectE")
|
||||||
|
public class BCxModern {
|
||||||
|
|
||||||
|
public static final String MODID = "bcxmodern";
|
||||||
|
public static final Logger LOG = LogManager.getLogger(MODID);
|
||||||
|
|
||||||
|
@Mod.Instance(MODID)
|
||||||
|
public static BCxModern instance;
|
||||||
|
|
||||||
|
@SidedProxy(clientSide = "net.kanawo.bcxmodern.ClientProxy", serverSide = "net.kanawo.bcxmodern.CommonProxy")
|
||||||
|
public static CommonProxy proxy;
|
||||||
|
|
||||||
|
@Mod.EventHandler
|
||||||
|
public void preInit(FMLPreInitializationEvent event) {
|
||||||
|
proxy.preInit(event);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Mod.EventHandler
|
||||||
|
public void init(FMLInitializationEvent event) {
|
||||||
|
proxy.init(event);
|
||||||
|
}
|
||||||
|
}
|
||||||
+2
-5
@@ -1,6 +1,6 @@
|
|||||||
package net.kanawo.emcbuilder;
|
package net.kanawo.bcxmodern;
|
||||||
|
|
||||||
import net.kanawo.emcbuilder.tile.TileEMCBuilder;
|
import net.kanawo.bcxmodern.tile.TileEMCBuilder;
|
||||||
|
|
||||||
import buildcraft.core.render.RenderBuilder;
|
import buildcraft.core.render.RenderBuilder;
|
||||||
import cpw.mods.fml.client.registry.ClientRegistry;
|
import cpw.mods.fml.client.registry.ClientRegistry;
|
||||||
@@ -8,9 +8,6 @@ import cpw.mods.fml.common.event.FMLInitializationEvent;
|
|||||||
|
|
||||||
public class ClientProxy extends CommonProxy {
|
public class ClientProxy extends CommonProxy {
|
||||||
|
|
||||||
// Override CommonProxy methods here, if you want a different behaviour on the client (e.g. registering renders).
|
|
||||||
// Don't forget to call the super methods as well.
|
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void init(FMLInitializationEvent event) {
|
public void init(FMLInitializationEvent event) {
|
||||||
super.init(event);
|
super.init(event);
|
||||||
@@ -0,0 +1,37 @@
|
|||||||
|
package net.kanawo.bcxmodern;
|
||||||
|
|
||||||
|
import net.kanawo.bcxmodern.block.BlockEMCBuilder;
|
||||||
|
import net.kanawo.bcxmodern.block.SchematicEMCBuilder;
|
||||||
|
import net.kanawo.bcxmodern.gui.GuiHandler;
|
||||||
|
import net.kanawo.bcxmodern.tile.TileEMCBuilder;
|
||||||
|
import net.minecraft.item.ItemStack;
|
||||||
|
|
||||||
|
import buildcraft.BuildCraftBuilders;
|
||||||
|
import buildcraft.api.blueprints.BuilderAPI;
|
||||||
|
import cpw.mods.fml.common.event.FMLInitializationEvent;
|
||||||
|
import cpw.mods.fml.common.event.FMLPreInitializationEvent;
|
||||||
|
import cpw.mods.fml.common.network.NetworkRegistry;
|
||||||
|
import cpw.mods.fml.common.registry.GameRegistry;
|
||||||
|
import moze_intel.projecte.gameObjs.ObjHandler;
|
||||||
|
|
||||||
|
public class CommonProxy {
|
||||||
|
|
||||||
|
public static BlockEMCBuilder emcBuilderBlock;
|
||||||
|
|
||||||
|
public void preInit(FMLPreInitializationEvent event) {
|
||||||
|
emcBuilderBlock = new BlockEMCBuilder();
|
||||||
|
GameRegistry.registerBlock(emcBuilderBlock, "emcBuilder");
|
||||||
|
GameRegistry.registerTileEntity(TileEMCBuilder.class, BCxModern.MODID + ":EMCBuilder");
|
||||||
|
}
|
||||||
|
|
||||||
|
public void init(FMLInitializationEvent event) {
|
||||||
|
NetworkRegistry.INSTANCE.registerGuiHandler(BCxModern.instance, new GuiHandler());
|
||||||
|
|
||||||
|
BuilderAPI.schematicRegistry.registerSchematicBlock(emcBuilderBlock, SchematicEMCBuilder.class);
|
||||||
|
|
||||||
|
GameRegistry.addShapelessRecipe(
|
||||||
|
new ItemStack(emcBuilderBlock),
|
||||||
|
BuildCraftBuilders.builderBlock,
|
||||||
|
ObjHandler.transmuteStone);
|
||||||
|
}
|
||||||
|
}
|
||||||
+6
-6
@@ -1,8 +1,8 @@
|
|||||||
package net.kanawo.emcbuilder.block;
|
package net.kanawo.bcxmodern.block;
|
||||||
|
|
||||||
import net.kanawo.emcbuilder.EMCBuilder;
|
import net.kanawo.bcxmodern.BCxModern;
|
||||||
import net.kanawo.emcbuilder.gui.GuiHandler;
|
import net.kanawo.bcxmodern.gui.GuiHandler;
|
||||||
import net.kanawo.emcbuilder.tile.TileEMCBuilder;
|
import net.kanawo.bcxmodern.tile.TileEMCBuilder;
|
||||||
import net.minecraft.client.renderer.texture.IIconRegister;
|
import net.minecraft.client.renderer.texture.IIconRegister;
|
||||||
import net.minecraft.entity.player.EntityPlayer;
|
import net.minecraft.entity.player.EntityPlayer;
|
||||||
import net.minecraft.item.Item;
|
import net.minecraft.item.Item;
|
||||||
@@ -21,7 +21,7 @@ import cpw.mods.fml.relauncher.SideOnly;
|
|||||||
|
|
||||||
public class BlockEMCBuilder extends BlockBuilder {
|
public class BlockEMCBuilder extends BlockBuilder {
|
||||||
|
|
||||||
private static final String TEXTURE_PREFIX = EMCBuilder.MODID + ":emcbuilderBlock";
|
private static final String TEXTURE_PREFIX = BCxModern.MODID + ":emcbuilderBlock";
|
||||||
|
|
||||||
public BlockEMCBuilder() {
|
public BlockEMCBuilder() {
|
||||||
super();
|
super();
|
||||||
@@ -68,7 +68,7 @@ public class BlockEMCBuilder extends BlockBuilder {
|
|||||||
boolean filledTank = builder != null
|
boolean filledTank = builder != null
|
||||||
&& TankUtils.handleRightClick(builder, ForgeDirection.UNKNOWN, player, true, false);
|
&& TankUtils.handleRightClick(builder, ForgeDirection.UNKNOWN, player, true, false);
|
||||||
if (!filledTank && !world.isRemote) {
|
if (!filledTank && !world.isRemote) {
|
||||||
player.openGui(EMCBuilder.instance, GuiHandler.EMC_BUILDER, world, x, y, z);
|
player.openGui(BCxModern.instance, GuiHandler.EMC_BUILDER, world, x, y, z);
|
||||||
}
|
}
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
+2
-2
@@ -1,6 +1,6 @@
|
|||||||
package net.kanawo.emcbuilder.block;
|
package net.kanawo.bcxmodern.block;
|
||||||
|
|
||||||
import net.kanawo.emcbuilder.tile.TileEMCBuilder;
|
import net.kanawo.bcxmodern.tile.TileEMCBuilder;
|
||||||
|
|
||||||
import buildcraft.builders.schematics.SchematicBuilderLike;
|
import buildcraft.builders.schematics.SchematicBuilderLike;
|
||||||
|
|
||||||
+2
-2
@@ -1,6 +1,6 @@
|
|||||||
package net.kanawo.emcbuilder.gui;
|
package net.kanawo.bcxmodern.gui;
|
||||||
|
|
||||||
import net.kanawo.emcbuilder.tile.TileEMCBuilder;
|
import net.kanawo.bcxmodern.tile.TileEMCBuilder;
|
||||||
import net.minecraft.entity.player.EntityPlayer;
|
import net.minecraft.entity.player.EntityPlayer;
|
||||||
import net.minecraft.entity.player.InventoryPlayer;
|
import net.minecraft.entity.player.InventoryPlayer;
|
||||||
import net.minecraft.inventory.IInventory;
|
import net.minecraft.inventory.IInventory;
|
||||||
+5
-5
@@ -1,10 +1,10 @@
|
|||||||
package net.kanawo.emcbuilder.gui;
|
package net.kanawo.bcxmodern.gui;
|
||||||
|
|
||||||
import java.util.ArrayList;
|
import java.util.ArrayList;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|
||||||
import net.kanawo.emcbuilder.EMCBuilder;
|
import net.kanawo.bcxmodern.BCxModern;
|
||||||
import net.kanawo.emcbuilder.tile.TileEMCBuilder;
|
import net.kanawo.bcxmodern.tile.TileEMCBuilder;
|
||||||
import net.minecraft.client.Minecraft;
|
import net.minecraft.client.Minecraft;
|
||||||
import net.minecraft.client.gui.GuiButton;
|
import net.minecraft.client.gui.GuiButton;
|
||||||
import net.minecraft.inventory.IInventory;
|
import net.minecraft.inventory.IInventory;
|
||||||
@@ -34,7 +34,7 @@ public class GuiEMCBuilder extends GuiAdvancedInterface {
|
|||||||
|
|
||||||
/** BuildCraft's builder.png with the EMC consume slot added. */
|
/** BuildCraft's builder.png with the EMC consume slot added. */
|
||||||
private static final ResourceLocation REGULAR_TEXTURE = new ResourceLocation(
|
private static final ResourceLocation REGULAR_TEXTURE = new ResourceLocation(
|
||||||
EMCBuilder.MODID,
|
BCxModern.MODID,
|
||||||
"textures/gui/emcbuilder.png");
|
"textures/gui/emcbuilder.png");
|
||||||
private static final ResourceLocation BLUEPRINT_TEXTURE = new ResourceLocation(
|
private static final ResourceLocation BLUEPRINT_TEXTURE = new ResourceLocation(
|
||||||
"buildcraftbuilders:textures/gui/builder_blueprint.png");
|
"buildcraftbuilders:textures/gui/builder_blueprint.png");
|
||||||
@@ -69,7 +69,7 @@ public class GuiEMCBuilder extends GuiAdvancedInterface {
|
|||||||
|
|
||||||
drawCenteredString(
|
drawCenteredString(
|
||||||
StatCollector.translateToLocalFormatted(
|
StatCollector.translateToLocalFormatted(
|
||||||
"gui.emcbuilder.stored",
|
"gui.bcxmodern.stored",
|
||||||
Constants.EMC_FORMATTER.format(builder.getStoredEmc())),
|
Constants.EMC_FORMATTER.format(builder.getStoredEmc())),
|
||||||
178 / 2,
|
178 / 2,
|
||||||
51,
|
51,
|
||||||
+2
-2
@@ -1,6 +1,6 @@
|
|||||||
package net.kanawo.emcbuilder.gui;
|
package net.kanawo.bcxmodern.gui;
|
||||||
|
|
||||||
import net.kanawo.emcbuilder.tile.TileEMCBuilder;
|
import net.kanawo.bcxmodern.tile.TileEMCBuilder;
|
||||||
import net.minecraft.entity.player.EntityPlayer;
|
import net.minecraft.entity.player.EntityPlayer;
|
||||||
import net.minecraft.tileentity.TileEntity;
|
import net.minecraft.tileentity.TileEntity;
|
||||||
import net.minecraft.world.World;
|
import net.minecraft.world.World;
|
||||||
+2
-2
@@ -1,6 +1,6 @@
|
|||||||
package net.kanawo.emcbuilder.gui;
|
package net.kanawo.bcxmodern.gui;
|
||||||
|
|
||||||
import net.kanawo.emcbuilder.tile.TileEMCBuilder;
|
import net.kanawo.bcxmodern.tile.TileEMCBuilder;
|
||||||
import net.minecraft.inventory.InventoryBasic;
|
import net.minecraft.inventory.InventoryBasic;
|
||||||
import net.minecraft.inventory.Slot;
|
import net.minecraft.inventory.Slot;
|
||||||
import net.minecraft.item.ItemStack;
|
import net.minecraft.item.ItemStack;
|
||||||
+3
-3
@@ -1,4 +1,4 @@
|
|||||||
package net.kanawo.emcbuilder.tile;
|
package net.kanawo.bcxmodern.tile;
|
||||||
|
|
||||||
import java.util.HashMap;
|
import java.util.HashMap;
|
||||||
import java.util.Map;
|
import java.util.Map;
|
||||||
@@ -12,13 +12,13 @@ import net.minecraft.world.storage.MapStorage;
|
|||||||
import net.minecraftforge.common.util.Constants;
|
import net.minecraftforge.common.util.Constants;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* EMC stored for EMC Builders, one balance per player, saved with the world (data/emcbuilder_emc.dat). All
|
* EMC stored for EMC Builders, one balance per player, saved with the world (data/bcxmodern_emc.dat). All
|
||||||
* dimensions of a world share the same storage, so every EMC Builder a player owns in the world draws from the same
|
* dimensions of a world share the same storage, so every EMC Builder a player owns in the world draws from the same
|
||||||
* balance. Server side only.
|
* balance. Server side only.
|
||||||
*/
|
*/
|
||||||
public class EmcPool extends WorldSavedData {
|
public class EmcPool extends WorldSavedData {
|
||||||
|
|
||||||
private static final String NAME = "emcbuilder_emc";
|
private static final String NAME = "bcxmodern_emc";
|
||||||
private static final double MAX_EMC = moze_intel.projecte.utils.Constants.TILE_MAX_EMC;
|
private static final double MAX_EMC = moze_intel.projecte.utils.Constants.TILE_MAX_EMC;
|
||||||
|
|
||||||
private final Map<UUID, Double> balances = new HashMap<>();
|
private final Map<UUID, Double> balances = new HashMap<>();
|
||||||
+1
-1
@@ -1,4 +1,4 @@
|
|||||||
package net.kanawo.emcbuilder.tile;
|
package net.kanawo.bcxmodern.tile;
|
||||||
|
|
||||||
import java.util.ArrayList;
|
import java.util.ArrayList;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
@@ -1,53 +0,0 @@
|
|||||||
package net.kanawo.emcbuilder;
|
|
||||||
|
|
||||||
import net.kanawo.emcbuilder.block.BlockEMCBuilder;
|
|
||||||
import net.kanawo.emcbuilder.block.SchematicEMCBuilder;
|
|
||||||
import net.kanawo.emcbuilder.gui.GuiHandler;
|
|
||||||
import net.kanawo.emcbuilder.tile.TileEMCBuilder;
|
|
||||||
import net.minecraft.item.ItemStack;
|
|
||||||
|
|
||||||
import buildcraft.BuildCraftBuilders;
|
|
||||||
import buildcraft.api.blueprints.BuilderAPI;
|
|
||||||
import cpw.mods.fml.common.event.FMLInitializationEvent;
|
|
||||||
import cpw.mods.fml.common.event.FMLPostInitializationEvent;
|
|
||||||
import cpw.mods.fml.common.event.FMLPreInitializationEvent;
|
|
||||||
import cpw.mods.fml.common.event.FMLServerStartingEvent;
|
|
||||||
import cpw.mods.fml.common.network.NetworkRegistry;
|
|
||||||
import cpw.mods.fml.common.registry.GameRegistry;
|
|
||||||
import moze_intel.projecte.gameObjs.ObjHandler;
|
|
||||||
|
|
||||||
public class CommonProxy {
|
|
||||||
|
|
||||||
public static BlockEMCBuilder emcBuilderBlock;
|
|
||||||
|
|
||||||
// preInit "Run before anything else. Read your config, create blocks, items, etc, and register them with the
|
|
||||||
// GameRegistry." (Remove if not needed)
|
|
||||||
public void preInit(FMLPreInitializationEvent event) {
|
|
||||||
Config.synchronizeConfiguration(event.getSuggestedConfigurationFile());
|
|
||||||
|
|
||||||
EMCBuilder.LOG.info(Config.greeting);
|
|
||||||
EMCBuilder.LOG.info("I am EMCBuilder at version " + Tags.VERSION);
|
|
||||||
|
|
||||||
emcBuilderBlock = new BlockEMCBuilder();
|
|
||||||
GameRegistry.registerBlock(emcBuilderBlock, "emcBuilder");
|
|
||||||
GameRegistry.registerTileEntity(TileEMCBuilder.class, EMCBuilder.MODID + ":EMCBuilder");
|
|
||||||
}
|
|
||||||
|
|
||||||
// load "Do your mod setup. Build whatever data structures you care about. Register recipes." (Remove if not needed)
|
|
||||||
public void init(FMLInitializationEvent event) {
|
|
||||||
NetworkRegistry.INSTANCE.registerGuiHandler(EMCBuilder.instance, new GuiHandler());
|
|
||||||
|
|
||||||
BuilderAPI.schematicRegistry.registerSchematicBlock(emcBuilderBlock, SchematicEMCBuilder.class);
|
|
||||||
|
|
||||||
GameRegistry.addShapelessRecipe(
|
|
||||||
new ItemStack(emcBuilderBlock),
|
|
||||||
BuildCraftBuilders.builderBlock,
|
|
||||||
ObjHandler.transmuteStone);
|
|
||||||
}
|
|
||||||
|
|
||||||
// postInit "Handle interaction with other mods, complete your setup based on this." (Remove if not needed)
|
|
||||||
public void postInit(FMLPostInitializationEvent event) {}
|
|
||||||
|
|
||||||
// register server commands in this event handler (Remove if not needed)
|
|
||||||
public void serverStarting(FMLServerStartingEvent event) {}
|
|
||||||
}
|
|
||||||
@@ -1,20 +0,0 @@
|
|||||||
package net.kanawo.emcbuilder;
|
|
||||||
|
|
||||||
import java.io.File;
|
|
||||||
|
|
||||||
import net.minecraftforge.common.config.Configuration;
|
|
||||||
|
|
||||||
public class Config {
|
|
||||||
|
|
||||||
public static String greeting = "Hello World";
|
|
||||||
|
|
||||||
public static void synchronizeConfiguration(File configFile) {
|
|
||||||
Configuration configuration = new Configuration(configFile);
|
|
||||||
|
|
||||||
greeting = configuration.getString("greeting", Configuration.CATEGORY_GENERAL, greeting, "How shall I greet?");
|
|
||||||
|
|
||||||
if (configuration.hasChanged()) {
|
|
||||||
configuration.save();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@@ -1,54 +0,0 @@
|
|||||||
package net.kanawo.emcbuilder;
|
|
||||||
|
|
||||||
import org.apache.logging.log4j.LogManager;
|
|
||||||
import org.apache.logging.log4j.Logger;
|
|
||||||
|
|
||||||
import cpw.mods.fml.common.Mod;
|
|
||||||
import cpw.mods.fml.common.SidedProxy;
|
|
||||||
import cpw.mods.fml.common.event.FMLInitializationEvent;
|
|
||||||
import cpw.mods.fml.common.event.FMLPostInitializationEvent;
|
|
||||||
import cpw.mods.fml.common.event.FMLPreInitializationEvent;
|
|
||||||
import cpw.mods.fml.common.event.FMLServerStartingEvent;
|
|
||||||
|
|
||||||
@Mod(
|
|
||||||
modid = EMCBuilder.MODID,
|
|
||||||
version = "1.0.0",
|
|
||||||
name = "EMCBuilder",
|
|
||||||
acceptedMinecraftVersions = "[1.7.10]",
|
|
||||||
dependencies = "required-after:BuildCraft|Builders;required-after:ProjectE")
|
|
||||||
public class EMCBuilder {
|
|
||||||
|
|
||||||
public static final String MODID = "emcbuilder";
|
|
||||||
public static final Logger LOG = LogManager.getLogger(MODID);
|
|
||||||
|
|
||||||
@Mod.Instance(MODID)
|
|
||||||
public static EMCBuilder instance;
|
|
||||||
|
|
||||||
@SidedProxy(clientSide = "net.kanawo.emcbuilder.ClientProxy", serverSide = "net.kanawo.emcbuilder.CommonProxy")
|
|
||||||
public static CommonProxy proxy;
|
|
||||||
|
|
||||||
@Mod.EventHandler
|
|
||||||
// preInit "Run before anything else. Read your config, create blocks, items, etc, and register them with the
|
|
||||||
// GameRegistry." (Remove if not needed)
|
|
||||||
public void preInit(FMLPreInitializationEvent event) {
|
|
||||||
proxy.preInit(event);
|
|
||||||
}
|
|
||||||
|
|
||||||
@Mod.EventHandler
|
|
||||||
// load "Do your mod setup. Build whatever data structures you care about. Register recipes." (Remove if not needed)
|
|
||||||
public void init(FMLInitializationEvent event) {
|
|
||||||
proxy.init(event);
|
|
||||||
}
|
|
||||||
|
|
||||||
@Mod.EventHandler
|
|
||||||
// postInit "Handle interaction with other mods, complete your setup based on this." (Remove if not needed)
|
|
||||||
public void postInit(FMLPostInitializationEvent event) {
|
|
||||||
proxy.postInit(event);
|
|
||||||
}
|
|
||||||
|
|
||||||
@Mod.EventHandler
|
|
||||||
// register server commands in this event handler (Remove if not needed)
|
|
||||||
public void serverStarting(FMLServerStartingEvent event) {
|
|
||||||
proxy.serverStarting(event);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@@ -1,6 +1,6 @@
|
|||||||
MIT License
|
MIT License
|
||||||
|
|
||||||
Copyright (c) [year] [fullname]
|
Copyright (c) 2026 agomizi1cm
|
||||||
|
|
||||||
Permission is hereby granted, free of charge, to any person obtaining a copy
|
Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||||
of this software and associated documentation files (the "Software"), to deal
|
of this software and associated documentation files (the "Software"), to deal
|
||||||
|
|||||||
+1
-1
@@ -1,2 +1,2 @@
|
|||||||
tile.emcBuilder.name=EMC Builder
|
tile.emcBuilder.name=EMC Builder
|
||||||
gui.emcbuilder.stored=EMC: %s
|
gui.bcxmodern.stored=EMC: %s
|
||||||
+1
-1
@@ -1,2 +1,2 @@
|
|||||||
tile.emcBuilder.name=EMCビルダー
|
tile.emcBuilder.name=EMCビルダー
|
||||||
gui.emcbuilder.stored=EMC: %s
|
gui.bcxmodern.stored=EMC: %s
|
||||||
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
@@ -3,18 +3,18 @@
|
|||||||
"modList": [{
|
"modList": [{
|
||||||
"modid": "${modId}",
|
"modid": "${modId}",
|
||||||
"name": "${modName}",
|
"name": "${modName}",
|
||||||
"description": "An example mod for Minecraft 1.7.10 with Forge focused on a stable setup.",
|
"description": "A Minecraft 1.7.10 port of BCx, a BuildCraft x Equivalent Exchange addon from the 1.2.5 era. Adds the EMC Builder, a BuildCraft Builder that pays for its materials with EMC.",
|
||||||
"version": "${modVersion}",
|
"version": "${modVersion}",
|
||||||
"mcversion": "${minecraftVersion}",
|
"mcversion": "${minecraftVersion}",
|
||||||
"url": "https://github.com/SinTh0r4s/MyMod",
|
"url": "",
|
||||||
"updateUrl": "",
|
"updateUrl": "",
|
||||||
"authorList": ["SinTho0r4s"],
|
"authorList": ["agomizi1cm"],
|
||||||
"credits": "",
|
"credits": "Original BCx for Minecraft 1.2.5. Built on BuildCraft and ProjectE.",
|
||||||
"logoFile": "",
|
"logoFile": "",
|
||||||
"screenshots": [],
|
"screenshots": [],
|
||||||
"parent": "",
|
"parent": "",
|
||||||
"requiredMods": [],
|
"requiredMods": ["BuildCraft|Builders", "ProjectE"],
|
||||||
"dependencies": [],
|
"dependencies": ["BuildCraft|Builders", "ProjectE"],
|
||||||
"dependants": [],
|
"dependants": [],
|
||||||
"useDependencyInformation": false
|
"useDependencyInformation": false
|
||||||
}]
|
}]
|
||||||
|
|||||||
Reference in new issue
Block a user