Jump to content

Bertrahm

Members
  • Posts

    26
  • Joined

  • Last visited

Bertrahm's Achievements

Tree Puncher

Tree Puncher (2/8)

0

Reputation

  1. Thanks for the response, I guess ill have to make a custom dimension then because I dont want to get into bytecode modification.
  2. Hey, Im starting development on a new mod in based arround length of Day and Nighttime, but since Dimensions dont have their own classes anymore im wondering howto modify the Overworld. I would be grateful for any help, if you need anymore info Ill be glad to provide it.
  3. The model just doesn't load, in my block class I have disable rendering for side and set isBlockNormalCube and isOpaqueCube to false. So I just have transparent sides and the id of the block and state text thingy on the top... I'll send some screenshots if needed Btw these are all messages for blocks or items which I havent got textures/models for yet
  4. I've been trying for quite sometime now to add OBJ models into my mod. I'm calling OBJLoader.INSTANCE.addDomain() with my modID in the preInit-EventHandler in my Main class and my clientproxy, like the first comment in this thread said. Here is my Code and heres the blockstate If any other things are needed, I'll add them to this post. (Using forge 1.12.2-14.23.5.2836)
  5. My main class: package com.linesix.akhaten; import com.linesix.akhaten.common.blocks.ores.SmeltingHandler; import com.linesix.akhaten.common.blocks.registries.BuildingBlocks; import com.linesix.akhaten.common.blocks.registries.DimBlocks; import com.linesix.akhaten.common.blocks.registries.MachineBlocks; import com.linesix.akhaten.common.blocks.registries.Ores; import com.linesix.akhaten.common.items.registries.Materials; import com.linesix.akhaten.server.commands.Commands; import com.linesix.akhaten.common.dimensions.Dimensions; import com.linesix.akhaten.common.items.registries.Gadgets; import com.linesix.akhaten.proxy.CommonProxy; import com.linesix.akhaten.common.sound.SoundRegistry; import com.linesix.akhaten.common.worldgen.OreGen; import com.linesix.akhaten.common.Reference; import net.minecraftforge.client.model.obj.OBJLoader; import net.minecraftforge.fml.common.Mod; import net.minecraftforge.fml.common.SidedProxy; import net.minecraftforge.fml.common.event.FMLInitializationEvent; import net.minecraftforge.fml.common.event.FMLPostInitializationEvent; import net.minecraftforge.fml.common.event.FMLPreInitializationEvent; import net.minecraftforge.fml.common.event.FMLServerStartingEvent; import net.minecraftforge.fml.common.registry.GameRegistry; import java.util.Random; @Mod(modid = Reference.MODID, name = Reference.NAME, version = Reference.VERSION) public class Akhaten { /* * Akhaten Public Beta (Version 0.5.2) * Copyright (C) 2019 Linesix Studios, Licensed under the ISC license * * Author: Felix Eckert (TheBertrahmPlays / Angry German) * */ public static Random random = new Random(); @Mod.Instance(Reference.MODID) public static Akhaten instance; // Create an instance of the main class @SidedProxy(clientSide = "com.linesix.akhaten.proxy.ClientProxy", serverSide = "com.linesix.akahten.proxy.CommonProxy") public static CommonProxy proxy; // Create a CommonProxy @Mod.EventHandler public void preInit(FMLPreInitializationEvent event) { Reference.logger.info("Entering PreInit phase..."); //OBJLoader.INSTANCE.addDomain(Reference.MODID); // Register Items Blocks and Sounds Below SoundRegistry.init(); DimBlocks.init(); MachineBlocks.init(); BuildingBlocks.init(); Gadgets.init(); Materials.init(); Ores.init(); SmeltingHandler.registerSmeltingRecipes(); } @Mod.EventHandler public void init(FMLInitializationEvent event) { Reference.logger.info("Entering Init phase..."); // Register Dimensions below Dimensions.registerDimensions(); GameRegistry.registerWorldGenerator(new OreGen(), 0); } @Mod.EventHandler public void serverStarting(FMLServerStartingEvent event) { // This method just exists for registering commands // Register Commands Below Commands.register(event); } @Mod.EventHandler public void postInit(FMLPostInitializationEvent event) { Reference.logger.info("Entering PostInit phase..."); } }
  6. I'm calling the registration method after the creation of my items and blocks, but regardless, which would be the propper method?
  7. I'm trying to add a smelting recipe for Rutile Ore of my mod, but I've ran into a problem: GameRegistry.addSmelting(input, output, xp) doesn't work with blocks, even though a method with a block input exists... Items/ItemStacks work perfectly, but it wont smelt or even shift-click into the furnace If I use a block as the input. Here's my registration code: package com.linesix.akhaten.common.blocks.ores; import com.linesix.akhaten.common.blocks.registries.Ores; import com.linesix.akhaten.common.items.registries.Materials; import net.minecraft.item.Item; import net.minecraft.item.ItemStack; import net.minecraft.item.crafting.FurnaceRecipes; import net.minecraftforge.fml.common.registry.GameRegistry; public class SmeltingHandler { public static void registerSmeltingRecipes() { GameRegistry.addSmelting(Materials.silicate_clump, new ItemStack(Materials.silicate_ingot), 2); GameRegistry.addSmelting(Ores.rutile_ore, new ItemStack(Materials.raw_titanium), 3); // This smelting recipe doesn't work (Rutile Ore Block) GameRegistry.addSmelting(Materials.raw_titanium, new ItemStack(Materials.titanium_ingot), 3); } } EDIT: The method "registerSmeltingRecipes" is called in the preInit methods (FMLPreInitializationEvent)
  8. Thanks for your help, it works now!. Regarding the Tardfiles, they hold information about Tardis interior locations, but also are configuration files. But I'm currently planning on moving to a different soloution, since the current one is a bit, well... shitty
  9. Ok, currently I'm trying to use setBlockState(), I'm calling it from an onItemUse method and here is the code: @Override public ActionResult<ItemStack> onItemRightClick(World world, EntityPlayer player, EnumHand hand) { if (!world.isRemote) { try { JsonObject tardfile = Tardfile.findparseTardfileByName(player.getName()); } catch (IOException e) { e.printStackTrace(); } Vec3d lookingAt = player.getLookVec(); int x = (int) lookingAt.x; int y = (int) lookingAt.y; int z = (int) lookingAt.z; BlockPos pos = new BlockPos(x, y, z); pos.up(); world.setBlockState(pos, MachineBlocks.machine_tardis.getDefaultState(), 3); System.out.println("Test"); return new ActionResult<>(EnumActionResult.SUCCESS, player.getHeldItem(hand)); } return new ActionResult<>(EnumActionResult.PASS, player.getHeldItem(hand)); }
  10. Ok, this task, which should be quiet easy, has been giving quite a bit of trouble. For the past 2 Days I was trying to place a block using code and tried using worldIn.mayPlace(); and worldIn.setBlockState(); but I don't seem to get them to work, which one is the right method, or is there another one? I don't get errors or anything and for setBlockState(), the flags don't do anything...
×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.