Jump to content

Bertrahm

Members
  • Posts

    26
  • Joined

  • Last visited

Everything posted by Bertrahm

  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...
  11. That's all I got for the block, below it I get an error for a different block (That I haven't made the model for yet)
  12. Thanks, but it didn't help... I think I should make myself more clear: For the default state I get an Inventory model with textures but no textures when I place it, for my second state (high_res) I don't get a model in the inventory nor textures when I place it. I will show you the relevant part of the log (regarding the model registry). I've also fixed errors with my blockstate JSON, which also didn't fix anything (visible)...
  13. Ok, got another problem: My second blockstate is called high_res but in the blockstate JSON I don't get a inventory model nor the textures ( inventory and placed). Here's my JSON and the Blocktype class:
  14. Thanks for your answer! So now I just have to create the blockstate JSON and the registration stays the same (I wasn't sure because I followed an outdated tutorial).
  15. Hey, I'm currently planning on adding blockstates to my mod, but I couldn't figure out how. I've tried following a tutorial for 1.11.2 but I got stuck at the point of registering them. Heres the code for the block I wrote and my registry code. Block Registry If there is a newer / better way todo this, I'd be happy to use it
  16. Sorry for the late reply, but heres the line in the VortexManipulatorClass player.changeDimension(Dimensions.ID_TARDIS);
  17. Hello, so after my last post I succesfully created a void dimension, only problem is that if I try to teleport to it (Using an item that has an onItemRightClick event that executes player.ChangeDimension(2)) the game freezes in the loading screen and gives me an NullPointerException. However if I were to restart the game I'd appear in the dimension totally fine! Here is the error: com.mojang.authlib.exceptions.AuthenticationException: The client has sent too many requests within a certain amount of time at com.mojang.authlib.yggdrasil.YggdrasilAuthenticationService.makeRequest(YggdrasilAuthenticationService.java:79) ~[YggdrasilAuthenticationService.class:?] at com.mojang.authlib.yggdrasil.YggdrasilMinecraftSessionService.fillGameProfile(YggdrasilMinecraftSessionService.java:180) [YggdrasilMinecraftSessionService.class:?] at com.mojang.authlib.yggdrasil.YggdrasilMinecraftSessionService$1.load(YggdrasilMinecraftSessionService.java:60) [YggdrasilMinecraftSessionService$1.class:?] at com.mojang.authlib.yggdrasil.YggdrasilMinecraftSessionService$1.load(YggdrasilMinecraftSessionService.java:57) [YggdrasilMinecraftSessionService$1.class:?] at com.google.common.cache.LocalCache$LoadingValueReference.loadFuture(LocalCache.java:3716) [guava-21.0.jar:?] at com.google.common.cache.LocalCache$Segment.loadSync(LocalCache.java:2424) [guava-21.0.jar:?] at com.google.common.cache.LocalCache$Segment.lockedGetOrLoad(LocalCache.java:2298) [guava-21.0.jar:?] at com.google.common.cache.LocalCache$Segment.get(LocalCache.java:2211) [guava-21.0.jar:?] at com.google.common.cache.LocalCache.get(LocalCache.java:4154) [guava-21.0.jar:?] at com.google.common.cache.LocalCache.getOrLoad(LocalCache.java:4158) [guava-21.0.jar:?] at com.google.common.cache.LocalCache$LocalLoadingCache.get(LocalCache.java:5147) [guava-21.0.jar:?] at com.google.common.cache.LocalCache$LocalLoadingCache.getUnchecked(LocalCache.java:5153) [guava-21.0.jar:?] at com.mojang.authlib.yggdrasil.YggdrasilMinecraftSessionService.fillProfileProperties(YggdrasilMinecraftSessionService.java:170) [YggdrasilMinecraftSessionService.class:?] at net.minecraft.client.Minecraft.getProfileProperties(Minecraft.java:3181) [Minecraft.class:?] at net.minecraft.client.resources.SkinManager$3.run(SkinManager.java:138) [SkinManager$3.class:?] at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511) [?:1.8.0_131] at java.util.concurrent.FutureTask.run(FutureTask.java:266) [?:1.8.0_131] at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142) [?:1.8.0_131] at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617) [?:1.8.0_131] at java.lang.Thread.run(Thread.java:748) [?:1.8.0_131] [20:08:11] [main/INFO] [STDOUT]: [com.linesix.akhaten.items.gadgets.VortexManipulator:onItemRightClick:25]: VortexManipulater used by player EntityPlayerSP['Player320'/161, l='MpServer', x=-268.00, y=57.00, z=278.00] [20:08:12] [Server thread/INFO] [STDOUT]: [com.linesix.akhaten.items.gadgets.VortexManipulator:onItemRightClick:25]: VortexManipulater used by player EntityPlayerMP['Player320'/161, l='Test', x=-268.00, y=57.00, z=278.00] [20:08:13] [Server thread/FATAL] [minecraft/MinecraftServer]: Error executing task java.util.concurrent.ExecutionException: java.lang.NullPointerException at java.util.concurrent.FutureTask.report(FutureTask.java:122) ~[?:1.8.0_131] at java.util.concurrent.FutureTask.get(FutureTask.java:192) ~[?:1.8.0_131] at net.minecraft.util.Util.runTask(Util.java:54) [Util.class:?] at net.minecraft.server.MinecraftServer.updateTimeLightAndEntities(MinecraftServer.java:798) [MinecraftServer.class:?] at net.minecraft.server.MinecraftServer.tick(MinecraftServer.java:743) [MinecraftServer.class:?] at net.minecraft.server.integrated.IntegratedServer.tick(IntegratedServer.java:192) [IntegratedServer.class:?] at net.minecraft.server.MinecraftServer.run(MinecraftServer.java:592) [MinecraftServer.class:?] at java.lang.Thread.run(Thread.java:748) [?:1.8.0_131] Caused by: java.lang.NullPointerException at net.minecraft.world.Teleporter.placeInExistingPortal(Teleporter.java:136) ~[Teleporter.class:?] at net.minecraft.world.Teleporter.placeInPortal(Teleporter.java:36) ~[Teleporter.class:?] at net.minecraft.world.Teleporter.placeEntity(Teleporter.java:443) ~[Teleporter.class:?] at net.minecraft.server.management.PlayerList.transferEntityToWorld(PlayerList.java:762) ~[PlayerList.class:?] at net.minecraft.server.management.PlayerList.transferPlayerToDimension(PlayerList.java:662) ~[PlayerList.class:?] at net.minecraft.entity.player.EntityPlayerMP.changeDimension(EntityPlayerMP.java:745) ~[EntityPlayerMP.class:?] at net.minecraft.entity.Entity.changeDimension(Entity.java:2911) ~[Entity.class:?] at com.linesix.akhaten.items.gadgets.VortexManipulator.onItemRightClick(VortexManipulator.java:30) ~[VortexManipulator.class:?] at net.minecraft.item.ItemStack.useItemRightClick(ItemStack.java:234) ~[ItemStack.class:?] at net.minecraft.server.management.PlayerInteractionManager.processRightClick(PlayerInteractionManager.java:384) ~[PlayerInteractionManager.class:?] at net.minecraft.network.NetHandlerPlayServer.processTryUseItem(NetHandlerPlayServer.java:796) ~[NetHandlerPlayServer.class:?] at net.minecraft.network.play.client.CPacketPlayerTryUseItem.processPacket(CPacketPlayerTryUseItem.java:43) ~[CPacketPlayerTryUseItem.class:?] at net.minecraft.network.play.client.CPacketPlayerTryUseItem.processPacket(CPacketPlayerTryUseItem.java:9) ~[CPacketPlayerTryUseItem.class:?] at net.minecraft.network.PacketThreadUtil$1.run(PacketThreadUtil.java:21) ~[PacketThreadUtil$1.class:?] at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511) ~[?:1.8.0_131] at java.util.concurrent.FutureTask.run(FutureTask.java:266) ~[?:1.8.0_131] at net.minecraft.util.Util.runTask(Util.java:53) ~[Util.class:?] ... 5 more And my registry code package com.linesix.akhaten.dimensions; import com.linesix.akhaten.Reference; import com.linesix.akhaten.dimensions.worldproviders.WorldProviderTardis; import com.linesix.akhaten.dimensions.worldtypes.WorldTypeTardis; import net.minecraft.world.DimensionType; import net.minecraft.world.WorldType; import net.minecraft.world.biome.Biome; import net.minecraft.world.gen.ChunkGeneratorEnd; import net.minecraft.world.gen.ChunkGeneratorHell; import net.minecraftforge.common.DimensionManager; import net.minecraftforge.event.RegistryEvent; import net.minecraftforge.fml.common.Mod; import net.minecraftforge.fml.common.eventhandler.SubscribeEvent; import java.util.ArrayList; import java.util.List; @Mod.EventBusSubscriber(modid = Reference.MODID) public class Dimensions { public static int ID_TARDIS = 2; public static final String TARDIS_NAME = "tardis"; public static DimensionType TARDIS_DIM = DimensionType.register(TARDIS_NAME, "_"+TARDIS_NAME, ID_TARDIS, WorldProviderTardis.class, true); public static WorldType WT_TARDIS = new WorldTypeTardis(); private static List<Biome> BIOMES = new ArrayList<>(); public static final void registerDimensions() { DimensionManager.registerDimension(ID_TARDIS, TARDIS_DIM); } }
  18. Well not exactly but thanks for the tip!
  19. Hello, so recently I wanted to add a new Dimension to my mod that would be a void with a predefined structure placed at the entry point to the dimension. But I couldn't find anything that was really usefull. I'd really appreciate some help or links to threads that already covered it!
  20. I really don'T know what I did but now It works fine...
×
×
  • Create New...

Important Information

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