Jump to content
Search In
  • More options...
Find results that contain...
Find results in...

poonkje112

Members
  • Posts

    16
  • Joined

  • Last visited

Converted

  • Gender
    Undisclosed
  • Personal Text
    Creator Of Optical Items.

poonkje112's Achievements

Tree Puncher

Tree Puncher (2/8)

0

Reputation

  1. Hello everyone! I'm trying to make a multiblock structure but I have some problems... The metadata is wrong and I cant figure it out what I did wrong so for fixing the texture I replaced this line of code: if(world.getBlockMetadata(x1, y1, z1) > 0) world.setBlockMetadataWithNotify(x1, y1, z1, 0, 3); To: if(world.getBlockMetadata(x1, y1, z1) > 0) world.setBlockMetadataWithNotify(x1, y1, z1, 9, 3); But the texture is only showing after I removed 1 block of the structure. Block Class: package com.poonkje.optical.blocks; import net.minecraft.block.Block; import net.minecraft.block.BlockContainer; import net.minecraft.block.material.Material; import net.minecraft.tileentity.TileEntity; import net.minecraft.world.World; import com.poonkje.optical.TileEntity.TileEntityWindmillFloor; import com.poonkje.optical.common.MainClass; public class WindmillFloor extends BlockContainer { public WindmillFloor(Material material) { super(material); this.setBlockBounds(0, 0, 0, 1, (1F/16F)*14, 1); } public int getRenderType() { return -1; } public boolean renderAsNormalBlock() { return false; } public boolean isOpaqueCube() { return false; } public void onNeighborBlockChange(World world, int x, int y, int z, Block neighborBlock) { updateMultiBlockStructure(world, x, y, z); } public void onBlockAdded(World world, int x, int y, int z) { updateMultiBlockStructure(world, x, y, z); } public void updateMultiBlockStructure(World world, int x, int y, int z) { isMultiBlockStructure(world, x, y, z); } public boolean isMultiBlockStructure(World world, int x1, int y1, int z1) { boolean mStructure = false; boolean currentCheckStructure = true; for(int x2 = 0; x2 < 3; x2++){ for(int z2=0; z2 < 3; z2++){ if(!mStructure){ currentCheckStructure = true; for(int x3 = 0; x3 < 3; x3++){ for(int z3 = 0; z3 < 3; z3++) { if(currentCheckStructure && !world.getBlock(x1+x2-x3, y1, z1+z2-z3).equals(MainClass.WindmillFloor)){ currentCheckStructure = false; } } } if(currentCheckStructure){ for(int x3 = 0; x3 <3; x3++){ for(int z3 = 0; z3 < 3; z3++){ world.setBlockMetadataWithNotify(x1+x2-x3, y1, z1+z2-z3, x3*3+z3, 2); } } } } mStructure = currentCheckStructure; } } if(mStructure) return true; if(world.getBlockMetadata(x1, y1, z1) > 0) world.setBlockMetadataWithNotify(x1, y1, z1, 9, 3); return false; } public TileEntity createNewTileEntity(World var1, int var2) { return new TileEntityWindmillFloor(); } } TileEntityRenderWindmillFloor class: package com.poonkje.optical.TileEntity.Renderer; import org.lwjgl.opengl.GL11; import net.minecraft.client.renderer.Tessellator; import net.minecraft.client.renderer.tileentity.TileEntitySpecialRenderer; import net.minecraft.tileentity.TileEntity; import net.minecraft.util.ResourceLocation; public class TileEntityRenderWindmillFloor extends TileEntitySpecialRenderer { private final ResourceLocation res = new ResourceLocation("optical:textures/model/windmillFloor.png"); private int textureW = 32; private int textureH = 32; private float pixel = 1F/16F; public void renderTileEntityAt(TileEntity tileentity, double x, double y, double z, float f) { GL11.glPushMatrix(); GL11.glTranslatef((float)x, (float)y, (float)z); Tessellator tes = Tessellator.instance; this.bindTexture(res); tes.startDrawingQuads(); // Starts the tes { if(tileentity.getWorldObj().getBlockMetadata(tileentity.xCoord, tileentity.yCoord, tileentity.zCoord) == 9){ tes.addVertexWithUV(1, pixel*14, 1, 1F/textureW*(32), 1F/textureH*(32)); tes.addVertexWithUV(1, pixel*14, 0, 1F/textureW*(32), 1F/textureH*(0)); tes.addVertexWithUV(0, pixel*14, 0, 1F/textureW*(0), 1F/textureH*(0)); tes.addVertexWithUV(0, pixel*14, 1, 1F/textureW*(0), 1F/textureH*(32)); } if(tileentity.getWorldObj().getBlockMetadata(tileentity.xCoord, tileentity.yCoord, tileentity.zCoord) == 1){ tes.addVertexWithUV(0.5, pixel*14, 1.5, 1F/textureW*(32), 1F/textureH*(32)); tes.addVertexWithUV(0.5, pixel*14, 1, 1F/textureW*(32), 1F/textureH*(8+16)); tes.addVertexWithUV(0, pixel*14, 1, 1F/textureW*(8+16), 1F/textureH*(8+16)); tes.addVertexWithUV(0, pixel*14, 1.5, 1F/textureW*(8+16), 1F/textureH*(32)); } if(tileentity.getWorldObj().getBlockMetadata(tileentity.xCoord, tileentity.yCoord, tileentity.zCoord) == 2){ tes.addVertexWithUV(0.5, pixel*14, 2, 1F/textureW*(32), 1F/textureH*(8+16)); tes.addVertexWithUV(0.5, pixel*14, 1, 1F/textureW*(32), 1F/textureH*(); tes.addVertexWithUV(0, pixel*14, 1, 1F/textureW*(8+16), 1F/textureH*(); tes.addVertexWithUV(0, pixel*14, 2, 1F/textureW*(8+16), 1F/textureH*(8+16)); } if(tileentity.getWorldObj().getBlockMetadata(tileentity.xCoord, tileentity.yCoord, tileentity.zCoord) == 3){ tes.addVertexWithUV(1, pixel*14, 0.5, 1F/textureW*(8+16), 1F/textureH*(32)); tes.addVertexWithUV(1, pixel*14, 0, 1F/textureW*(8+16), 1F/textureH*(8+16)); tes.addVertexWithUV(0, pixel*14, 0, 1F/textureW*(, 1F/textureH*(8+16)); tes.addVertexWithUV(0, pixel*14, 0.5, 1F/textureW*(, 1F/textureH*(32)); } //4 if(tileentity.getWorldObj().getBlockMetadata(tileentity.xCoord, tileentity.yCoord, tileentity.zCoord) == 5){ tes.addVertexWithUV(1, pixel*14, 1, 1F/textureW*(8+16), 1F/textureH*(); tes.addVertexWithUV(1, pixel*14, 0.5, 1F/textureW*(8+16), 1F/textureH*(0)); tes.addVertexWithUV(0, pixel*14, 0.5, 1F/textureW*(, 1F/textureH*(0)); tes.addVertexWithUV(0, pixel*14, 1, 1F/textureW*(, 1F/textureH*(); } //5 Middle Connected with 4! TODO if(tileentity.getWorldObj().getBlockMetadata(tileentity.xCoord, tileentity.yCoord, tileentity.zCoord) == 5){ tes.addVertexWithUV(0, pixel*14, 2, 1F/textureW*(8+16), 1F/textureH*(8+16)); tes.addVertexWithUV(1, pixel*14, 2, 1F/textureW*(8+16), 1F/textureH*(); tes.addVertexWithUV(1, pixel*14, 1, 1F/textureW*(, 1F/textureH*(); tes.addVertexWithUV(0, pixel*14, 1, 1F/textureW*(, 1F/textureH*(8+16)); } if(tileentity.getWorldObj().getBlockMetadata(tileentity.xCoord, tileentity.yCoord, tileentity.zCoord) == 6){ tes.addVertexWithUV(0.5, pixel*14, 0.5, 1F/textureW*(0), 1F/textureH*(32)); tes.addVertexWithUV(1, pixel*14, 0.5, 1F/textureW*(0), 1F/textureH*(8+16)); tes.addVertexWithUV(1, pixel*14, 0, 1F/textureW*(, 1F/textureH*(8+16)); tes.addVertexWithUV(0.5, pixel*14, 0, 1F/textureW*(, 1F/textureH*(32)); } if(tileentity.getWorldObj().getBlockMetadata(tileentity.xCoord, tileentity.yCoord, tileentity.zCoord) == 7){ tes.addVertexWithUV(0.5, pixel*14, 0, 1F/textureW*(, 1F/textureH*(32)); tes.addVertexWithUV(0.5, pixel*14, 1, 1F/textureW*(8+16), 1F/textureH*(32)); tes.addVertexWithUV(1, pixel*14, 1, 1F/textureW*(8+16), 1F/textureH*(8+16)); tes.addVertexWithUV(1, pixel*14, 0, 1F/textureW*(, 1F/textureH*(8+16)); } if(tileentity.getWorldObj().getBlockMetadata(tileentity.xCoord, tileentity.yCoord, tileentity.zCoord) == { tes.addVertexWithUV(0.5, pixel*14, 1, 1F/textureW*(, 1F/textureH*(32)); tes.addVertexWithUV(1, pixel*14, 1, 1F/textureW*(, 1F/textureH*(8+16)); tes.addVertexWithUV(1, pixel*14, 0.5, 1F/textureW*(0), 1F/textureH*(8+16)); tes.addVertexWithUV(0.5, pixel*14, 0.5, 1F/textureW*(0), 1F/textureH*(32)); } if(tileentity.getWorldObj().getBlockMetadata(tileentity.xCoord, tileentity.yCoord, tileentity.zCoord) == 5){ tes.addVertexWithUV(1.5, pixel*14, 1, 1F/textureW*(0), 1F/textureH*(8+16)); tes.addVertexWithUV(1.5, pixel*14, 0.5, 1F/textureW*(0), 1F/textureH*(32)); tes.addVertexWithUV(1, pixel*14, 0.5, 1F/textureW*(, 1F/textureH*(32)); tes.addVertexWithUV(1, pixel*14, 1, 1F/textureW*(, 1F/textureH*(8+16)); } tes.draw(); //End of tes GL11.glPopMatrix(); } } } This line of code sets the texture if the block is not a multiblock structure ( The texture is again only visible after you remove one block of the structure ) if(tileentity.getWorldObj().getBlockMetadata(tileentity.xCoord, tileentity.yCoord, tileentity.zCoord) == 9){ tes.addVertexWithUV(1, pixel*14, 1, 1F/textureW*(32), 1F/textureH*(32)); tes.addVertexWithUV(1, pixel*14, 0, 1F/textureW*(32), 1F/textureH*(0)); tes.addVertexWithUV(0, pixel*14, 0, 1F/textureW*(0), 1F/textureH*(0)); tes.addVertexWithUV(0, pixel*14, 1, 1F/textureW*(0), 1F/textureH*(32)); } And I don't know why but the textures are to dark and is only light on a specific perspective? Images to get a better view of the Thanks already for the help!
  2. Well I changed my bucket Handler code and that fixed the problem! ( I got some inspiration from the buildcraft code from the Minecraft forge wiki ) Everything is working now! Thanks for the help!
  3. Well what do I have to change/add to my material line? public static Material Crystal; @EventHandler public void preInit(FMLPreInitializationEvent e) throws IOException { Crystal = new MaterialLiquid(MapColor.iceColor).setReplaceable(); }
  4. Well yes i learned java but sometimes I forget some stuff. And now I putted the item in the preInit but the fluid is still returning water with an empty bucket so I don't Know what the problem is i didn't call a method to return water? Only with the Material? (Fluid Code With the material ) package com.poonkje.optical.common; import java.util.Random; import net.minecraft.block.material.Material; import net.minecraft.world.World; import net.minecraftforge.fluids.BlockFluidClassic; import cpw.mods.fml.relauncher.Side; import cpw.mods.fml.relauncher.SideOnly; public class blockCrystalFluid extends BlockFluidClassic { public blockCrystalFluid(int id) { super(MainClass.fluidCrystal, /**MainClass.Crystal*/ Material.water); this.setCreativeTab(MainClass.Opticaltab); } //Add particles @SideOnly(Side.CLIENT) public void randomDisplayTick(World world, int x, int y, int z, Random random) { float f1 = (float)x + 0.5F; float f2 = (float)y + 1.1F; float f3 =(float)z + 0.5F; float f4 = random.nextFloat() * 0.3F; float f5 = random.nextFloat() * -0.6F - -0.3F; world.spawnParticle("smoke", (double)(f1+f4), (double)f2, (double)(f3+f5), 0.0D, 0.0D, 0.0D); } } Edit: Well i changed the material to my own material and now it's returning nothing so i'm pretty sure i did something wrong with the material. Crystal = new MaterialLiquid(MapColor.iceColor); ( I know i didn't add a method for isLiquid or something )
  5. Well first thing first i edited my first post for an better explanation about my problem. But when i put the code: public static Item BucketHotSpring = new BucketHotSpring(blockCrystalFluid, FluidCrystalID); In FMLPreInitializationEvent it doesn't want me to say public static and the other classes ( BucketHotSpring and ScratchFillBucketEvent ) Giving me an error. So how do i fix that? PreInit: @EventHandler public void preInit(FMLPreInitializationEvent e) throws IOException { //FLUIDS TODO fluidCrystal = new Fluid("fluid"); FluidRegistry.registerFluid(fluidCrystal); FluidRegistry.registerFluid(CrystalFluid); Crystal = new MaterialLiquid(MapColor.iceColor); blockCrystalFluid = new blockCrystalFluid(FluidCrystalID).setBlockTextureName("optical:HotSpring").setBlockName("CrystalFluid"); FluidRegistry.registerFluid(CrystalFluid); //final Item BucketHotSpring = new BucketHotSpring(blockCrystalFluid, FluidCrystalID); //Item BucketHotSpring = new BucketHotSpring(blockCrystalFluid, 250); GameRegistry.registerBlock(blockCrystalFluid, "Fluid Iron"); GameRegistry.registerItem(BucketHotSpring, BucketHotSpring.getUnlocalizedName()); MinecraftForge.EVENT_BUS.register(new ScratchFillBucketIEvent()); }
  6. Hello everyone! I'm trying to make bucket in forge it works except if I right click with a empty bucket it returns a water bucket but I didn't define to return a water bucket so what is the problem? Edit: Beter explanation I created a fluid but when I right click with an empty vanilla minecraft bucket it just returns water? So i don't understand why it's returning water?? ( I set the material of the fluid to Material.water to give the ability to swim. ) Code: Allready thanks for the help! Regards, poonkje112
  7. How to install First download and install Minecraft Forge How to install Forge By Direwolf20: Download Optical Items: http://adf.ly/Uk2mG Because i lost the code i cant update the mod to 1.7.2 the mod is still Available in 1.6.2 but i cant update it ! Put the downloaded zip file in the mods folder in .minecraft Done! ChangeLog V1.1 Bug Fixes! V1.0 Added: Smeltery Added: Milensia/Magma Blocks Added: Animated Textures Added: Green Screen Added: Blue Screen Added: Fresh Apple Added: Salamander Fixed: Obsidian Sword Recipe Spoilers about breaking the Magma/Milensia Ore Screenshots About the mod The optical items mod is trying to extend the fun of minecraft. We are trying to extend the fun of minecraft by searching videos, Topics about what minecraft need to add. In version 2.0 More stuff will be added ( Much much more! ) I'm working pretty hard on it. We're trying to add everything that people want to have in minecraft ( Feel free to place a post about what you want to have in minecraft ). Server Copyright What will be added in the future?
  8. Hello everyone I'm almost finished with my mod. But i don't understand where i actually have to put the textures for the items, Blocks And Mobs. So i try to put it in my zip in a folder that i named textures without success. So what do i have to change to my code and to the code for my mob? Here is a little bit of my code: Mob Texture code: And my normal block and item texture code: Item: Block: Already Thanks!
  9. So there is nothing i have to change everything runs through my proxy. So now i dont understand what the problem is. Do i have to add In all classes? Because the server problem is still not fixed.
  10. Yes but i have 2 classes that need that import.... Like: My Model for my Mob And the render for my mob And i allready set up the proxy.
  11. Fixed. I deleted some code and recode some stuff! Now it works properly! And i changed the @Instance So thanks!
  12. First a little bit cleaner view of everything: Crash Report: And again a little bit of my code: So what do i need to change? I dont understand what i need to do with the @SideOnly right now Because everyone says something else. So if i under stand i have the code: I have to add @Override and @SideOnly(Side.CLIENT) So like this? But i dont understand this code: What do i have to edit? Because i have one mob in the mod so probably is that the problem. My mod works only in single player. So what do i have to edit in that code for my mob entity?
  13. Hello everyoneI have a problemI made a mod but if i install it on a server it crash...But if i install it in normal minecraft it just works.This is the error i get:---- Minecraft Crash Report ----// I blame Dinnerbone.Time: 7/4/13 6:11 PMDescription: Exception in server tick loopjava.lang.NoClassDefFoundError: net/minecraft/client/renderer/entity/Renderat java.lang.Class.forName0(Native Method)at java.lang.Class.forName(Unknown Source)at cpw.mods.fml.common.FMLModContainer.constructMod(FMLModContainer.java:425)at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)at java.lang.reflect.Method.invoke(Unknown Source)at com.google.common.eventbus.EventHandler.handleEvent(EventHandler.java:74)at com.google.common.eventbus.SynchronizedEventHandler.handleEvent(SynchronizedEventHandler.java:45)at com.google.common.eventbus.EventBus.dispatch(EventBus.java:314)at com.google.common.eventbus.EventBus.dispatchQueuedEvents(EventBus.java:296)at com.google.common.eventbus.EventBus.post(EventBus.java:267)at cpw.mods.fml.common.LoadController.propogateStateMessage(LoadController.java:165)at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)at java.lang.reflect.Method.invoke(Unknown Source)at com.google.common.eventbus.EventHandler.handleEvent(EventHandler.java:74)at com.google.common.eventbus.SynchronizedEventHandler.handleEvent(SynchronizedEventHandler.java:45)at com.google.common.eventbus.EventBus.dispatch(EventBus.java:314)at com.google.common.eventbus.EventBus.dispatchQueuedEvents(EventBus.java:296)at com.google.common.eventbus.EventBus.post(EventBus.java:267)at cpw.mods.fml.common.LoadController.distributeStateMessage(LoadController.java:98)at cpw.mods.fml.common.Loader.loadMods(Loader.java:503)at cpw.mods.fml.server.FMLServerHandler.beginServerLoading(FMLServerHandler.java:85)at cpw.mods.fml.common.FMLCommonHandler.onServerStart(FMLCommonHandler.java:350)at net.minecraft.server.dedicated.DedicatedServer.func_71197_b(DedicatedServer.java:69)at net.minecraft.server.MinecraftServer.run(MinecraftServer.java:430)at net.minecraft.server.ThreadMinecraftServer.run(SourceFile:573)Caused by: java.lang.ClassNotFoundException: net.minecraft.client.renderer.entity.Renderat cpw.mods.fml.relauncher.RelaunchClassLoader.findClass(RelaunchClassLoader.java:238)at java.lang.ClassLoader.loadClass(Unknown Source)at java.lang.ClassLoader.loadClass(Unknown Source)... 29 moreCaused by: java.lang.NullPointerExceptionat cpw.mods.fml.relauncher.RelaunchClassLoader.findClass(RelaunchClassLoader.java:227)... 31 moreA detailed walkthrough of the error, its code path and all known details is as follows:----------------------------------------------------------------------------------------- System Details --Details:Minecraft Version: 1.5.2Operating System: Windows XP (x86) version 5.1Java Version: 1.7.0_21, Oracle CorporationJava VM Version: Java HotSpot Client VM (mixed mode, sharing), Oracle CorporationMemory: 22076368 bytes (21 MB) / 46731264 bytes (44 MB) up to 259522560 bytes (247 MB)JVM Flags: 0 total;AABB Pool Size: 0 (0 bytes; 0 MB) allocated, 0 (0 bytes; 0 MB) usedSuspicious classes: FML and Forge are installedIntCache: cache: 0, tcache: 0, allocated: 0, tallocated: 0FML: MCP v7.51 FML v5.2.2.684 Minecraft Forge 7.8.0.684 4 mods loaded, 4 mods activemcp{7.44} [Minecraft Coder Pack] (minecraft.jar) Unloaded->ConstructedFML{5.2.2.684} [Forge Mod Loader] (coremods) Unloaded->ConstructedForge{7.8.0.684} [Minecraft Forge] (coremods) Unloaded->ConstructedOpticalItems{1.0} [Optical Items] (Optical_Items_v1.0.zip) UnloadedProfiler Position: N/A (disabled)Is Modded: Definitely; Server brand changed to 'fml,forge'Type: Dedicated Server (map_server.txt)And here is my standard needed forge stuff:package Optical.Items; //Package directory/** Basic importing*/import java.io.File;import net.minecraft.block.Block;import net.minecraft.block.BlockFurnace;import net.minecraft.creativetab.CreativeTabs;import net.minecraft.entity.EnumCreatureType;import net.minecraft.item.EnumToolMaterial;import net.minecraft.item.Item;import net.minecraft.item.ItemFood;import net.minecraft.item.ItemStack;import net.minecraft.item.crafting.FurnaceRecipes;import net.minecraft.world.biome.BiomeGenBase;import net.minecraftforge.common.EnumHelper;import cpw.mods.fml.client.registry.RenderingRegistry;import cpw.mods.fml.common.Mod;import cpw.mods.fml.common.Mod.Init;import cpw.mods.fml.common.event.FMLInitializationEvent;import cpw.mods.fml.common.network.NetworkMod;import cpw.mods.fml.common.network.NetworkRegistry;import cpw.mods.fml.common.registry.EntityRegistry;import cpw.mods.fml.common.registry.GameRegistry;import cpw.mods.fml.common.registry.LanguageRegistry;import cpw.mods.fml.common.registry.GameRegistry;import cpw.mods.fml.common.Mod.Init;import cpw.mods.fml.common.Mod.Instance;import cpw.mods.fml.common.Mod.PostInit;import cpw.mods.fml.common.Mod.PreInit;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.network.NetworkMod;/** Basic needed forge stuff*/@Mod(modid="OpticalItems",name="Optical Items",version="1.0",acceptedMinecraftVersions="1.5.2")@NetworkMod(clientSideRequired=true,serverSideRequired= false)public class MainClass { Please help me ( There is more code but this is the standard code what forge needs )
  14. Yes i have no errors. This is my start line: And i starts up in Eclipse
  15. Hello modders I have a problem i finished my mod and it works pretty stable in Eclipse but if i put it in the normal minecraft launcher ( After i finished recompiling and Reobfusocate_Srg ) II tried everything but i get the same error. Please help me out of this problem.
×
×
  • Create New...

Important Information

By using this site, you agree to our Privacy Policy.