Jump to content

david476

Members
  • Posts

    238
  • Joined

  • Last visited

Everything posted by david476

  1. Try something like mod.MODID + ":textures/blocks/PNG.png" Check spelling of folders.
  2. I can never seem to get NBT with an entity (extends Entity) to actually work. Seemed fine with a tile entity. Current Code: @Override protected void readEntityFromNBT(NBTTagCompound nbt) { super.readFromNBT(nbt); sX = nbt.getInteger("sX"); sY = nbt.getInteger("sY"); sZ = nbt.getInteger("sZ"); active = nbt.getBoolean("active"); if (!active) { if (this.worldObj.getBlock(sX, sY, sZ) instanceof BlockController) { BlockController sBlock = (BlockController) this.worldObj.getBlock(sX, sY, sZ); sBlock.sEntity = this; } } } @Override protected void writeEntityToNBT(NBTTagCompound nbt) { super.writeToNBT(nbt); nbt.setInteger("sX", sX); nbt.setInteger("sY", sY); nbt.setInteger("sZ", sZ); nbt.setBoolean("active", active); } I have nothing else that relates to NBT Variables are set in the class or before spawning of the entity. Crash on save: [20:19:31] [main/INFO] [LaunchWrapper]: Loading tweak class name cpw.mods.fml.common.launcher.FMLTweaker [20:19:31] [main/INFO] [LaunchWrapper]: Using primary tweak class name cpw.mods.fml.common.launcher.FMLTweaker [20:19:31] [main/INFO] [LaunchWrapper]: Calling tweak class cpw.mods.fml.common.launcher.FMLTweaker [20:19:31] [main/INFO] [FML]: Forge Mod Loader version 7.2.209.1112 for Minecraft 1.7.2 loading [20:19:31] [main/INFO] [FML]: Java is Java HotSpot(TM) 64-Bit Server VM, version 1.7.0_60, running on Windows 7:amd64:6.1, installed at C:\Program Files\Java\jre7 [20:19:31] [main/INFO] [FML]: Managed to load a deobfuscated Minecraft name- we are in a deobfuscated environment. Skipping runtime deobfuscation [20:19:31] [main/INFO] [LaunchWrapper]: Loading tweak class name cpw.mods.fml.common.launcher.FMLInjectionAndSortingTweaker [20:19:31] [main/INFO] [LaunchWrapper]: Loading tweak class name cpw.mods.fml.common.launcher.FMLDeobfTweaker [20:19:31] [main/INFO] [LaunchWrapper]: Calling tweak class cpw.mods.fml.common.launcher.FMLInjectionAndSortingTweaker [20:19:31] [main/INFO] [LaunchWrapper]: Calling tweak class cpw.mods.fml.common.launcher.FMLInjectionAndSortingTweaker [20:19:31] [main/INFO] [LaunchWrapper]: Calling tweak class cpw.mods.fml.relauncher.CoreModManager$FMLPluginWrapper [20:19:31] [main/ERROR] [FML]: The binary patch set is missing. Either you are in a development environment, or things are not going to work! [20:19:32] [main/ERROR] [FML]: The minecraft jar file:/C:/Users/DEB/.gradle/caches/minecraft/net/minecraftforge/forge/1.7.2-10.12.1.1112/forgeSrc-1.7.2-10.12.1.1112.jar!/net/minecraft/client/ClientBrandRetriever.class appears to be corrupt! There has been CRITICAL TAMPERING WITH MINECRAFT, it is highly unlikely minecraft will work! STOP NOW, get a clean copy and try again! [20:19:32] [main/ERROR] [FML]: FML has been ordered to ignore the invalid or missing minecraft certificate. This is very likely to cause a problem! [20:19:32] [main/ERROR] [FML]: Technical information: ClientBrandRetriever was at jar:file:/C:/Users/DEB/.gradle/caches/minecraft/net/minecraftforge/forge/1.7.2-10.12.1.1112/forgeSrc-1.7.2-10.12.1.1112.jar!/net/minecraft/client/ClientBrandRetriever.class, there were 0 certificates for it [20:19:32] [main/ERROR] [FML]: FML appears to be missing any signature data. This is not a good thing [20:19:32] [main/INFO] [LaunchWrapper]: Calling tweak class cpw.mods.fml.relauncher.CoreModManager$FMLPluginWrapper [20:19:32] [main/INFO] [LaunchWrapper]: Calling tweak class cpw.mods.fml.common.launcher.FMLDeobfTweaker [20:19:32] [main/INFO] [LaunchWrapper]: Launching wrapped minecraft {net.minecraft.client.main.Main} [20:19:33] [main/INFO]: Setting user: Player794 [20:19:33] [Client thread/INFO]: LWJGL Version: 2.9.0 [20:19:34] [Client thread/INFO] [MinecraftForge]: Attempting early MinecraftForge initialization [20:19:34] [Client thread/INFO] [FML]: MinecraftForge v10.12.1.1112 Initialized [20:19:34] [Client thread/INFO] [FML]: Replaced 182 ore recipies [20:19:34] [Client thread/INFO] [MinecraftForge]: Completed early MinecraftForge initialization [20:19:34] [Client thread/INFO] [FML]: Searching C:\Users\DEB\Desktop\Modding\forge-1.7.2-10.12.1.1112\Forge\mods for mods [20:19:34] [Client thread/ERROR] [FML]: FML has detected a mod that is using a package name based on 'net.minecraft.src' : net.minecraft.src.FMLRenderAccessLibrary. This is generally a severe programming error. There should be no mod code in the minecraft namespace. MOVE YOUR MOD! If you're in eclipse, select your source code and 'refactor' it into a new package. Go on. DO IT NOW! [20:19:35] [Client thread/INFO] [debcore]: Mod debcore is missing the required element 'name'. Substituting debcore [20:19:35] [Client thread/INFO] [debmodularships]: Mod debmodularships is missing the required element 'name'. Substituting debmodularships [20:19:35] [Client thread/INFO] [FML]: Forge Mod Loader has identified 6 mods to load [20:19:35] [Client thread/INFO]: Reloading ResourceManager: Default, FMLFileResourcePack:Forge Mod Loader, FMLFileResourcePack:Minecraft Forge, FMLFileResourcePack:Example Mod, FMLFileResourcePack:debcore, FMLFileResourcePack:debmodularships [20:19:35] [Client thread/INFO] [FML]: Processing ObjectHolder annotations [20:19:35] [Client thread/INFO] [FML]: Found 341 ObjectHolder annotations [20:19:35] [Client thread/INFO] [FML]: Configured a dormant chunk cache size of 0 [20:19:35] [Client thread/INFO] [FML]: Applying holder lookups [20:19:35] [Client thread/INFO] [FML]: Holder lookups applied Starting up SoundSystem... Initializing LWJGL OpenAL (The LWJGL binding of OpenAL. For more information, see http://www.lwjgl.org) OpenAL initialized. [20:19:36] [sound Library Loader/INFO]: Sound engine started [20:19:36] [Client thread/INFO]: Created: 512x256 textures/blocks-atlas [20:19:36] [Client thread/INFO]: Created: 256x256 textures/items-atlas DIRT BLOCK >> tile.dirt [20:19:36] [Client thread/INFO] [FML]: Forge Mod Loader has successfully loaded 6 mods [20:19:36] [Client thread/INFO]: Reloading ResourceManager: Default, FMLFileResourcePack:Forge Mod Loader, FMLFileResourcePack:Minecraft Forge, FMLFileResourcePack:Example Mod, FMLFileResourcePack:debcore, FMLFileResourcePack:debmodularships [20:19:36] [Client thread/INFO]: Created: 256x256 textures/items-atlas [20:19:36] [Client thread/ERROR]: Using missing texture, unable to load minecraft:textures/blocks/MISSING_ICON_BLOCK_165_controllerblock.png java.io.FileNotFoundException: minecraft:textures/blocks/MISSING_ICON_BLOCK_165_controllerblock.png at net.minecraft.client.resources.FallbackResourceManager.getResource(FallbackResourceManager.java:65) ~[FallbackResourceManager.class:?] at net.minecraft.client.resources.SimpleReloadableResourceManager.getResource(SimpleReloadableResourceManager.java:67) ~[simpleReloadableResourceManager.class:?] at net.minecraft.client.renderer.texture.TextureMap.loadTextureAtlas(TextureMap.java:126) [TextureMap.class:?] at net.minecraft.client.renderer.texture.TextureMap.loadTexture(TextureMap.java:91) [TextureMap.class:?] at net.minecraft.client.renderer.texture.TextureManager.loadTexture(TextureManager.java:89) [TextureManager.class:?] at net.minecraft.client.renderer.texture.TextureManager.onResourceManagerReload(TextureManager.java:170) [TextureManager.class:?] at net.minecraft.client.resources.SimpleReloadableResourceManager.notifyReloadListeners(SimpleReloadableResourceManager.java:134) [simpleReloadableResourceManager.class:?] at net.minecraft.client.resources.SimpleReloadableResourceManager.reloadResources(SimpleReloadableResourceManager.java:118) [simpleReloadableResourceManager.class:?] at net.minecraft.client.Minecraft.refreshResources(Minecraft.java:626) [Minecraft.class:?] at cpw.mods.fml.client.FMLClientHandler.finishMinecraftLoading(FMLClientHandler.java:303) [FMLClientHandler.class:?] at net.minecraft.client.Minecraft.startGame(Minecraft.java:585) [Minecraft.class:?] at net.minecraft.client.Minecraft.run(Minecraft.java:892) [Minecraft.class:?] at net.minecraft.client.main.Main.main(Main.java:112) [Main.class:?] at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[?:1.7.0_60] at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source) ~[?:1.7.0_60] at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) ~[?:1.7.0_60] at java.lang.reflect.Method.invoke(Unknown Source) ~[?:1.7.0_60] at net.minecraft.launchwrapper.Launch.launch(Launch.java:134) [launchwrapper-1.9.jar:?] at net.minecraft.launchwrapper.Launch.main(Launch.java:28) [launchwrapper-1.9.jar:?] [20:19:36] [Client thread/INFO]: Created: 512x256 textures/blocks-atlas SoundSystem shutting down... Author: Paul Lamb, www.paulscode.com Starting up SoundSystem... Initializing LWJGL OpenAL (The LWJGL binding of OpenAL. For more information, see http://www.lwjgl.org) OpenAL initialized. [20:19:37] [sound Library Loader/INFO]: Sound engine started [20:19:37] [MCO Availability Checker #1/ERROR]: Couldn't connect to Realms [20:19:48] [server thread/INFO]: Starting integrated minecraft server version 1.7.2 [20:19:48] [server thread/INFO]: Generating keypair [20:19:48] [server thread/INFO]: Converting map! [20:19:48] [server thread/INFO]: Scanning folders... [20:19:48] [server thread/INFO]: Total conversion count is 0 [20:19:48] [server thread/INFO] [FML]: Injecting existing block and item data into this server instance [20:19:48] [server thread/INFO] [FML]: Applying holder lookups [20:19:48] [server thread/INFO] [FML]: Holder lookups applied [20:19:49] [server thread/INFO] [FML]: Loading dimension 0 (Copy of Copy of Copy of Copy of) (net.minecraft.server.integrated.IntegratedServer@4094d25a) [20:19:49] [server thread/INFO] [FML]: Loading dimension 1 (Copy of Copy of Copy of Copy of) (net.minecraft.server.integrated.IntegratedServer@4094d25a) [20:19:49] [server thread/INFO] [FML]: Loading dimension -1 (Copy of Copy of Copy of Copy of) (net.minecraft.server.integrated.IntegratedServer@4094d25a) [20:19:49] [server thread/INFO]: Preparing start region for level 0 [20:19:49] [Netty Client IO #0/INFO] [FML]: Server protocol version 1 [20:19:49] [Netty IO #1/INFO] [FML]: Client protocol version 1 [20:19:49] [Netty IO #1/INFO] [FML]: Client attempting to join with 6 mods : [email protected],[email protected],[email protected],[email protected],[email protected],[email protected] [20:19:49] [Netty IO #1/INFO] [FML]: Attempting connection with missing mods [] at CLIENT [20:19:49] [Netty Client IO #0/INFO] [FML]: Attempting connection with missing mods [] at SERVER [20:19:49] [Client thread/INFO] [FML]: [Client thread] Client side modded connection established [20:19:49] [server thread/INFO] [FML]: [server thread] Server side modded connection established [20:19:49] [server thread/INFO]: Player794[local:E:c9aa1ee9] logged in with entity id 8 at (-212.5, 4.0, 1746.5) [20:19:49] [server thread/INFO]: Player794 joined the game [20:19:51] [server thread/INFO]: Player794 has just earned the achievement [Taking Inventory] [20:19:51] [Client thread/INFO]: [CHAT] Player794 has just earned the achievement [Taking Inventory] [20:19:56] [server thread/INFO]: Saving and pausing game... [20:19:56] [server thread/INFO]: Saving chunks for level 'Copy of Copy of Copy of Copy of'/Overworld [20:20:02] [server thread/ERROR]: Encountered an unexpected exception java.lang.NoClassDefFoundError: net/minecraft/entity/Entity$1 at net.minecraft.entity.Entity.addEntityCrashInfo(Entity.java:2463) ~[Entity.class:?] at net.minecraft.entity.Entity.writeToNBT(Entity.java:1578) ~[Entity.class:?] at net.minecraft.entity.Entity.writeToNBTOptional(Entity.java:1515) ~[Entity.class:?] at net.minecraft.world.chunk.storage.AnvilChunkLoader.writeChunkToNBT(AnvilChunkLoader.java:299) ~[AnvilChunkLoader.class:?] at net.minecraft.world.chunk.storage.AnvilChunkLoader.saveChunk(AnvilChunkLoader.java:132) ~[AnvilChunkLoader.class:?] at net.minecraft.world.gen.ChunkProviderServer.safeSaveChunk(ChunkProviderServer.java:229) ~[ChunkProviderServer.class:?] at net.minecraft.world.gen.ChunkProviderServer.saveChunks(ChunkProviderServer.java:281) ~[ChunkProviderServer.class:?] at net.minecraft.world.WorldServer.saveAllChunks(WorldServer.java:875) ~[WorldServer.class:?] at net.minecraft.server.MinecraftServer.saveAllWorlds(MinecraftServer.java:370) ~[MinecraftServer.class:?] at net.minecraft.server.integrated.IntegratedServer.tick(IntegratedServer.java:113) ~[integratedServer.class:?] at net.minecraft.server.MinecraftServer.run(MinecraftServer.java:482) [MinecraftServer.class:?] at net.minecraft.server.MinecraftServer$2.run(MinecraftServer.java:746) [MinecraftServer$2.class:?] [20:20:02] [server thread/ERROR]: This crash report has been saved to: C:\Users\DEB\Desktop\Modding\forge-1.7.2-10.12.1.1112\Forge\.\crash-reports\crash-2014-06-17_20.20.02-server.txt [20:20:02] [server thread/INFO]: Stopping server [20:20:02] [server thread/INFO]: Saving players [20:20:02] [server thread/INFO]: Saving worlds [20:20:02] [server thread/INFO]: Saving chunks for level 'Copy of Copy of Copy of Copy of'/Overworld [20:20:08] [server thread/ERROR]: Exception stopping the server java.lang.NoClassDefFoundError: net/minecraft/entity/Entity$1 at net.minecraft.entity.Entity.addEntityCrashInfo(Entity.java:2463) ~[Entity.class:?] at net.minecraft.entity.Entity.writeToNBT(Entity.java:1578) ~[Entity.class:?] at net.minecraft.entity.Entity.writeToNBTOptional(Entity.java:1515) ~[Entity.class:?] at net.minecraft.world.chunk.storage.AnvilChunkLoader.writeChunkToNBT(AnvilChunkLoader.java:299) ~[AnvilChunkLoader.class:?] at net.minecraft.world.chunk.storage.AnvilChunkLoader.saveChunk(AnvilChunkLoader.java:132) ~[AnvilChunkLoader.class:?] at net.minecraft.world.gen.ChunkProviderServer.safeSaveChunk(ChunkProviderServer.java:229) ~[ChunkProviderServer.class:?] at net.minecraft.world.gen.ChunkProviderServer.saveChunks(ChunkProviderServer.java:281) ~[ChunkProviderServer.class:?] at net.minecraft.world.WorldServer.saveAllChunks(WorldServer.java:875) ~[WorldServer.class:?] at net.minecraft.server.MinecraftServer.saveAllWorlds(MinecraftServer.java:370) ~[MinecraftServer.class:?] at net.minecraft.server.MinecraftServer.stopServer(MinecraftServer.java:403) ~[MinecraftServer.class:?] at net.minecraft.server.integrated.IntegratedServer.stopServer(IntegratedServer.java:255) ~[integratedServer.class:?] at net.minecraft.server.MinecraftServer.run(MinecraftServer.java:535) [MinecraftServer.class:?] at net.minecraft.server.MinecraftServer$2.run(MinecraftServer.java:746) [MinecraftServer$2.class:?] [20:20:08] [server thread/INFO] [FML]: Applying holder lookups [20:20:08] [server thread/INFO] [FML]: Holder lookups applied [20:20:08] [server thread/INFO] [FML]: The state engine was in incorrect state SERVER_STOPPING and forced into state SERVER_STOPPED. Errors may have been discarded. ---- Minecraft Crash Report ---- // You should try our sister game, Minceraft! Time: 6/17/14 8:20 PM Description: Exception in server tick loop java.lang.NoClassDefFoundError: net/minecraft/entity/Entity$1 at net.minecraft.entity.Entity.addEntityCrashInfo(Entity.java:2463) at net.minecraft.entity.Entity.writeToNBT(Entity.java:1578) at net.minecraft.entity.Entity.writeToNBTOptional(Entity.java:1515) at net.minecraft.world.chunk.storage.AnvilChunkLoader.writeChunkToNBT(AnvilChunkLoader.java:299) at net.minecraft.world.chunk.storage.AnvilChunkLoader.saveChunk(AnvilChunkLoader.java:132) at net.minecraft.world.gen.ChunkProviderServer.safeSaveChunk(ChunkProviderServer.java:229) at net.minecraft.world.gen.ChunkProviderServer.saveChunks(ChunkProviderServer.java:281) at net.minecraft.world.WorldServer.saveAllChunks(WorldServer.java:875) at net.minecraft.server.MinecraftServer.saveAllWorlds(MinecraftServer.java:370) at net.minecraft.server.integrated.IntegratedServer.tick(IntegratedServer.java:113) at net.minecraft.server.MinecraftServer.run(MinecraftServer.java:482) at net.minecraft.server.MinecraftServer$2.run(MinecraftServer.java:746) A detailed walkthrough of the error, its code path and all known details is as follows: --------------------------------------------------------------------------------------- -- System Details -- Details: Minecraft Version: 1.7.2 Operating System: Windows 7 (amd64) version 6.1 Java Version: 1.7.0_60, Oracle Corporation Java VM Version: Java HotSpot(TM) 64-Bit Server VM (mixed mode), Oracle Corporation Memory: 527174440 bytes (502 MB) / 770179072 bytes (734 MB) up to 3804758016 bytes (3628 MB) JVM Flags: 0 total; AABB Pool Size: 175 (9800 bytes; 0 MB) allocated, 172 (9632 bytes; 0 MB) used IntCache: cache: 0, tcache: 0, allocated: 0, tallocated: 0 FML: MCP v9.03 FML v7.2.209.1112 Minecraft Forge 10.12.1.1112 6 mods loaded, 6 mods active mcp{9.03} [Minecraft Coder Pack] (minecraft.jar) Unloaded->Constructed->Pre-initialized->Initialized->Post-initialized->Available->Available->Available->Available FML{7.2.209.1112} [Forge Mod Loader] (forgeSrc-1.7.2-10.12.1.1112.jar) Unloaded->Constructed->Pre-initialized->Initialized->Post-initialized->Available->Available->Available->Available Forge{10.12.1.1112} [Minecraft Forge] (forgeSrc-1.7.2-10.12.1.1112.jar) Unloaded->Constructed->Pre-initialized->Initialized->Post-initialized->Available->Available->Available->Available examplemod{1.0} [Example Mod] (bin) Unloaded->Constructed->Pre-initialized->Initialized->Post-initialized->Available->Available->Available->Available debcore{1.7.00Dev} [debcore] (bin) Unloaded->Constructed->Pre-initialized->Initialized->Post-initialized->Available->Available->Available->Available debmodularships{1.7.00Dev} [debmodularships] (bin) Unloaded->Constructed->Pre-initialized->Initialized->Post-initialized->Available->Available->Available->Available Profiler Position: N/A (disabled) Vec3 Pool Size: 14 (784 bytes; 0 MB) allocated, 14 (784 bytes; 0 MB) used Player Count: 1 / 8; [EntityPlayerMP['Player794'/8, l='Copy of Copy of Copy of Copy of', x=-212.50, y=4.00, z=1746.50]] Type: Integrated Server (map_client.txt) Is Modded: Definitely; Client brand changed to 'fml,forge' #@!@# Game crashed! Crash report saved to: #@!@# .\crash-reports\crash-2014-06-17_20.20.02-server.txt AL lib: (EE) alc_cleanup: 1 device not closed
  3. Try comparing the yaws of your entity and the player and switching between two textures depending on what side of the door the player is facing. Each texture would have a different side of the door transparent!
  4. I think it might be that they aren't saving properly, I'm spawning them with if (world.isRemote == something) { world.spawnEntityInWorld(shipcontrolentity); } which should I use to make sure it's on the server?
  5. Just rewrite getItemDropped and erase dropBlockAsItemWithChance (or make it do nothing) then add your two items in getItemDropped and factor in chance. You could also spawn a new item entity when the block breaks.
  6. I'm getting: [05:53:49] [server thread/INFO] [FML]: Applying holder lookups [05:53:49] [server thread/INFO] [FML]: Holder lookups applied on world save. I don't remember seeing it before.
  7. back to true, realized my mistake. another entity does the same thing after I set it's roll variable to something other than 0
  8. Why not just extend the furnace versions of the files. Then just change what you need to.
  9. changed "this.worldObj.isRemote == true"s to "this.worldObj.isRemote == false", no change
  10. don't really know, just guesses. isAdventureModeExempt probably relates to whether you can or cannot break it in Adventure mode. isSolid I believe relates to whether you can place redstone on it and such. I only knew that isOpaque affected rendering.
  11. Add an argument for the block and call this multiple times.
  12. You could make a custom item renderer that renders like the block. Try this http://www.minecraftforge.net/forum/index.php?topic=252.0. I don't know how to do it myself.
  13. My entity is not saved, lot loaded, or the controller variable doesn't get set correctly. Any ideas would help. (Not a rendering problem, console doesn't output anything when I start the world) package com.DEBmods.modularships; import net.minecraft.entity.DataWatcher; import net.minecraft.entity.Entity; import net.minecraft.nbt.NBTTagCompound; import net.minecraft.util.AxisAlignedBB; import net.minecraft.world.World; public class EntityShipBlock extends Entity{ public EntityShipControl controller; public int Xoff; public int Yoff; public int Zoff; public String axisF; public float rotationRoll; public EntityShipBlock(World par1World) { super(par1World); } public boolean canBePushed() { return false; } @Override protected void entityInit() { DataWatcher dw = this.getDataWatcher(); dw.addObject(4, 0); dw.addObject(5, 0); dw.addObject(6, 0); dw.addObject(7, "x"); dw.addObject(8, this.rotationRoll); AxisAlignedBB.getBoundingBox(-0.5d, -0.5d, -0.5d, 0.5d, 0.5d, 0.5d); } @Override protected void readEntityFromNBT(NBTTagCompound var1) { if (this.worldObj.isRemote == true) { super.readFromNBT(var1); this.Xoff = var1.getInteger("Xoff"); this.Yoff = var1.getInteger("Yoff"); this.Zoff = var1.getInteger("Zoff"); this.axisF = var1.getString("axisF"); this.rotationRoll = var1.getFloat("rotationRoll"); if (this.worldObj.getEntityByID(var1.getInteger("controller")) instanceof EntityShipControl) { this.controller = (EntityShipControl) this.worldObj.getEntityByID(var1.getInteger("controller")); } } } @Override protected void writeEntityToNBT(NBTTagCompound var1) { if (this.worldObj.isRemote == true) { super.writeToNBT(var1); var1.setInteger("Xoff", this.Xoff); var1.setInteger("Yoff", this.Yoff); var1.setInteger("Zoff", this.Zoff); var1.setString("axisF", this.axisF); var1.setFloat("rotationRoll", this.rotationRoll); var1.setInteger("controller", controller.getEntityId()); } } //STUFF FOR onUpdate ONLY!!! public void onUpdate() { //Updates variables from the DataWatcher DataWatcher dw = this.getDataWatcher(); if (dw.getWatchableObjectInt(4) + dw.getWatchableObjectInt(5) + dw.getWatchableObjectInt(6) + dw.getWatchableObjectFloat( != 0) { this.Xoff = dw.getWatchableObjectInt(4); this.Yoff = dw.getWatchableObjectInt(5); this.Zoff = dw.getWatchableObjectInt(6); this.axisF = dw.getWatchableObjectString(7); } this.rotationRoll = dw.getWatchableObjectFloat(; //Updates rotation and position if (controller != null) { this.setPosition(controller.posX, controller.posY, controller.posZ); } System.out.println(this.posX + " " + this.posY + " " + this.posZ); //Updates the DataWatcher from variables if (this.Xoff + this.Yoff + this.Zoff != 0) { dw.updateObject(4, this.Xoff); dw.updateObject(5, this.Yoff); dw.updateObject(6, this.Zoff); dw.updateObject(7, this.axisF); } dw.updateObject(8, this.rotationRoll); } }
  14. By center I mean what the mins and maxs measure from. Location of the entity? Also, are these variables pixels or blocks or other(what unit)?
  15. got any knowledge to impart?
  16. Now they don't seem to render at all, probably something stupid, could you take a look? (the entity counter definitely gets set to three on both client and server) package modularships.renderstuff; import net.minecraft.client.renderer.entity.Render; import net.minecraft.entity.Entity; import com.DEBmods.modularships.EntityShipBlock; import com.DEBmods.modularships.modularshipsINIT; import net.minecraft.util.ResourceLocation; import org.lwjgl.opengl.GL11; import renderstuff.models.ModelShipBlock; import cpw.mods.fml.relauncher.Side; import cpw.mods.fml.relauncher.SideOnly; @SideOnly(Side.CLIENT) public class RenderShipBlock extends Render { private static final ResourceLocation texture = new ResourceLocation(modularshipsINIT.MODID + ":textures/entity/shipblockentity.png"); /** instance of modelShipBlock for rendering */ protected ModelShipBlock modelShipBlock; public RenderShipBlock() { this.shadowSize = 0.5F; this.modelShipBlock = new ModelShipBlock(); } /** * Actually renders the given argument. This is a synthetic bridge method, always casting down its argument and then * handing it off to a worker function which does the actual work. In all probability, the class Render is generic * (Render<T extends Entity) and this method has signature public void func_76986_a(T entity, double d, double d1, * double d2, float f, float f1). But JAD is pre 1.5 so doesn't do that. */ public void doRender(EntityShipBlock par1EntityShipBlock, double par2, double par4, double par6, float par8, float par9) { System.out.println(par1EntityShipBlock.counter); if (par1EntityShipBlock.worldObj.isRemote == false) { GL11.glPushMatrix(); if (par1EntityShipBlock.counter == 3) { GL11.glTranslatef((float)par2 - par1EntityShipBlock.Xoff, (float)par4 - par1EntityShipBlock.Yoff, (float)par6 - par1EntityShipBlock.Zoff); if (par1EntityShipBlock.axisF == "x") { modelShipBlock.Block.setRotationPoint(par1EntityShipBlock.Xoff * 16, 16f - (par1EntityShipBlock.Yoff * 16), par1EntityShipBlock.Zoff * 16); }else if (par1EntityShipBlock.axisF == "z") { modelShipBlock.Block.setRotationPoint(par1EntityShipBlock.Zoff * 16, 16f - (par1EntityShipBlock.Yoff * 16), par1EntityShipBlock.Xoff * 16); }else if (par1EntityShipBlock.axisF == "x-") { modelShipBlock.Block.setRotationPoint(-par1EntityShipBlock.Xoff * 16, 16f - (par1EntityShipBlock.Yoff * 16), -par1EntityShipBlock.Zoff * 16); }else if (par1EntityShipBlock.axisF == "z-") { modelShipBlock.Block.setRotationPoint(-par1EntityShipBlock.Zoff * 16, 16f - (par1EntityShipBlock.Yoff * 16), -par1EntityShipBlock.Xoff * 16); } float EntityPitch = par1EntityShipBlock.rotationPitch; float EntityRoll = par1EntityShipBlock.rotationRoll; GL11.glRotatef(par8 - 180, 0.0F, 1.0F, 0.0F); GL11.glRotatef(EntityPitch, 0.0F, 0.0F, 1.0F); GL11.glRotatef(EntityRoll, 1.0F, 0.0F, 0.0F); float f4 = 0.75F; GL11.glScalef(f4, f4, f4); GL11.glScalef(1.0F / f4, 1.0F / f4, 1.0F / f4); this.bindEntityTexture(par1EntityShipBlock); GL11.glScalef(-1.0F, -1.0F, 1.0F); this.modelShipBlock.render(par1EntityShipBlock, 0.0F, 0.0F, -0.1F, 0.0F, 0.0F, 0.0625F); GL11.glPopMatrix(); } } } /** * Returns the location of an entity's texture. Doesn't seem to be called unless you call Render.bindEntityTexture. */ protected ResourceLocation getEntityTexture(EntityShipBlock par1EntityShipBlockShipBlock) { return texture; } /** * Returns the location of an entity's texture. Doesn't seem to be called unless you call Render.bindEntityTexture. */ protected ResourceLocation getEntityTexture(Entity par1EntityShipBlock) { return this.getEntityTexture((EntityShipBlock)par1EntityShipBlock); } /** * Actually renders the given argument. This is a synthetic bridge method, always casting down its argument and then * handing it off to a worker function which does the actual work. In all probabilty, the class Render is generic * (Render<T extends Entity) and this method has signature public void func_76986_a(T entity, double d, double d1, * double d2, float f, float f1). But JAD is pre 1.5 so doesn't do that. */ public void doRender(Entity par1EntityShipBlock, double par2, double par4, double par6, float par8, float par9) { this.doRender((EntityShipBlock)par1EntityShipBlock, par2, par4, par6, par8, par9); } }
  17. How does the Bounding Box work? Where's the center? Does it rotate with the entity?
  18. I think I made it work by preventing it from rendering for 2 ticks.
  19. I guess so... what does that mean exactly. I wonder if it has something to do with the code that spawns it... EntityShipBlock shipblockentity = new EntityShipBlock(world); shipblockentity.setPositionAndRotation(x + 0.5, y + 1.5, z + 0.5, controller.rotationYaw, controller.rotationPitch); shipblockentity.controller = controller; shipblockentity.Xoff = x - contX; shipblockentity.Yoff = y - contY; shipblockentity.Zoff = z - contZ; shipblockentity.axisF = axis; world.spawnEntityInWorld(shipblockentity);
  20. if this doesn't work, check out Wuppy29's tutorial about releasing your mod, check that the resources are in the right place. http://www.wuppy29.com/minecraft/modding-tutorials/wuppys-minecraft-forge-modding-tutorials-for-1-7-releasing-your-mod-standard-setup/
  21. Render Code: package modularships.renderstuff; import net.minecraft.client.renderer.entity.Render; import net.minecraft.entity.Entity; import com.DEBmods.modularships.EntityShipBlock; import com.DEBmods.modularships.modularshipsINIT; import net.minecraft.util.ResourceLocation; import org.lwjgl.opengl.GL11; import renderstuff.models.ModelShipBlock; import cpw.mods.fml.relauncher.Side; import cpw.mods.fml.relauncher.SideOnly; @SideOnly(Side.CLIENT) public class RenderShipBlock extends Render { private static final ResourceLocation texture = new ResourceLocation(modularshipsINIT.MODID + ":textures/entity/shipblockentity.png"); /** instance of modelShipBlock for rendering */ protected ModelShipBlock modelShipBlock; public RenderShipBlock() { this.shadowSize = 0.5F; this.modelShipBlock = new ModelShipBlock(); } /** * Actually renders the given argument. This is a synthetic bridge method, always casting down its argument and then * handing it off to a worker function which does the actual work. In all probability, the class Render is generic * (Render<T extends Entity) and this method has signature public void func_76986_a(T entity, double d, double d1, * double d2, float f, float f1). But JAD is pre 1.5 so doesn't do that. */ public void doRender(EntityShipBlock par1EntityShipBlock, double par2, double par4, double par6, float par8, float par9) { if (par1EntityShipBlock.axisF == "x-") { modelShipBlock.Block.setRotationPoint(par1EntityShipBlock.Xoff * 16, 16f - (par1EntityShipBlock.Yoff * 16), par1EntityShipBlock.Zoff * 16); }else if (par1EntityShipBlock.axisF == "z-") { modelShipBlock.Block.setRotationPoint(par1EntityShipBlock.Zoff * 16, 16f - (par1EntityShipBlock.Yoff * 16), par1EntityShipBlock.Xoff * 16); }else if (par1EntityShipBlock.axisF == "x") { modelShipBlock.Block.setRotationPoint(-par1EntityShipBlock.Xoff * 16, 16f - (par1EntityShipBlock.Yoff * 16), -par1EntityShipBlock.Zoff * 16); }else if (par1EntityShipBlock.axisF == "z") { modelShipBlock.Block.setRotationPoint(-par1EntityShipBlock.Zoff * 16, 16f - (par1EntityShipBlock.Yoff * 16), -par1EntityShipBlock.Xoff * 16); } float EntityPitch = par1EntityShipBlock.rotationPitch; float EntityRoll = par1EntityShipBlock.rotationRoll; GL11.glPushMatrix(); GL11.glTranslatef((float)par2 - par1EntityShipBlock.Xoff, (float)par4 - par1EntityShipBlock.Yoff, (float)par6 - par1EntityShipBlock.Zoff); GL11.glRotatef(par8 - 180, 0.0F, 1.0F, 0.0F); GL11.glRotatef(EntityPitch, 0.0F, 0.0F, 1.0F); GL11.glRotatef(EntityRoll, 1.0F, 0.0F, 0.0F); float f4 = 0.75F; GL11.glScalef(f4, f4, f4); GL11.glScalef(1.0F / f4, 1.0F / f4, 1.0F / f4); this.bindEntityTexture(par1EntityShipBlock); GL11.glScalef(-1.0F, -1.0F, 1.0F); this.modelShipBlock.render(par1EntityShipBlock, 0.0F, 0.0F, -0.1F, 0.0F, 0.0F, 0.0625F); GL11.glPopMatrix(); } /** * Returns the location of an entity's texture. Doesn't seem to be called unless you call Render.bindEntityTexture. */ protected ResourceLocation getEntityTexture(EntityShipBlock par1EntityShipBlockShipBlock) { return texture; } /** * Returns the location of an entity's texture. Doesn't seem to be called unless you call Render.bindEntityTexture. */ protected ResourceLocation getEntityTexture(Entity par1EntityShipBlock) { return this.getEntityTexture((EntityShipBlock)par1EntityShipBlock); } /** * Actually renders the given argument. This is a synthetic bridge method, always casting down its argument and then * handing it off to a worker function which does the actual work. In all probabilty, the class Render is generic * (Render<T extends Entity) and this method has signature public void func_76986_a(T entity, double d, double d1, * double d2, float f, float f1). But JAD is pre 1.5 so doesn't do that. */ public void doRender(Entity par1EntityShipBlock, double par2, double par4, double par6, float par8, float par9) { this.doRender((EntityShipBlock)par1EntityShipBlock, par2, par4, par6, par8, par9); } }
  22. I'm getting some weird rending problems: http://s28.postimg.org/bsrbxrrf1/javaw_2014_05_05_19_22_53_98_edited.png[/img] There is another model in the world that renders rotation in increments (I rotate the model, the false models stays still and then jump to the new rotation once it reaches a certain point) and other random models.
×
×
  • Create New...

Important Information

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