Jump to content

kriNon

Members
  • Posts

    24
  • Joined

  • Last visited

Everything posted by kriNon

  1. As in subscribe to the event and then cancel the event, preventing section of galacticraft code from running?
  2. So in space (dimension 3) when the player is in Freefall (floating not near any blocks) then the player is unable to move using A or D (only able to move forwards or backwards), as well as speed and acceleration works differently. I might need to make my mod depend on Galacticraft, and then modify movement too based on which state the player is in. Their movement mechanics are a little complicated in space, but they can be seen here: https://github.com/micdoodle8/Galacticraft/blob/master/src/main/java/micdoodle8/mods/galacticraft/core/entities/player/FreefallHandler.java
  3. Okay, so I tested it and it works perfectly! Thanks! Sadly, I've now realized that despite the mod working correctly, it doesn't do what I needed it to. I'll go into a bit more detail, but it looks like i'm going to have to try a different method. So, the purpose of my mod was to give the player creative flight in that specific dimension (dimension 3) because the mod that creates the dimension (galacticraft) has different movement mechanics in creative mode to survival mode in that dimension. I had assumed that the different mechanics were caused by a isFlying check, however it turns out that it is actually an isCreative check. Is there any good way of editing a class in another mod, without compiling a custom version of that mod? Kind of like patching the class upon runtime? Thanks a lot for your help!
  4. What I meant was, if we ignore the if statement for dimension. Just to simplify the code (incremental testing), flight does occur in the first one, but not the second. Neither does anything with the if statement for the dimension.
  5. So just for simplicity, ignoring the second if statement. This works: if (event.player instanceof EntityPlayer) { if (!event.player.getEntityWorld().isRemote) { return; } event.player.capabilities.isFlying = true; } But this does nothing: if (event.player instanceof EntityPlayer) { if (event.player.getEntityWorld().isRemote) { return; } event.player.capabilities.isFlying = true; } No crash. The crash did occur with other mods, but I rechecked it and it is no longer an issue (no idea why, maybe I changed the code somewhere and forgot), but the crash is no longer happening under any circumstance.
  6. Yeah doing that does nothing, I suspect that event.player.capabilities.isFlying = true; needs to be done on the client, not the server.
  7. Alright, so after compiling the code again it no longer causes crashes however the crash I was getting was this: https://pastebin.com/yNgNKfdU I'm not quite sure what I did to fix the crashes, but nonetheless the code works fine without the if(event.player.dimension == 3){} (albeit flight occurs in all dimensions) However with the if statement flight will never occur (not even in dimension 3)
  8. Hey all, So I'm working on what is pretty much my first mod, and I am aiming for some very simple functionality. What I want to do is make it so that if the player is in dimension 3 the mod will set event.player.capabilities.isFlying = true. Here's the code for the class that I'm working on: package kriNon.mods.ModpackMod; import net.minecraft.entity.player.EntityPlayer; import net.minecraft.entity.player.EntityPlayerMP; import net.minecraft.util.ITickable; import net.minecraftforge.fml.common.eventhandler.SubscribeEvent; import net.minecraftforge.fml.common.gameevent.TickEvent; public class DimensionFlight { @SubscribeEvent public void onPlayerTickEvent(TickEvent.PlayerTickEvent event) { if (event.player instanceof EntityPlayer) { if (!event.player.getEntityWorld().isRemote) { return; } if(event.player.dimension == 3){ event.player.capabilities.isFlying = true; } } } } Now the issue I'm having is that the third if statement (the one that checks if the player dimension == 3) will crash the game. I believe I may be going wrong because the client side does not know what dimension it is in (i believe this might be handled only on the server side). How would I best be able to combat this problem? A simple solution would be ideal so that I may better understand it! Thanks!
  9. So I did some more testing, and it seems that the errors are caused when calling the function updateAddresses(). Any idea what could be wrong with it? I've tried making a simplified version of the class so that I can test basic functionality. So I have a "private RegistryInformation r" Where the class RegistryInformation is defined as: class RegistryInformation { HashSet<Integer> addresses; int maxAddress; public void init() { addresses = new HashSet<Integer>(); maxAddress = 0; } public void updateAddresses() { if(addresses.contains(maxAddress)) { // New address added, look up while(addresses.contains(maxAddress)) maxAddress++; } else { // Old address removed, look down while(!addresses.contains(maxAddress)) maxAddress--; maxAddress++; } } } And upon calling r.updateAddresses() it will cause errors. The class in it's entirety is here: package kriNon.endernet.lib; import java.io.File; import java.io.FileNotFoundException; import java.io.FileReader; import java.io.FileWriter; import java.util.HashMap; import java.util.HashSet; import kriNon.endernet.Endernet; public class EnderRegistry { class RegistryInformation { HashSet<Integer> addresses; int maxAddress; public void init() { addresses = new HashSet<Integer>(); maxAddress = 0; } public void updateAddresses() { if(addresses.contains(maxAddress)) { // New address added, look up while(addresses.contains(maxAddress)) maxAddress++; } else { // Old address removed, look down while(!addresses.contains(maxAddress)) maxAddress--; maxAddress++; } } } public static EnderRegistry instance; private RegistryInformation r; private final HashMap<Integer, Object> objects = new HashMap<Integer, Object>(); private final File file; public EnderRegistry(File file) { this.file = file; try { r = (RegistryInformation)(Endernet.gson.fromJson(new FileReader(file), RegistryInformation.class)); } catch(FileNotFoundException e) { r = new RegistryInformation(); r.init(); } } public int register(Object o) { r.updateAddresses(); int address = r.maxAddress; r.addresses.add(address); objects.put(address, o); r.updateAddresses(); return address; } }
  10. Yeah, I had posted it earlier but here it is: https://github.com/kriNon/Endernet1.10.2/tree/Testing_EnderRegistry Thanks!
  11. Alright, so after some further testing I've removed the section of code which was checking if the TileEntityEnderTransmitter has a ea value, and if not was registering one. This is because inside the readFromNBT part of the tile entity, it would register the tileentity with a ea value. This has fixed the crashing upon breaking or placing the Ender Transmitter blocks. However, upon placing the blocks, they still do not receive an ea value, and upon loading the world, and breaking the blocks I get errors: [15:34:17] [server thread/ERROR]: Failed to load data for block entity ender_transmitter java.lang.NullPointerException at kriNon.endernet.lib.EnderRegistry.set(EnderRegistry.java:73) ~[EnderRegistry.class:?] at kriNon.endernet.tileentities.TileEntityEnderTransmitter.readFromNBT(TileEntityEnderTransmitter.java:245) ~[TileEntityEnderTransmitter.class:?] at net.minecraft.tileentity.TileEntity.create(TileEntity.java:137) [TileEntity.class:?] at net.minecraft.world.chunk.storage.AnvilChunkLoader.loadEntities(AnvilChunkLoader.java:515) [AnvilChunkLoader.class:?] at net.minecraftforge.common.chunkio.ChunkIOProvider.syncCallback(ChunkIOProvider.java:96) [ChunkIOProvider.class:?] at net.minecraftforge.common.chunkio.ChunkIOExecutor.syncChunkLoad(ChunkIOExecutor.java:94) [ChunkIOExecutor.class:?] at net.minecraft.world.gen.ChunkProviderServer.loadChunk(ChunkProviderServer.java:121) [ChunkProviderServer.class:?] at net.minecraft.world.gen.ChunkProviderServer.loadChunk(ChunkProviderServer.java:92) [ChunkProviderServer.class:?] at net.minecraft.world.gen.ChunkProviderServer.provideChunk(ChunkProviderServer.java:138) [ChunkProviderServer.class:?] at net.minecraft.server.MinecraftServer.initialWorldChunkLoad(MinecraftServer.java:336) [MinecraftServer.class:?] at net.minecraft.server.integrated.IntegratedServer.loadAllWorlds(IntegratedServer.java:107) [integratedServer.class:?] at net.minecraft.server.integrated.IntegratedServer.startServer(IntegratedServer.java:124) [integratedServer.class:?] at net.minecraft.server.MinecraftServer.run(MinecraftServer.java:496) [MinecraftServer.class:?] at java.lang.Thread.run(Unknown Source) [?:1.8.0_91] [15:34:17] [server thread/ERROR] [FML]: A TileEntity ender_transmitter(kriNon.endernet.tileentities.TileEntityEnderTransmitter) has thrown an exception during loading, its state cannot be restored. Report this to the mod author java.lang.NullPointerException at kriNon.endernet.lib.EnderRegistry.set(EnderRegistry.java:73) ~[EnderRegistry.class:?] at kriNon.endernet.tileentities.TileEntityEnderTransmitter.readFromNBT(TileEntityEnderTransmitter.java:245) ~[TileEntityEnderTransmitter.class:?] at net.minecraft.tileentity.TileEntity.create(TileEntity.java:137) [TileEntity.class:?] at net.minecraft.world.chunk.storage.AnvilChunkLoader.loadEntities(AnvilChunkLoader.java:515) [AnvilChunkLoader.class:?] at net.minecraftforge.common.chunkio.ChunkIOProvider.syncCallback(ChunkIOProvider.java:96) [ChunkIOProvider.class:?] at net.minecraftforge.common.chunkio.ChunkIOExecutor.syncChunkLoad(ChunkIOExecutor.java:94) [ChunkIOExecutor.class:?] at net.minecraft.world.gen.ChunkProviderServer.loadChunk(ChunkProviderServer.java:121) [ChunkProviderServer.class:?] at net.minecraft.world.gen.ChunkProviderServer.loadChunk(ChunkProviderServer.java:92) [ChunkProviderServer.class:?] at net.minecraft.world.gen.ChunkProviderServer.provideChunk(ChunkProviderServer.java:138) [ChunkProviderServer.class:?] at net.minecraft.server.MinecraftServer.initialWorldChunkLoad(MinecraftServer.java:336) [MinecraftServer.class:?] at net.minecraft.server.integrated.IntegratedServer.loadAllWorlds(IntegratedServer.java:107) [integratedServer.class:?] at net.minecraft.server.integrated.IntegratedServer.startServer(IntegratedServer.java:124) [integratedServer.class:?] at net.minecraft.server.MinecraftServer.run(MinecraftServer.java:496) [MinecraftServer.class:?] at java.lang.Thread.run(Unknown Source) [?:1.8.0_91] [15:34:51] [server thread/FATAL]: Error executing task java.util.concurrent.ExecutionException: java.lang.NullPointerException at java.util.concurrent.FutureTask.report(Unknown Source) ~[?:1.8.0_91] at java.util.concurrent.FutureTask.get(Unknown Source) ~[?:1.8.0_91] at net.minecraft.util.Util.runTask(Util.java:26) [util.class:?] at net.minecraft.server.MinecraftServer.updateTimeLightAndEntities(MinecraftServer.java:742) [MinecraftServer.class:?] at net.minecraft.server.MinecraftServer.tick(MinecraftServer.java:687) [MinecraftServer.class:?] at net.minecraft.server.integrated.IntegratedServer.tick(IntegratedServer.java:156) [integratedServer.class:?] at net.minecraft.server.MinecraftServer.run(MinecraftServer.java:536) [MinecraftServer.class:?] at java.lang.Thread.run(Unknown Source) [?:1.8.0_91] Caused by: java.lang.NullPointerException at kriNon.endernet.lib.EnderRegistry.unregister(EnderRegistry.java:62) ~[EnderRegistry.class:?] at kriNon.endernet.blocks.BlockEnderTransmitter.breakBlock(BlockEnderTransmitter.java:70) ~[blockEnderTransmitter.class:?] at net.minecraft.world.chunk.Chunk.setBlockState(Chunk.java:610) ~[Chunk.class:?] at net.minecraft.world.World.setBlockState(World.java:384) ~[World.class:?] at net.minecraft.block.Block.removedByPlayer(Block.java:1324) ~[block.class:?] at net.minecraft.server.management.PlayerInteractionManager.removeBlock(PlayerInteractionManager.java:298) ~[PlayerInteractionManager.class:?] at net.minecraft.server.management.PlayerInteractionManager.removeBlock(PlayerInteractionManager.java:292) ~[PlayerInteractionManager.class:?] at net.minecraft.server.management.PlayerInteractionManager.tryHarvestBlock(PlayerInteractionManager.java:339) ~[PlayerInteractionManager.class:?] at net.minecraft.server.management.PlayerInteractionManager.onBlockClicked(PlayerInteractionManager.java:175) ~[PlayerInteractionManager.class:?] at net.minecraft.network.NetHandlerPlayServer.processPlayerDigging(NetHandlerPlayServer.java:658) ~[NetHandlerPlayServer.class:?] at net.minecraft.network.play.client.CPacketPlayerDigging.processPacket(CPacketPlayerDigging.java:56) ~[CPacketPlayerDigging.class:?] at net.minecraft.network.play.client.CPacketPlayerDigging.processPacket(CPacketPlayerDigging.java:12) ~[CPacketPlayerDigging.class:?] at net.minecraft.network.PacketThreadUtil$1.run(PacketThreadUtil.java:15) ~[PacketThreadUtil$1.class:?] at java.util.concurrent.Executors$RunnableAdapter.call(Unknown Source) ~[?:1.8.0_91] at java.util.concurrent.FutureTask.run(Unknown Source) ~[?:1.8.0_91] at net.minecraft.util.Util.runTask(Util.java:25) ~[util.class:?] ... 5 more
  12. So after some further testing I've determined that both when placing and breaking the block, the error occurs with lines 53 and 64 respectively, both of which are calling the function updateAddresses() in the nested class RegistryInformation. public void updateAddresses() { if(addresses.contains(maxAddress)) { // New address added, look up while(addresses.contains(maxAddress)) maxAddress++; } else { // Old address removed, look down while(!addresses.contains(maxAddress)) maxAddress--; maxAddress++; } } When loading a world with the blocks already placed I also get this error: [11:53:00] [server thread/ERROR]: Failed to load data for block entity ender_transmitter java.lang.NullPointerException at kriNon.endernet.lib.EnderRegistry.set(EnderRegistry.java:73) ~[EnderRegistry.class:?] at kriNon.endernet.tileentities.TileEntityEnderTransmitter.readFromNBT(TileEntityEnderTransmitter.java:248) ~[TileEntityEnderTransmitter.class:?] at net.minecraft.tileentity.TileEntity.create(TileEntity.java:137) [TileEntity.class:?] at net.minecraft.world.chunk.storage.AnvilChunkLoader.loadEntities(AnvilChunkLoader.java:515) [AnvilChunkLoader.class:?] at net.minecraftforge.common.chunkio.ChunkIOProvider.syncCallback(ChunkIOProvider.java:96) [ChunkIOProvider.class:?] at net.minecraftforge.common.chunkio.ChunkIOExecutor.syncChunkLoad(ChunkIOExecutor.java:94) [ChunkIOExecutor.class:?] at net.minecraft.world.gen.ChunkProviderServer.loadChunk(ChunkProviderServer.java:121) [ChunkProviderServer.class:?] at net.minecraft.world.gen.ChunkProviderServer.loadChunk(ChunkProviderServer.java:92) [ChunkProviderServer.class:?] at net.minecraft.world.gen.ChunkProviderServer.provideChunk(ChunkProviderServer.java:138) [ChunkProviderServer.class:?] at net.minecraft.server.MinecraftServer.initialWorldChunkLoad(MinecraftServer.java:336) [MinecraftServer.class:?] at net.minecraft.server.integrated.IntegratedServer.loadAllWorlds(IntegratedServer.java:107) [integratedServer.class:?] at net.minecraft.server.integrated.IntegratedServer.startServer(IntegratedServer.java:124) [integratedServer.class:?] at net.minecraft.server.MinecraftServer.run(MinecraftServer.java:496) [MinecraftServer.class:?] at java.lang.Thread.run(Unknown Source) [?:1.8.0_91] [11:53:00] [server thread/ERROR] [FML]: A TileEntity ender_transmitter(kriNon.endernet.tileentities.TileEntityEnderTransmitter) has thrown an exception during loading, its state cannot be restored. Report this to the mod author java.lang.NullPointerException at kriNon.endernet.lib.EnderRegistry.set(EnderRegistry.java:73) ~[EnderRegistry.class:?] at kriNon.endernet.tileentities.TileEntityEnderTransmitter.readFromNBT(TileEntityEnderTransmitter.java:248) ~[TileEntityEnderTransmitter.class:?] at net.minecraft.tileentity.TileEntity.create(TileEntity.java:137) [TileEntity.class:?] at net.minecraft.world.chunk.storage.AnvilChunkLoader.loadEntities(AnvilChunkLoader.java:515) [AnvilChunkLoader.class:?] at net.minecraftforge.common.chunkio.ChunkIOProvider.syncCallback(ChunkIOProvider.java:96) [ChunkIOProvider.class:?] at net.minecraftforge.common.chunkio.ChunkIOExecutor.syncChunkLoad(ChunkIOExecutor.java:94) [ChunkIOExecutor.class:?] at net.minecraft.world.gen.ChunkProviderServer.loadChunk(ChunkProviderServer.java:121) [ChunkProviderServer.class:?] at net.minecraft.world.gen.ChunkProviderServer.loadChunk(ChunkProviderServer.java:92) [ChunkProviderServer.class:?] at net.minecraft.world.gen.ChunkProviderServer.provideChunk(ChunkProviderServer.java:138) [ChunkProviderServer.class:?] at net.minecraft.server.MinecraftServer.initialWorldChunkLoad(MinecraftServer.java:336) [MinecraftServer.class:?] at net.minecraft.server.integrated.IntegratedServer.loadAllWorlds(IntegratedServer.java:107) [integratedServer.class:?] at net.minecraft.server.integrated.IntegratedServer.startServer(IntegratedServer.java:124) [integratedServer.class:?] at net.minecraft.server.MinecraftServer.run(MinecraftServer.java:496) [MinecraftServer.class:?] at java.lang.Thread.run(Unknown Source) [?:1.8.0_91]
  13. r.updateAddresses(); which calls: public void updateAddresses() { if(addresses.contains(maxAddress)) { // New address added, look up while(addresses.contains(maxAddress)) maxAddress++; } else { // Old address removed, look down while(!addresses.contains(maxAddress)) maxAddress--; maxAddress++; } }
  14. Yes When I try that I get this error: http://pastebin.com/fyUJSmW3
  15. Sorry, do you mean that I should be using FMLServerAboutToStartEvent instead of FMLServerStartingEvent in my main class?
  16. RegistryInformation is being initialised on line 36, and the nested class RegistryInformation is defined above that starting line 13. Where exactly am I going wrong?
  17. Hey all, I am working on making a mod that adds inter-server item teleporters based off of asiekierka's endernet mod for 1.6.4. This is my first mod and I am not very experienced with modding or java, although I do have some experience with programming. I have been making slow but steady progress. Each TileEntityEnderTransmitter that is placed in the world has a "private int ea" which defaults to zero. This is meant to be the network id of the individual tile entity, so that when people want to teleport an item they are able to select which EnderReceiver to transmit to by entering the correct network id into the gui of the EnderTransmitter. As such every EnderReceiver and EnderTransmitter is meant to have its own individual network id. To try to understand how to do this I had a look at the github page for EnderNet2, asie's unfinished 1.7.10 update to his endernet mod. What I have done is I have added this EnderRegistry class: package kriNon.endernet.lib; import java.io.File; import java.io.FileNotFoundException; import java.io.FileReader; import java.io.FileWriter; import java.util.HashMap; import java.util.HashSet; import kriNon.endernet.Endernet; public class EnderRegistry { class RegistryInformation { HashSet<Integer> addresses; int maxAddress; public void init() { addresses = new HashSet<Integer>(); maxAddress = 0; } public void updateAddresses() { if(addresses.contains(maxAddress)) { // New address added, look up while(addresses.contains(maxAddress)) maxAddress++; } else { // Old address removed, look down while(!addresses.contains(maxAddress)) maxAddress--; maxAddress++; } } } public static EnderRegistry instance; private RegistryInformation r; private final HashMap<Integer, Object> objects = new HashMap<Integer, Object>(); private final File file; public EnderRegistry(File file) { this.file = file; try { r = (RegistryInformation)(Endernet.gson.fromJson(new FileReader(file), RegistryInformation.class)); } catch(FileNotFoundException e) { r = new RegistryInformation(); r.init(); } } public int register(Object o) { r.updateAddresses(); int address = r.maxAddress; r.addresses.add(address); objects.put(address, o); r.updateAddresses(); return address; } public void unregister(int address) { r.addresses.remove(address); objects.remove(address); r.updateAddresses(); } public Object get(int address) { return objects.get(address); } public void set(int address, Object o) { objects.put(address, o); r.updateAddresses(); } public void save() { try { Endernet.gson.toJson(r, new FileWriter(file)); } catch(Exception e) { e.printStackTrace(); } } } Then in my main class I added "public static Gson gson = new Gson();" and "public static Endernet instance;". I also implemented a serverstart event and serverstop event which load the endernet-registry.json and save it respectively. package kriNon.endernet; import com.google.gson.Gson; import kriNon.endernet.init.ModBlocks; import kriNon.endernet.init.ModItems; import kriNon.endernet.lib.EnderRegistry; import kriNon.endernet.proxy.CommonProxy; import kriNon.endernet.tileentities.TileEntityEnderTransmitter; import kriNon.endernet.util.Utils; import net.minecraftforge.fml.common.Mod; import net.minecraftforge.fml.common.Mod.EventHandler; 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.event.FMLServerStoppingEvent; import net.minecraftforge.fml.common.registry.GameRegistry; @Mod(modid = Reference.MODID, name = Reference.NAME, version = Reference.VERSION) public class Endernet { @Mod.Instance(Reference.MODID) public static Endernet instance; public static Gson gson = new Gson(); @SidedProxy(serverSide = Reference.SERVER_PROXY_CLASS, clientSide = Reference.CLIENT_PROXY_CLASS) public static CommonProxy proxy; @EventHandler public void preInit(FMLPreInitializationEvent event) { proxy.registerTileEntities(); ModItems.init(); ModBlocks.init(); ModItems.register(); ModBlocks.register(); proxy.registerRenders(); } @EventHandler public void init(FMLInitializationEvent event) { proxy.regiserGUIHandler(); } @EventHandler public void postInit(FMLPostInitializationEvent event) { } @EventHandler public void serverStart(FMLServerStartingEvent event){ try { EnderRegistry.instance = new EnderRegistry(event.getServer().getFile("endernet-registry.json")); } catch(Exception e) { Utils.getLogger().error("Could not start EnderNet server!"); e.printStackTrace(); } } @EventHandler public void serverStop(FMLServerStoppingEvent event) { EnderRegistry.instance.save(); } } In my TileEntityEnderTransmitter class I have added "nbt.setInteger("ea", ea);" to the writeToNBT method and added: if(nbt.hasKey("ea")){ ea = nbt.getInteger("ea"); EnderRegistry.instance.set(ea, this); } else { ea = EnderRegistry.instance.register(this); } to the readFromNBT method. I also added public void update() { if(!this.worldObj.isRemote && ea == 0){ EnderRegistry.instance.register(this); } } So that it can register an ID if the id is zero. and finally I added "EnderRegistry.instance.unregister(te.getEndernetID());" to the breakBlock function in my BlockEnderTransmitter to remove the ID from the registry if the block is broken. I have the entire project uploaded to github here: https://github.com/kriNon/Endernet1.10.2/tree/Testing_EnderRegistry Currently the issues I am having is that the endernet-registry.json file is remaining empty, tile entities are not getting ids, and upon right clicking or breaking the Ender Transmitter block it crashes: ---- Minecraft Crash Report ---- // I bet Cylons wouldn't have this problem. Time: 5/01/17 7:23 PM Description: Ticking block entity java.lang.NullPointerException: Ticking block entity at kriNon.endernet.lib.EnderRegistry.register(EnderRegistry.java:51) at kriNon.endernet.tileentities.TileEntityEnderTransmitter.update(TileEntityEnderTransmitter.java:47) at net.minecraft.world.World.updateEntities(World.java:1945) at net.minecraft.world.WorldServer.updateEntities(WorldServer.java:645) at net.minecraft.server.MinecraftServer.updateTimeLightAndEntities(MinecraftServer.java:783) at net.minecraft.server.MinecraftServer.tick(MinecraftServer.java:687) at net.minecraft.server.integrated.IntegratedServer.tick(IntegratedServer.java:156) at net.minecraft.server.MinecraftServer.run(MinecraftServer.java:536) at java.lang.Thread.run(Unknown Source) A detailed walkthrough of the error, its code path and all known details is as follows: --------------------------------------------------------------------------------------- -- Head -- Thread: Server thread Stacktrace: at kriNon.endernet.lib.EnderRegistry.register(EnderRegistry.java:51) at kriNon.endernet.tileentities.TileEntityEnderTransmitter.update(TileEntityEnderTransmitter.java:47) -- Block entity being ticked -- Details: Name: ender_transmitter // kriNon.endernet.tileentities.TileEntityEnderTransmitter Block type: ID #0 (tile.air // net.minecraft.block.BlockAir) Block data value: 0 / 0x0 / 0b0000 Block location: World: (-327,4,-1237), Chunk: (at 9,0,11 in -21,-78; contains blocks -336,0,-1248 to -321,255,-1233), Region: (-1,-3; contains chunks -32,-96 to -1,-65, blocks -512,0,-1536 to -1,255,-1025) Actual block type: ID #0 (tile.air // net.minecraft.block.BlockAir) Actual block data value: 0 / 0x0 / 0b0000 Stacktrace: at net.minecraft.world.World.updateEntities(World.java:1945) at net.minecraft.world.WorldServer.updateEntities(WorldServer.java:645) -- Affected level -- Details: Level name: New World All players: 1 total; [EntityPlayerMP['Player360'/167, l='New World', x=-324.57, y=4.00, z=-1238.58]] Chunk stats: ServerChunkCache: 1089 Drop: 0 Level seed: -4428084075862744427 Level generator: ID 01 - flat, ver 0. Features enabled: true Level generator options: Level spawn location: World: (-319,4,-1240), Chunk: (at 1,0,8 in -20,-78; contains blocks -320,0,-1248 to -305,255,-1233), Region: (-1,-3; contains chunks -32,-96 to -1,-65, blocks -512,0,-1536 to -1,255,-1025) Level time: 21045 game time, 21045 day time Level dimension: 0 Level storage version: 0x04ABD - Anvil Level weather: Rain time: 114098 (now: false), thunder time: 100798 (now: false) Level game mode: Game mode: creative (ID 1). Hardcore: false. Cheats: true Stacktrace: at net.minecraft.server.MinecraftServer.updateTimeLightAndEntities(MinecraftServer.java:783) at net.minecraft.server.MinecraftServer.tick(MinecraftServer.java:687) at net.minecraft.server.integrated.IntegratedServer.tick(IntegratedServer.java:156) at net.minecraft.server.MinecraftServer.run(MinecraftServer.java:536) at java.lang.Thread.run(Unknown Source) -- System Details -- Details: Minecraft Version: 1.10.2 Operating System: Windows 7 (amd64) version 6.1 Java Version: 1.8.0_91, Oracle Corporation Java VM Version: Java HotSpot(TM) 64-Bit Server VM (mixed mode), Oracle Corporation Memory: 679530888 bytes (648 MB) / 1038876672 bytes (990 MB) up to 1038876672 bytes (990 MB) JVM Flags: 3 total; -Xincgc -Xmx1024M -Xms1024M IntCache: cache: 0, tcache: 0, allocated: 0, tallocated: 0 FML: MCP 9.32 Powered by Forge 12.18.2.2171 4 mods loaded, 4 mods active States: 'U' = Unloaded 'L' = Loaded 'C' = Constructed 'H' = Pre-initialized 'I' = Initialized 'J' = Post-initialized 'A' = Available 'D' = Disabled 'E' = Errored UCHIJAAAA mcp{9.19} [Minecraft Coder Pack] (minecraft.jar) UCHIJAAAA FML{8.0.99.99} [Forge Mod Loader] (forgeSrc-1.10.2-12.18.2.2171.jar) UCHIJAAAA Forge{12.18.2.2171} [Minecraft Forge] (forgeSrc-1.10.2-12.18.2.2171.jar) UCHIJAAAA endernet{1.0.0} [Endernet] (bin) Loaded coremods (and transformers): Profiler Position: N/A (disabled) Player Count: 1 / 8; [EntityPlayerMP['Player360'/167, l='New World', x=-324.57, y=4.00, z=-1238.58]] Type: Integrated Server (map_client.txt) Is Modded: Definitely; Client brand changed to 'fml,forge' Thanks for any help!
  18. I had fixed BlockEnderTransmitter still extending BlockContainer, I just hadn't pushed the changes to the github page. Thanks a lot for the help with noticing my mistake with not creating instances of BlockEnderTransmitter. Everything works perfectly now, thanks everyone for all of the help!
  19. I wrote the code which I believe should make the block have a one slot inventory however I am not able to pipe items in or out using hoppers. I also am able to push the block with pistons, which I believe shouldn't be possible as a tile entity.
  20. So this should be what I should have? https://gist.github.com/kriNon/dbac43d39511dc621608eb2d512f1894 No errors are coming up with this and it seems right, however the block still doesn't seem to be a tile entity. Thanks for all of the help by the way!
  21. I have tried what I think you're telling me to do here: https://gist.github.com/kriNon/dbac43d39511dc621608eb2d512f1894 I'm getting an error telling me "The method createNewTileEntity(World, IBlockState) of type BlockEnderTransmitter must override or implement a supertype method". When I try getting rid of the @Override it still doesn't work properly.
  22. Could you go into a little bit more detail? How exactly should I be going about doing this?
  23. If I try to do that it throws an error telling me to remove the @Override on line 32, when I do so I get an error (on line 23) that BlockEnderTransmitter must implement the inherited abstract method ITileEntityProvider.createNewTileEntity(World, int)
  24. Hey, I'm currently working on getting into modding minecraft and have recently begun working on making a TileEntity with a 1 slot inventory (no gui yet). The issue I am having is that the block I have made (BlockEnderTransmitter) will not become a Tile Entity. I have checked with multiple tutorials and compared my code to other opensource projects to try to find the issue but I don't know how I should begin troubleshooting the problem. Any help would be much appreciated! My project is uploaded to github here: https://github.com/kriNon/Endernet1.10.2/ The classes I am having difficulty with are kriNon.blocks.BlockEnderTransmitter and kriNon.tileentities.TileEntityEnderTransmitter.
×
×
  • Create New...

Important Information

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