Jump to content

Enkey

Members
  • Posts

    58
  • Joined

  • Last visited

Posts posted by Enkey

  1. Thanks, that kinda worked, but it only downloaded CCL and ForgeMultipart

     

    I added this to build.gradle

    maven {
                name 'CB Repo'
                url "http://chickenbones.net/maven/"
            }

     

    compile "codechicken:CodeChickenLib:1.7.10-1.1.3.140:dev"
        compile "codechicken:CodeChickenLib:1.7.10-1.1.3.140:src"
        compile "codechicken:CodeChickenCore:1.7.10-1.0.7.46:dev"
        compile "codechicken:CodeChickenCore:1.7.10-1.0.7.46:src"
        compile "codechicken:NotEnoughItems:1.7.10-1.0.5.111:dev"
        compile "codechicken:ForgeMultipart:1.7.10-1.1.0.297:dev"
        compile "codechicken:ForgeMultipart:1.7.10-1.1.0.297:src"

     

    and even no errors occured during gradle dependency downloading

    D:\***\forge_1.7.10>gradlew --refresh-dependencies eclipse
    ****************************
    Powered By MCP:
    http://mcp.ocean-labs.de/
    Searge, ProfMobius, Fesh0r,
    R4wk, ZeuX, IngisKahn, bspkrs
    MCP Data version : unknown
    ****************************
    :eclipseClasspath
    Download http://files.minecraftforge.net/maven/codechicken/CodeChickenLib/1.7.10-1.1.3.140/CodeChickenLib-1.7.10-1.1.3.140-dev.jar
    Download http://files.minecraftforge.net/maven/codechicken/CodeChickenLib/1.7.10-1.1.3.140/CodeChickenLib-1.7.10-1.1.3.140-src.jar
    Download http://files.minecraftforge.net/maven/codechicken/ForgeMultipart/1.7.10-1.1.0.297/ForgeMultipart-1.7.10-1.1.0.297-dev.jar
    Download http://files.minecraftforge.net/maven/codechicken/ForgeMultipart/1.7.10-1.1.0.297/ForgeMultipart-1.7.10-1.1.0.297-src.jar
    :eclipseJdt
    :eclipseProject
    :eclipse
    
    BUILD SUCCESSFUL

  2. Okay I fixed it now, I didn't know that CCC won't download CCL automaticaly when it's not in /mods folder so I downloaded CCL manualy and added it the same way.

     

    Now I need to solve the second problem with the code. I don't know if I am doing it right, I just went trough Mekanism code to see how he's doing it. I tried to find some tutorial on it, but I only found tutorials for making custom microblocks, but I only need the normal ones (Cover, Panel, Slab, etc.)

  3. As I said I already tried that

     

    I also tried putting the dev jars in /lib folder and adding them as libraries, but then it crashed because it couldn't find the mods

     

     

    [19:06:00] [main/INFO]: [java.lang.Throwable$WrappedPrintStream:println:-1]: java.lang.NoClassDefFoundError: codechicken/lib/asm/CC_ClassWriter
    [19:06:00] [main/INFO]: [java.lang.Throwable$WrappedPrintStream:println:-1]: 	at codechicken.core.asm.MCPDeobfuscationTransformer$LoadPlugin.injectData(MCPDeobfuscationTransformer.java:57)
    Exception in thread "main" [19:06:00] [main/INFO]: [java.lang.Throwable$WrappedPrintStream:println:-1]: 	at cpw.mods.fml.relauncher.CoreModManager$FMLPluginWrapper.injectIntoClassLoader(CoreModManager.java:119)
    [19:06:00] [main/INFO]: [java.lang.Throwable$WrappedPrintStream:println:-1]: 	at net.minecraft.launchwrapper.Launch.launch(Launch.java:115)
    [19:06:00] [main/INFO]: [java.lang.Throwable$WrappedPrintStream:println:-1]: 	at net.minecraft.launchwrapper.Launch.main(Launch.java:28)
    [19:06:00] [main/INFO]: [java.lang.Throwable$WrappedPrintStream:println:-1]: 	at net.minecraftforge.gradle.GradleStartCommon.launch(Unknown Source)
    [19:06:00] [main/INFO]: [java.lang.Throwable$WrappedPrintStream:println:-1]: 	at GradleStart.main(Unknown Source)
    [19:06:00] [main/INFO]: [java.lang.Throwable$WrappedPrintStream:println:-1]: Caused by: java.lang.ClassNotFoundException: codechicken.lib.asm.CC_ClassWriter
    [19:06:00] [main/INFO]: [java.lang.Throwable$WrappedPrintStream:println:-1]: 	at net.minecraft.launchwrapper.LaunchClassLoader.findClass(LaunchClassLoader.java:191)
    [19:06:00] [main/INFO]: [java.lang.Throwable$WrappedPrintStream:println:-1]: 	at java.lang.ClassLoader.loadClass(Unknown Source)
    [19:06:00] [main/INFO]: [java.lang.Throwable$WrappedPrintStream:println:-1]: 	at java.lang.ClassLoader.loadClass(Unknown Source)
    [19:06:00] [main/INFO]: [java.lang.Throwable$WrappedPrintStream:println:-1]: 	... 6 more
    [19:06:00] [main/INFO]: [java.lang.Throwable$WrappedPrintStream:println:-1]: Caused by: java.lang.NullPointerException
    [19:06:00] [main/INFO]: [java.lang.Throwable$WrappedPrintStream:println:-1]: 	at net.minecraft.launchwrapper.LaunchClassLoader.findClass(LaunchClassLoader.java:182)
    [19:06:00] [main/INFO]: [java.lang.Throwable$WrappedPrintStream:println:-1]: 	... 8 more

     

    I've put it only in /lib and linked it as Library and it crashed like that. Not sure why is it crashing though, it should work even without the mods.

  4. Hey everyone,

     

    I'm making a simple mod which adds blocks and I want to make them cuttable into microblocks using Forge Multipart. From my research I found that all I need to do is register the blocks using MicroMaterialRegistry#registerMaterial, but I'm not sure if that is true.

     

    1. Problem [sOLVED] (CCL must be downloaded manualy)

    I can't make the needed mods (CodeChickenCore, ForgeMultipart) to work inside eclipse. I followed a tutorial and downloaded the dev and src jars and put the dev jars into folder /eclipse/mods/ and the src jars into /lib folder in eclipse. I ran the Client inside eclipse and the mods were there and it was working, but then I added the dev jars as libraries (Java Build Path > Libraries > Add JARs) so I can make the microblocks. I ran Client again and when it's loading mods it says that CodeChickenCore is duplicate ([Client thread/ERROR]: Found a duplicate mod CodeChickenCore at [minecraft.jar, minecraft.jar])

     

    I also tried putting the dev jars in /lib folder and adding them as libraries, but then it crashed because it couldn't find the mods

     

    [19:06:00] [main/INFO]: [java.lang.Throwable$WrappedPrintStream:println:-1]: java.lang.NoClassDefFoundError: codechicken/lib/asm/CC_ClassWriter
    [19:06:00] [main/INFO]: [java.lang.Throwable$WrappedPrintStream:println:-1]: 	at codechicken.core.asm.MCPDeobfuscationTransformer$LoadPlugin.injectData(MCPDeobfuscationTransformer.java:57)
    Exception in thread "main" [19:06:00] [main/INFO]: [java.lang.Throwable$WrappedPrintStream:println:-1]: 	at cpw.mods.fml.relauncher.CoreModManager$FMLPluginWrapper.injectIntoClassLoader(CoreModManager.java:119)
    [19:06:00] [main/INFO]: [java.lang.Throwable$WrappedPrintStream:println:-1]: 	at net.minecraft.launchwrapper.Launch.launch(Launch.java:115)
    [19:06:00] [main/INFO]: [java.lang.Throwable$WrappedPrintStream:println:-1]: 	at net.minecraft.launchwrapper.Launch.main(Launch.java:28)
    [19:06:00] [main/INFO]: [java.lang.Throwable$WrappedPrintStream:println:-1]: 	at net.minecraftforge.gradle.GradleStartCommon.launch(Unknown Source)
    [19:06:00] [main/INFO]: [java.lang.Throwable$WrappedPrintStream:println:-1]: 	at GradleStart.main(Unknown Source)
    [19:06:00] [main/INFO]: [java.lang.Throwable$WrappedPrintStream:println:-1]: Caused by: java.lang.ClassNotFoundException: codechicken.lib.asm.CC_ClassWriter
    [19:06:00] [main/INFO]: [java.lang.Throwable$WrappedPrintStream:println:-1]: 	at net.minecraft.launchwrapper.LaunchClassLoader.findClass(LaunchClassLoader.java:191)
    [19:06:00] [main/INFO]: [java.lang.Throwable$WrappedPrintStream:println:-1]: 	at java.lang.ClassLoader.loadClass(Unknown Source)
    [19:06:00] [main/INFO]: [java.lang.Throwable$WrappedPrintStream:println:-1]: 	at java.lang.ClassLoader.loadClass(Unknown Source)
    [19:06:00] [main/INFO]: [java.lang.Throwable$WrappedPrintStream:println:-1]: 	... 6 more
    [19:06:00] [main/INFO]: [java.lang.Throwable$WrappedPrintStream:println:-1]: Caused by: java.lang.NullPointerException
    [19:06:00] [main/INFO]: [java.lang.Throwable$WrappedPrintStream:println:-1]: 	at net.minecraft.launchwrapper.LaunchClassLoader.findClass(LaunchClassLoader.java:182)
    [19:06:00] [main/INFO]: [java.lang.Throwable$WrappedPrintStream:println:-1]: 	... 8 more

     

     

    2. Problem [sOLVED] (you have to register the materials in Init phase not PreInit)

    Because I couldn't try the code in eclipse I built my mod into JAR and put it in a modpack with the needed mods (CodeChickenCore, ForgeMultipart) and it crashed because of NullPointerException

     

    ---- Minecraft Crash Report ----
    // Sorry 
    
    Time: 23.7.15 12:09
    Description: Initializing game
    
    java.lang.NullPointerException: Initializing game
    at codechicken.microblock.MicroMaterialRegistry$.registerMaterial(MicroMaterialRegistry.scala:135)
    at codechicken.microblock.MicroMaterialRegistry.registerMaterial(MicroMaterialRegistry.scala)
    at cz.enkey.enkeysbuildingblocks.multipart.MultipartRegistry.init(MultipartRegistry.java:12)
    at cz.enkey.enkeysbuildingblocks.EnkeysBuildingBlocks.preInit(EnkeysBuildingBlocks.java:37)
    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 cpw.mods.fml.common.FMLModContainer.handleModStateEvent(FMLModContainer.java:532)
    at sun.reflect.GeneratedMethodAccessor3.invoke(Unknown Source)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
    at java.lang.reflect.Method.invoke(Unknown Source)
    at com.google.common.eventbus.EventSubscriber.handleEvent(EventSubscriber.java:74)
    at com.google.common.eventbus.SynchronizedEventSubscriber.handleEvent(SynchronizedEventSubscriber.java:47)
    at com.google.common.eventbus.EventBus.dispatch(EventBus.java:322)
    at com.google.common.eventbus.EventBus.dispatchQueuedEvents(EventBus.java:304)
    at com.google.common.eventbus.EventBus.post(EventBus.java:275)
    at cpw.mods.fml.common.LoadController.sendEventToModContainer(LoadController.java:212)
    at cpw.mods.fml.common.LoadController.propogateStateMessage(LoadController.java:190)
    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.EventSubscriber.handleEvent(EventSubscriber.java:74)
    at com.google.common.eventbus.SynchronizedEventSubscriber.handleEvent(SynchronizedEventSubscriber.java:47)
    at com.google.common.eventbus.EventBus.dispatch(EventBus.java:322)
    at com.google.common.eventbus.EventBus.dispatchQueuedEvents(EventBus.java:304)
    at com.google.common.eventbus.EventBus.post(EventBus.java:275)
    at cpw.mods.fml.common.LoadController.distributeStateMessage(LoadController.java:119)
    at cpw.mods.fml.common.Loader.preinitializeMods(Loader.java:556)
    at cpw.mods.fml.client.FMLClientHandler.beginMinecraftLoading(FMLClientHandler.java:243)
    at net.minecraft.client.Minecraft.func_71384_a(Minecraft.java:480)
    at net.minecraft.client.Minecraft.func_99999_d(Minecraft.java:878)
    at net.minecraft.client.main.Main.main(SourceFile:148)
    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 net.minecraft.launchwrapper.Launch.launch(Launch.java:135)
    at net.minecraft.launchwrapper.Launch.main(Launch.java:28)
    
    
    A detailed walkthrough of the error, its code path and all known details is as follows:
    ---------------------------------------------------------------------------------------
    
    -- Head --
    Stacktrace:
    at codechicken.microblock.MicroMaterialRegistry$.registerMaterial(MicroMaterialRegistry.scala:135)
    at codechicken.microblock.MicroMaterialRegistry.registerMaterial(MicroMaterialRegistry.scala)
    at cz.enkey.enkeysbuildingblocks.multipart.MultipartRegistry.init(MultipartRegistry.java:12)
    at cz.enkey.enkeysbuildingblocks.EnkeysBuildingBlocks.preInit(EnkeysBuildingBlocks.java:37)
    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 cpw.mods.fml.common.FMLModContainer.handleModStateEvent(FMLModContainer.java:532)
    at sun.reflect.GeneratedMethodAccessor3.invoke(Unknown Source)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
    at java.lang.reflect.Method.invoke(Unknown Source)
    at com.google.common.eventbus.EventSubscriber.handleEvent(EventSubscriber.java:74)
    at com.google.common.eventbus.SynchronizedEventSubscriber.handleEvent(SynchronizedEventSubscriber.java:47)
    at com.google.common.eventbus.EventBus.dispatch(EventBus.java:322)
    at com.google.common.eventbus.EventBus.dispatchQueuedEvents(EventBus.java:304)
    at com.google.common.eventbus.EventBus.post(EventBus.java:275)
    at cpw.mods.fml.common.LoadController.sendEventToModContainer(LoadController.java:212)
    at cpw.mods.fml.common.LoadController.propogateStateMessage(LoadController.java:190)
    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.EventSubscriber.handleEvent(EventSubscriber.java:74)
    at com.google.common.eventbus.SynchronizedEventSubscriber.handleEvent(SynchronizedEventSubscriber.java:47)
    at com.google.common.eventbus.EventBus.dispatch(EventBus.java:322)
    at com.google.common.eventbus.EventBus.dispatchQueuedEvents(EventBus.java:304)
    at com.google.common.eventbus.EventBus.post(EventBus.java:275)
    at cpw.mods.fml.common.LoadController.distributeStateMessage(LoadController.java:119)
    at cpw.mods.fml.common.Loader.preinitializeMods(Loader.java:556)
    at cpw.mods.fml.client.FMLClientHandler.beginMinecraftLoading(FMLClientHandler.java:243)
    at net.minecraft.client.Minecraft.func_71384_a(Minecraft.java:480)
    
    -- Initialization --
    Details:
    Stacktrace:
    at net.minecraft.client.Minecraft.func_99999_d(Minecraft.java:878)
    at net.minecraft.client.main.Main.main(SourceFile:148)
    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 net.minecraft.launchwrapper.Launch.launch(Launch.java:135)
    at net.minecraft.launchwrapper.Launch.main(Launch.java:28)
    
    -- System Details --
    Details:
    Minecraft Version: 1.7.10
    Operating System: Windows 7 (amd64) version 6.1
    Java Version: 1.8.0_25, Oracle Corporation
    Java VM Version: Java HotSpot(TM) 64-Bit Server VM (mixed mode), Oracle Corporation
    Memory: 318204720 bytes (303 MB) / 1094713344 bytes (1044 MB) up to 1908932608 bytes (1820 MB)
    JVM Flags: 3 total; -XX:HeapDumpPath=MojangTricksIntelDriversForPerformance_javaw.exe_minecraft.exe.heapdump -Xmx2048m -XX:MaxPermSize=256m
    AABB Pool Size: 0 (0 bytes; 0 MB) allocated, 0 (0 bytes; 0 MB) used
    IntCache: cache: 0, tcache: 0, allocated: 0, tallocated: 0
    FML: MCP v9.05 FML v7.10.99.99 Minecraft Forge 10.13.4.1448 74 mods loaded, 74 mods active
    States: 'U' = Unloaded 'L' = Loaded 'C' = Constructed 'H' = Pre-initialized 'I' = Initialized 'J' = Post-initialized 'A' = Available 'D' = Disabled 'E' = Errored
    UCH	mcp{9.05} [Minecraft Coder Pack] (minecraft.jar) 
    UCH	FML{7.10.99.99} [Forge Mod Loader] (modpack.jar) 
    UCH	Forge{10.13.4.1448} [Minecraft Forge] (modpack.jar) 
    UCH	appliedenergistics2-core{rv2-stable-10} [AppliedEnergistics2 Core] (minecraft.jar) 
    UCH	CodeChickenCore{1.0.7.46} [CodeChicken Core] (minecraft.jar) 
    UCH	NotEnoughItems{1.0.5.111} [Not Enough Items] (NotEnoughItems-1.7.10-1.0.5.111-universal.jar) 
    UCH	OpenComputers|Core{1.5.13.28} [OpenComputers (Core)] (minecraft.jar) 
    UCH	appliedenergistics2{rv2-stable-10} [Applied Energistics 2] (appliedenergistics2-rv2-stable-10.jar) 
    UCH	asielib{0.4.2} [asielib] (AsieLib-1.7.10-0.4.2.jar) 
    UCH	Baubles{1.0.1.10} [baubles] (Baubles-1.7.10-1.0.1.10.jar) 
    UCH	bdlib{1.9.0.94} [bD Lib] (bdlib-1.9.0.94-mc1.7.10.jar) 
    UCH	BiomesOPlenty{2.1.0} [biomes O' Plenty] (BiomesOPlenty-1.7.10-2.1.0.1364-universal.jar) 
    UCH	BuildCraft|Core{7.0.15} [buildCraft] (buildcraft-7.0.15.jar) 
    UCH	Forestry{3.6.2.19} [Forestry for Minecraft] (forestry_1.7.10-3.6.2.19.jar) 
    UCH	BinnieCore{2.0-pre14} [binnie Core] (binnie-mods-2.0-pre14.jar) 
    UCH	Botany{2.0-pre14} [botany] (binnie-mods-2.0-pre14.jar) 
    UCH	ExtraBees{2.0-pre14} [Extra Bees] (binnie-mods-2.0-pre14.jar) 
    UCH	ExtraTrees{2.0-pre14} [Extra Trees] (binnie-mods-2.0-pre14.jar) 
    UCH	Genetics{2.0-pre14} [Genetics] (binnie-mods-2.0-pre14.jar) 
    UCH	Botania{r1.7-201} [botania] (Botania r1.7-201.jar) 
    UCH	BuildCraft|Factory{7.0.15} [bC Factory] (buildcraft-7.0.15.jar) 
    UCH	BuildCraft|Silicon{7.0.15} [bC Silicon] (buildcraft-7.0.15.jar) 
    UCH	BuildCraft|Energy{7.0.15} [bC Energy] (buildcraft-7.0.15.jar) 
    UCH	BuildCraft|Builders{7.0.15} [bC Builders] (buildcraft-7.0.15.jar) 
    UCH	BuildCraft|Robotics{7.0.15} [bC Robotics] (buildcraft-7.0.15.jar) 
    UCH	BuildCraft|Transport{7.0.15} [bC Transport] (buildcraft-7.0.15.jar) 
    UCH	BuildCraft|Compat{7.0.9} [buildCraft Compat] (buildcraft-compat-7.0.9.jar) 
    UCH	ForgeMultipart{1.2.0.345} [Forge Multipart] (ForgeMultipart-1.7.10-1.2.0.345-universal.jar) 
    UCH	MrTJPCoreMod{1.1.0.27} [MrTJPCore] (MrTJPCore-1.7.10-1.1.0.27-universal.jar) 
    UCH	ProjRed|Core{4.7.0pre5.89} [ProjectRed Core] (ProjectRed-1.7.10-4.7.0pre5.89-Base.jar) 
    UCH	ProjRed|Transmission{4.7.0pre5.89} [ProjectRed Transmission] (ProjectRed-1.7.10-4.7.0pre5.89-Integration.jar) 
    UCH	OpenComputers{1.5.13.28} [OpenComputers] (OpenComputers-MC1.7.10-1.5.13.28-universal.jar) 
    UCH	Railcraft{9.6.1.0} [Railcraft] (Railcraft_1.7.10-9.6.1.0.jar) 
    UCH	Waila{1.5.10} [Waila] (Waila-1.5.10_1.7.10(1).jar) 
    UCH	Mekanism{8.1.5} [Mekanism] (Mekanism-1.7.10-8.1.5.246.jar) 
    UCH	computronics{1.5.5} [Computronics] (Computronics-1.7.10-1.5.5.jar) 
    UCE	ebb{0.1} [Enkey's building blocks] (ebb-0.1.jar) 
    UCH	Eln{50} [Electrical Age] (ElectricalAge_BETA-1.10_r50.jar) 
    UCH	endercore{1.7.10-0.0.1.12_alpha} [EnderCore] (EnderCore-1.7.10-0.0.1.12_alpha.jar) 
    UCH	extracells{2.2.73} [Extra Cells 2] (ExtraCells-1.7.10-2.2.73b129.jar) 
    UCH	gendustry{1.5.2.107} [GenDustry] (gendustry-1.5.2.107-mc1.7.10.jar) 
    UCH	LogisticsPipes{0.9.1.15} [Logistics Pipes] (logisticspipes-0.9.1.15.jar) 
    UCH	Mantle{1.7.10-0.3.2.jenkins184} [Mantle] (Mantle-1.7.10-0.3.2.jar) 
    UCH	masssound{1.1.1} [MassSound] (MassSound-1.7.10-1.1.1.jar) 
    UCH	MekanismGenerators{8.1.5} [MekanismGenerators] (MekanismGenerators-1.7.10-8.1.5.246.jar) 
    UCH	MekanismTools{8.1.5} [MekanismTools] (MekanismTools-1.7.10-8.1.5.246.jar) 
    UCH	MineTweaker3{3.0.9B} [MineTweaker 3] (MineTweaker3-1.7.10-3.0.9C.jar) 
    UCH	NEIAddons{1.12.10.33} [NEI Addons] (neiaddons-1.12.10.33-mc1.7.10.jar) 
    UCH	NEIAddons|AppEng{1.12.10.33} [NEI Addons: Applied Energistics 2] (neiaddons-1.12.10.33-mc1.7.10.jar) 
    UCH	NEIAddons|Botany{1.12.10.33} [NEI Addons: Botany] (neiaddons-1.12.10.33-mc1.7.10.jar) 
    UCH	NEIAddons|Forestry{1.12.10.33} [NEI Addons: Forestry] (neiaddons-1.12.10.33-mc1.7.10.jar) 
    UCH	NEIAddons|CraftingTables{1.12.10.33} [NEI Addons: Crafting Tables] (neiaddons-1.12.10.33-mc1.7.10.jar) 
    UCH	NEIAddons|ExNihilo{1.12.10.33} [NEI Addons: Ex Nihilo] (neiaddons-1.12.10.33-mc1.7.10.jar) 
    UCH	neiintegration{1.0.11} [NEI Integration] (NEIIntegration-MC1.7.10-1.0.11.jar) 
    UCH	openglasses{1.0.46} [OC Glasses] (OpenGlasses-1.0.46.jar) 
    UCH	openprinter{0.1.0.102} [OpenPrinter] (OpenPrinter-MC1.7.10-OC1.4-0.1.0.102.jar) 
    UCH	ProjectBlue{1.1.4} [Project Blue] (ProjectBlue-1.1.4-mc1.7.10.jar) 
    UCH	ProjRed|Transportation{4.7.0pre5.89} [ProjectRed Transportation] (ProjectRed-1.7.10-4.7.0pre5.89-Mechanical.jar) 
    UCH	ProjRed|Exploration{4.7.0pre5.89} [ProjectRed Exploration] (ProjectRed-1.7.10-4.7.0pre5.89-World.jar) 
    UCH	TConstruct{1.7.10-1.8.5.build957} [Tinkers' Construct] (TConstruct-1.7.10-1.8.5.jar) 
    UCH	ProjRed|Compatibility{4.7.0pre5.89} [ProjectRed Compatibility] (ProjectRed-1.7.10-4.7.0pre5.89-Compat.jar) 
    UCH	ProjRed|Integration{4.7.0pre5.89} [ProjectRed Integration] (ProjectRed-1.7.10-4.7.0pre5.89-Integration.jar) 
    UCH	ProjRed|Fabrication{4.7.0pre5.89} [ProjectRed Fabrication] (ProjectRed-1.7.10-4.7.0pre5.89-Fabrication.jar) 
    UCH	ProjRed|Illumination{4.7.0pre5.89} [ProjectRed Illumination] (ProjectRed-1.7.10-4.7.0pre5.89-Lighting.jar) 
    UCH	ProjRed|Expansion{4.7.0pre5.89} [ProjectRed Expansion] (ProjectRed-1.7.10-4.7.0pre5.89-Mechanical.jar) 
    UCH	StevesCarts{2.0.0.b18} [steve's Carts 2] (StevesCarts2.0.0.b18.jar) 
    UCH	StevesFactoryManager{A93} [steve's Factory Manager] (StevesFactoryManagerA93.jar) 
    UCH	wailaplugins{MC1.7.10-0.1.0-16} [WAILA Plugins] (WAILAPlugins-MC1.7.10-0.1.0-16.jar) 
    UCH	wawla{1.3.1} [What Are We Looking At] (Wawla-1.3.1-1.7.10.jar) 
    UCH	McMultipart{1.2.0.345} [Minecraft Multipart Plugin] (ForgeMultipart-1.7.10-1.2.0.345-universal.jar) 
    UCH	ForgeRelocation{0.0.1.3} [ForgeRelocation] (ForgeRelocation-1.7.10-0.0.1.3-universal.jar) 
    UCH	MCFrames{1.0} [MCFrames] (ForgeRelocation-1.7.10-0.0.1.3-universal.jar) 
    UCH	RelocationFMP{0.0.1.2} [RelocationFMP] (ForgeRelocationFMP-1.7.10-0.0.1.2-universal.jar) 
    UCH	ForgeMicroblock{1.2.0.345} [Forge Microblocks] (ForgeMultipart-1.7.10-1.2.0.345-universal.jar) 
    GL info: ' Vendor: 'ATI Technologies Inc.' Version: '4.5.13397 Compatibility Profile Context 15.200.1046.0' Renderer: 'AMD Radeon HD 5800 Series'
    AE2 Version: stable rv2-stable-10 for Forge 10.13.2.1291
    Mantle Environment: Environment healthy.
    TConstruct Environment: Environment healthy.
    List of loaded APIs: 
    	* appliedenergistics2|API (rv2) from appliedenergistics2-rv2-stable-10.jar
    	* asielibAPI (1.1) from AsieLib-1.7.10-0.4.2.jar
    	* asielibAPI|chat (1.0) from AsieLib-1.7.10-0.4.2.jar
    	* asielibAPI|tile (1.0) from AsieLib-1.7.10-0.4.2.jar
    	* asielibAPI|tool (1.1) from AsieLib-1.7.10-0.4.2.jar
    	* Baubles|API (1.0.1.10) from Baubles-1.7.10-1.0.1.10.jar
    	* BiomesOPlentyAPI (1.0.0) from BiomesOPlenty-1.7.10-2.1.0.1364-universal.jar
    	* BotaniaAPI (56) from Botania r1.7-201.jar
    	* BuildCraftAPI|blocks (1.0) from buildcraft-7.0.15.jar
    	* BuildCraftAPI|blueprints (1.3) from buildcraft-7.0.15.jar
    	* BuildCraftAPI|boards (2.0) from buildcraft-7.0.15.jar
    	* BuildCraftAPI|core (1.0) from buildcraft-7.0.15.jar
    	* BuildCraftAPI|crops (1.1) from buildcraft-7.0.15.jar
    	* BuildCraftAPI|events (1.0) from buildcraft-7.0.15.jar
    	* BuildCraftAPI|facades (1.1) from buildcraft-7.0.15.jar
    	* BuildCraftAPI|filler (4.0) from buildcraft-7.0.15.jar
    	* BuildCraftAPI|fuels (2.0) from buildcraft-7.0.15.jar
    	* BuildCraftAPI|gates (4.1) from buildcraft-7.0.15.jar
    	* BuildCraftAPI|items (1.1) from buildcraft-7.0.15.jar
    	* BuildCraftAPI|library (2.0) from buildcraft-7.0.15.jar
    	* BuildCraftAPI|power (1.3) from buildcraft-7.0.15.jar
    	* BuildCraftAPI|recipes (3.0) from buildcraft-7.0.15.jar
    	* BuildCraftAPI|robotics (2.1) from buildcraft-7.0.15.jar
    	* BuildCraftAPI|statements (1.0) from Railcraft_1.7.10-9.6.1.0.jar
    	* BuildCraftAPI|tablet (1.0) from buildcraft-7.0.15.jar
    	* BuildCraftAPI|tiles (1.1) from Railcraft_1.7.10-9.6.1.0.jar
    	* BuildCraftAPI|tools (1.0) from forestry_1.7.10-3.6.2.19.jar
    	* BuildCraftAPI|transport (4.0) from Railcraft_1.7.10-9.6.1.0.jar
    	* CoFHAPI (1.7.10R1.0.2) from ElectricalAge_BETA-1.10_r50.jar
    	* CoFHAPI|energy (1.7.10R1.0.2) from ElectricalAge_BETA-1.10_r50.jar
    	* CoFHAPI|inventory (1.7.10R1.0.1) from buildcraft-compat-7.0.9.jar
    	* CoFHAPI|transport (1.7.10R1.0.1) from buildcraft-compat-7.0.9.jar
    	* computronicsAPI (1.3) from Computronics-1.7.10-1.5.5.jar
    	* computronicsAPI|chat (1.3) from Computronics-1.7.10-1.5.5.jar
    	* computronicsAPI|multiperipheral (1.1) from Computronics-1.7.10-1.5.5.jar
    	* computronicsAPI|tape (1.0) from Computronics-1.7.10-1.5.5.jar
    	* ForestryAPI|apiculture (3.5.0) from forestry_1.7.10-3.6.2.19.jar
    	* ForestryAPI|arboriculture (2.3.0) from forestry_1.7.10-3.6.2.19.jar
    	* ForestryAPI|circuits (2.0.0) from forestry_1.7.10-3.6.2.19.jar
    	* ForestryAPI|core (3.2.0) from forestry_1.7.10-3.6.2.19.jar
    	* ForestryAPI|farming (1.1.0) from forestry_1.7.10-3.6.2.19.jar
    	* ForestryAPI|food (1.1.0) from forestry_1.7.10-3.6.2.19.jar
    	* ForestryAPI|fuels (2.0.1) from forestry_1.7.10-3.6.2.19.jar
    	* ForestryAPI|genetics (3.3.0) from forestry_1.7.10-3.6.2.19.jar
    	* ForestryAPI|hives (4.1.0) from forestry_1.7.10-3.6.2.19.jar
    	* ForestryAPI|lepidopterology (1.1) from forestry_1.7.10-3.6.2.19.jar
    	* ForestryAPI|mail (3.0.0) from forestry_1.7.10-3.6.2.19.jar
    	* ForestryAPI|recipes (3.1.0) from forestry_1.7.10-3.6.2.19.jar
    	* ForestryAPI|storage (3.0.0) from forestry_1.7.10-3.6.2.19.jar
    	* ForestryAPI|world (1.1.0) from forestry_1.7.10-3.6.2.19.jar
    	* ForgeRelocation|API (0.0.1.3) from ForgeRelocation-1.7.10-0.0.1.3-universal.jar
    	* gendustryAPI (2.1.0) from gendustry-1.5.2.107-mc1.7.10.jar
    	* IC2API (1.0) from Railcraft_1.7.10-9.6.1.0.jar
    	* MekanismAPI|core (8.0.0) from Mekanism-1.7.10-8.1.5.246.jar
    	* MekanismAPI|energy (8.0.0) from Mekanism-1.7.10-8.1.5.246.jar
    	* MekanismAPI|gas (8.0.0) from Mekanism-1.7.10-8.1.5.246.jar
    	* MekanismAPI|infuse (8.0.0) from Mekanism-1.7.10-8.1.5.246.jar
    	* MekanismAPI|laser (8.0.0) from Mekanism-1.7.10-8.1.5.246.jar
    	* MekanismAPI|reactor (8.0.0) from Mekanism-1.7.10-8.1.5.246.jar
    	* MekanismAPI|recipe (8.0.0) from Mekanism-1.7.10-8.1.5.246.jar
    	* MekanismAPI|transmitter (8.0.0) from Mekanism-1.7.10-8.1.5.246.jar
    	* MekanismAPI|util (8.0.0) from Mekanism-1.7.10-8.1.5.246.jar
    	* OpenComputersAPI|Component (5.5.2) from OpenComputers-MC1.7.10-1.5.13.28-universal.jar
    	* OpenComputersAPI|Core (5.5.2) from OpenComputers-MC1.7.10-1.5.13.28-universal.jar
    	* OpenComputersAPI|Driver (5.5.2) from OpenComputers-MC1.7.10-1.5.13.28-universal.jar
    	* OpenComputersAPI|Driver|Item (5.5.2) from OpenComputers-MC1.7.10-1.5.13.28-universal.jar
    	* OpenComputersAPI|Event (5.5.2) from OpenComputers-MC1.7.10-1.5.13.28-universal.jar
    	* OpenComputersAPI|FileSystem (5.5.2) from OpenComputers-MC1.7.10-1.5.13.28-universal.jar
    	* OpenComputersAPI|Internal (5.5.2) from OpenComputers-MC1.7.10-1.5.13.28-universal.jar
    	* OpenComputersAPI|Machine (5.5.2) from OpenComputers-MC1.7.10-1.5.13.28-universal.jar
    	* OpenComputersAPI|Manual (5.5.2) from OpenComputers-MC1.7.10-1.5.13.28-universal.jar
    	* OpenComputersAPI|Network (5.5.2) from OpenComputers-MC1.7.10-1.5.13.28-universal.jar
    	* OpenComputersAPI|Prefab (5.5.2) from OpenComputers-MC1.7.10-1.5.13.28-universal.jar
    	* RailcraftAPI|bore (1.0.0) from Railcraft_1.7.10-9.6.1.0.jar
    	* RailcraftAPI|carts (1.3.1) from Railcraft_1.7.10-9.6.1.0.jar
    	* RailcraftAPI|core (1.3.0) from Railcraft_1.7.10-9.6.1.0.jar
    	* RailcraftAPI|crafting (1.0.0) from Railcraft_1.7.10-9.6.1.0.jar
    	* RailcraftAPI|electricity (1.6.0) from Railcraft_1.7.10-9.6.1.0.jar
    	* RailcraftAPI|events (1.0.0) from Railcraft_1.7.10-9.6.1.0.jar
    	* RailcraftAPI|fuel (1.0.0) from Railcraft_1.7.10-9.6.1.0.jar
    	* RailcraftAPI|helpers (1.1.0) from Railcraft_1.7.10-9.6.1.0.jar
    	* RailcraftAPI|items (1.0.0) from Railcraft_1.7.10-9.6.1.0.jar
    	* RailcraftAPI|locomotive (1.0.1) from Railcraft_1.7.10-9.6.1.0.jar
    	* RailcraftAPI|signals (1.3.0) from Railcraft_1.7.10-9.6.1.0.jar
    	* RailcraftAPI|tracks (2.0.0) from Railcraft_1.7.10-9.6.1.0.jar
    	* Thaumcraft|API (4.2.2.0) from Railcraft_1.7.10-9.6.1.0.jar
    	* WailaAPI (1.2) from Waila-1.5.10_1.7.10(1).jar
    Launched Version: 1.7.10-Forge10.13.4.1448-1.7.10
    LWJGL: 2.9.1
    OpenGL: AMD Radeon HD 5800 Series GL version 4.5.13397 Compatibility Profile Context 15.200.1046.0, ATI Technologies Inc.
    GL Caps: Using GL 1.3 multitexturing.
    Using framebuffer objects because OpenGL 3.0 is supported and separate blending is supported.
    Anisotropic filtering is supported and maximum anisotropy is 16.
    Shaders are available because OpenGL 2.1 is supported.
    
    Is Modded: Definitely; Client brand changed to 'fml,forge'
    Type: Client (map_client.txt)
    Resource Packs: []
    Current Language: English (US)
    Profiler Position: N/A (disabled)
    Vec3 Pool Size: 0 (0 bytes; 0 MB) allocated, 0 (0 bytes; 0 MB) used
    Anisotropic Filtering: On (16)

     

     

    I tried to make it so it doesn't require the ForgeMultipart, but work with it when it's installed, and that is working well. Without any other mods it works great, but with ForgeMultipart it crashes.

     

    Here is the important code:

     

    Main Mod class:

     

    package cz.enkey.enkeysbuildingblocks;
    
    import org.apache.logging.log4j.Logger;
    
    import net.minecraft.init.Blocks;
    import cpw.mods.fml.common.Loader;
    import cpw.mods.fml.common.Mod;
    import cpw.mods.fml.common.Mod.EventHandler;
    import cpw.mods.fml.common.event.FMLInitializationEvent;
    import cpw.mods.fml.common.event.FMLPostInitializationEvent;
    import cpw.mods.fml.common.event.FMLPreInitializationEvent;
    import cz.enkey.enkeysbuildingblocks.init.BlocksInit;
    import cz.enkey.enkeysbuildingblocks.utils.MultipartInterface;
    
    @Mod(modid = EnkeysBuildingBlocks.MODID, name = EnkeysBuildingBlocks.NAME, version = EnkeysBuildingBlocks.VERSION, dependencies="after:ForgeMultipart")
    public class EnkeysBuildingBlocks
    {
        public static final String MODID = "ebb";
        public static final String VERSION = "0.1";
        public static final String NAME = "Enkey's building blocks";
        
        @Mod.Instance("EnkeysBuildingBlocks")
        public static EnkeysBuildingBlocks instance;
        
        public static Logger logger;
    
    @Mod.EventHandler
    public void preInit(FMLPreInitializationEvent event) {
    	logger = event.getModLog();
    
    	logger.info("Loading " + EnkeysBuildingBlocks.NAME + " version " + EnkeysBuildingBlocks.VERSION + ".");
    
    	BlocksInit.init();
    
    	if (Loader.isModLoaded("ForgeMultipart")){
    		try {
    			Class.forName("cz.enkey.enkeysbuildingblocks.multipart.MultipartRegistry").asSubclass(MultipartInterface.class).newInstance().init();
    		} catch (InstantiationException e) {
    			logger.error("Could not integrate Forge Multipart mod!");
    			e.printStackTrace();
    		} catch (IllegalAccessException e) {
    			logger.error("Could not integrate Forge Multipart mod!");
    			e.printStackTrace();
    		} catch (ClassNotFoundException e) {
    			logger.error("Could not integrate Forge Multipart mod!");
    			e.printStackTrace();
    		};
    	}
    
    	logger.info(EnkeysBuildingBlocks.NAME + " version " + EnkeysBuildingBlocks.VERSION + " loaded Phase 1 successfully!");
    }
        
        @EventHandler
    public void init(FMLInitializationEvent event) {
    	logger.info("Loading " + EnkeysBuildingBlocks.NAME + " version " + EnkeysBuildingBlocks.VERSION + " Phase 2.");
    
    	logger.info(EnkeysBuildingBlocks.NAME + " version " + EnkeysBuildingBlocks.VERSION + " loaded Phase 2 successfully!");
    }
    
    @Mod.EventHandler
    public void postInit(FMLPostInitializationEvent event) {
    	logger.info("Loading " + EnkeysBuildingBlocks.NAME + " version " + EnkeysBuildingBlocks.VERSION + " Phase 3.");
    
    	logger.info(EnkeysBuildingBlocks.NAME + " version " + EnkeysBuildingBlocks.VERSION + " loaded Phase 3 successfully!");
    }
    }
    

     

     

    BlocksInit.java

     

    package cz.enkey.enkeysbuildingblocks.init;
    
    import cz.enkey.enkeysbuildingblocks.blocks.BrickWall;
    import cz.enkey.enkeysbuildingblocks.blocks.Concrete;
    import cz.enkey.enkeysbuildingblocks.blocks.MetalSheetWall;
    import cz.enkey.enkeysbuildingblocks.utils.RegUtils;
    import net.minecraft.block.Block;
    import net.minecraft.block.material.Material;
    
    public class BlocksInit {
    public static Block brick_wall;
    public static Block metal_sheet_wall;
    public static Block concrete;
    
    public static void init() {
    	brick_wall = new BrickWall(); RegUtils.reg(brick_wall);
    	metal_sheet_wall= new MetalSheetWall(); RegUtils.reg(metal_sheet_wall);
    	concrete = new Concrete(); RegUtils.reg(concrete);
    }
    }
    

     

     

    MultipartRegistry.java

     

    package cz.enkey.enkeysbuildingblocks.multipart;
    
    import codechicken.microblock.BlockMicroMaterial;
    import codechicken.microblock.MicroMaterialRegistry;
    import cz.enkey.enkeysbuildingblocks.init.BlocksInit;
    import cz.enkey.enkeysbuildingblocks.utils.MultipartInterface;
    
    public class MultipartRegistry implements MultipartInterface {
    
    @Override
    public void init(){
    	MicroMaterialRegistry.registerMaterial(new BlockMicroMaterial(BlocksInit.brick_wall, 0), BlockMicroMaterial.materialKey(BlocksInit.brick_wall)); // here it crashes with NullPointerException (maybe brick_wall is null, but I am initializing it before this)
    	MicroMaterialRegistry.registerMaterial(new BlockMicroMaterial(BlocksInit.metal_sheet_wall,0), BlockMicroMaterial.materialKey(BlocksInit.metal_sheet_wall));
    	MicroMaterialRegistry.registerMaterial(new BlockMicroMaterial(BlocksInit.concrete,0), BlockMicroMaterial.materialKey(BlocksInit.concrete));
    }
    }
    

     

     

    Any help is appriciated

     

    Enkey

  5. [shadow=black,right]Are you tired of rendering each face of a cube separately when using Tessellator?

    Than use EasyTessellator!

    [/shadow]

     

    Made for 1.6.4, but probable works on earlier versions, too (let me know if you try it on some other version)

     

    What does it do?

    It renders all six sides of a cube with some parameters you give it with just one command!

    How to use the command:

    The command:

     

    void renderCube(double x, double y, double z, int xDim, int yDim, int zDim, int offsetU, int offsetV, Icon icon, int flag, int textureWidth, int textureHeight)

     

    Parameters:

    x - x position of the block in the world + position of the cube in the block (eg. x + 0.25 means that the cube would be offset by 4 pixels on x axis)

    y - same as x parameter, but for y axis

    z - same as x parameter, but for z axis

    xDim - dimension of the cube on x axis (in pixels) (means how big the cube will be)

    yDim - dimension of the cube on y axis (in pixels) (means how big the cube will be)

    zDim - dimension of the cube on z axis (in pixels) (means how big the cube will be)

    offsetU - horizontal texture offset (in pixels)

    offsetV - vertical texture offset (in pixels)

    icon - texture to use to render the cube

    flags - changes how the texture will be used (more information below)

    textureWidth - the width of the texture (in pixels)

    textureHeight - the height of the texture (in pixels)

     

    If you are using default 16x16 texture you don't have to give the textureWidth and textureHeight parameters! ;)

     

    Explanation of offsetU and offsetV:

    5si6ceR.png

    Img 1 (how it looks in some png texture file)

     

    Flags:

    0 - all sides with same texture (see Img 1 above)

    1 - 1 texture for top and bottom and 1 texture for sides (like bookshelf)

    YLuYVkb.png

    Img 2 (the height of the top & bottom texture have to be same as zDim and the blue one as yDim)

     

    2 - uses different texture for each side and when you have rotatable block you can use 3, 4 ,5 flags (rotates textures counterclockwise), but you have to change the position and dimensions of the cube yourself.

    cj2EEpn.png

    Img 3 - this is how it is taking the textures from the file

     

    If you are rendering item the x,y,z are gonna be 0.

     

    How to use:

    1. Download (below)

    2. Put it somewhere in your src folder

    3. When rendering block, item or something with tessellator, use EasyTess.renderCube(....); (You can of course render more cubes in 1 block)

    4. Done

     

    Download:

    https://github.com/EnkeyMC/EasyTessellator/releases (green button called "EasyTess.java")

     

    GitHub Repository:

    https://github.com/EnkeyMC/EasyTessellator

     

    If you found some bug, have a suggestion or some problem just reply to this post!

     

    Author: Enkey (in-game EnkeyMC)

  6. Hi

     

    Rendering in inventory doesn't use block brightness settings, it uses "normals" instead.  See RenderBlocks.renderBlockAsItem

    eg

                    tessellator.startDrawingQuads();
                    tessellator.setNormal(0.0F, -1.0F, 0.0F);
                    this.renderFaceYNeg(par1Block, 0.0D, 0.0D, 0.0D, this.getBlockIconFromSide(par1Block, 0));
                    tessellator.draw();
                    tessellator.startDrawingQuads();
                    tessellator.setNormal(0.0F, 1.0F, 0.0F);
                    this.renderFaceYPos(par1Block, 0.0D, 0.0D, 0.0D, this.getBlockIconFromSide(par1Block, 1));
                    tessellator.draw();
                    tessellator.startDrawingQuads();
                    tessellator.setNormal(0.0F, 0.0F, -1.0F);
                    this.renderFaceZNeg(par1Block, 0.0D, 0.0D, 0.0D, this.getBlockIconFromSide(par1Block, 2));
                    tessellator.draw();
                    tessellator.startDrawingQuads();
                    tessellator.setNormal(0.0F, 0.0F, 1.0F);
                    this.renderFaceZPos(par1Block, 0.0D, 0.0D, 0.0D, this.getBlockIconFromSide(par1Block, 3));
                    tessellator.draw();
                    tessellator.startDrawingQuads();
                    tessellator.setNormal(-1.0F, 0.0F, 0.0F);
                    this.renderFaceXNeg(par1Block, 0.0D, 0.0D, 0.0D, this.getBlockIconFromSide(par1Block, 4));
                    tessellator.draw();
                    tessellator.startDrawingQuads();
                    tessellator.setNormal(1.0F, 0.0F, 0.0F);
                    this.renderFaceXPos(par1Block, 0.0D, 0.0D, 0.0D, this.getBlockIconFromSide(par1Block, 5));
                    tessellator.draw();
    

    see also this link at the end of the page

    http://greyminecraftcoder.blogspot.com.au/2013/09/custom-item-rendering-using.html

     

    -TGG

     

    -TGG

     

    Thanks that worked! :)

  7. Hello guys,

     

    I have a small problem. When I am rendering my block in inventory it's darker then when it's placed:

     

    9i6E1vi.png

     

    I tried to use tessellator.setBrightness(...); , but it was even darker no matter how big the number was. Can you tell me what range of numbers the brightness has? Or am I doing something else wrong?

     

    Renderer class:

    package morelights.renderers;
    
    import org.lwjgl.opengl.GL11;
    
    import morelights.lib.Pix;
    import morelights.proxy.ClientProxy;
    import net.minecraft.block.Block;
    import net.minecraft.client.renderer.RenderBlocks;
    import net.minecraft.client.renderer.Tessellator;
    import net.minecraft.util.Icon;
    import net.minecraft.world.IBlockAccess;
    import cpw.mods.fml.client.registry.ISimpleBlockRenderingHandler;
    
    public class ModernDecLampRenderer implements ISimpleBlockRenderingHandler {
    
    @Override
    public void renderInventoryBlock(Block block, int metadata, int modelID,
    		RenderBlocks renderer) {
    	Tessellator tes = Tessellator.instance;
    
        tes.startDrawingQuads();
        
        tes.addTranslation(-0.5F, -0.3F, -0.5F);
        //tes.setBrightness(16);
    
    	int x = 0;
    	int y = 0;
    	int z = 0;
    
    	Icon icon = block.getIcon(0, 0);
    
    	double minU = icon.getMinU();
    	double maxU = icon.getMaxU();
    	double minV = icon.getMinV();
    	double maxV = icon.getMaxV();
    	double p = (maxU - minU) / 32;
    	double pv = (maxV - minV) / 32;
    
    	//STAND
    	this.renderPosZStand(tes, x, y, z, minU, maxU, minV, maxV, p, pv);
    	this.renderNegZStand(tes, x, y, z, minU, maxU, minV, maxV, p, pv);
    	this.renderPosXStand(tes, x, y, z, minU, maxU, minV, maxV, p, pv);
    	this.renderNegXStand(tes, x, y, z, minU, maxU, minV, maxV, p, pv);
    	this.rednerTopStand(tes, x, y, z, minU, maxU, minV, maxV, p, pv);
    
    	//STAND2
    	this.renderPosZStand2(tes, x, y, z, minU, minV, p, pv);
    	this.renderNegZStand2(tes, x, y, z, minU, minV, p, pv);
    	this.renderPosXStand2(tes, x, y, z, minU, minV, p, pv);
    	this.renderNegXStand2(tes, x, y, z, minU, minV, p, pv);
    
    	//LIGHT
    	this.renderPosZLight(tes, x, y, z, minU, minV, p, pv);
    	this.renderNegZLight(tes, x, y, z, minU, minV, p, pv);
    	this.renderPosXLight(tes, x, y, z, minU, minV, p, pv);
    	this.renderNegXLight(tes, x, y, z, minU, minV, p, pv);
    	this.renderTopLight(tes, x, y, z, minU, minV, p, pv);
    	this.renderBottomLight(tes, x, y, z, minU, minV, p, pv);
    
    	tes.addTranslation(0.5F, 0.3F, 0.5F);
    
        tes.draw();
    }
    
    @Override
    public boolean renderWorldBlock(IBlockAccess world, int x, int y, int z, Block block, int modelId, RenderBlocks renderer) {
    
    	Tessellator tes = Tessellator.instance;
    	int lightValue = block.getMixedBrightnessForBlock(world, x, y, z);
    	tes.setBrightness(lightValue);
    	tes.setColorOpaque_F(1.0F, 1.0F, 1.0F);
    
    	Icon icon = block.getIcon(0, 0);
    
    	double minU = icon.getMinU();
    	double maxU = icon.getMaxU();
    	double minV = icon.getMinV();
    	double maxV = icon.getMaxV();
    	double p = (maxU - minU) / 32;
    	double pv = (maxV - minV) / 32;
    
    	//STAND
    	this.renderPosZStand(tes, x, y, z, minU, maxU, minV, maxV, p, pv);
    	this.renderNegZStand(tes, x, y, z, minU, maxU, minV, maxV, p, pv);
    	this.renderPosXStand(tes, x, y, z, minU, maxU, minV, maxV, p, pv);
    	this.renderNegXStand(tes, x, y, z, minU, maxU, minV, maxV, p, pv);
    	this.rednerTopStand(tes, x, y, z, minU, maxU, minV, maxV, p, pv);
    
    	//STAND2
    	this.renderPosZStand2(tes, x, y, z, minU, minV, p, pv);
    	this.renderNegZStand2(tes, x, y, z, minU, minV, p, pv);
    	this.renderPosXStand2(tes, x, y, z, minU, minV, p, pv);
    	this.renderNegXStand2(tes, x, y, z, minU, minV, p, pv);
    
    	//LIGHT
    	this.renderPosZLight(tes, x, y, z, minU, minV, p, pv);
    	this.renderNegZLight(tes, x, y, z, minU, minV, p, pv);
    	this.renderPosXLight(tes, x, y, z, minU, minV, p, pv);
    	this.renderNegXLight(tes, x, y, z, minU, minV, p, pv);
    	this.renderTopLight(tes, x, y, z, minU, minV, p, pv);
    	this.renderBottomLight(tes, x, y, z, minU, minV, p, pv);
    
    
    	return true;
    }
    
    private void renderBottomLight(Tessellator tes, int x, int y, int z,
    		double minU, double minV, double p, double pv) {
    	double X = x + Pix.FOUR + (Pix.ONE/2);
    	double Z = z + Pix.FOUR + (Pix.ONE/2);
    	double Y = y + Pix.FIVE;
    	minU += 21*p;
    	minV += 16*pv;
    	double maxU = minU + 7*p;
    	double maxV = minV + 7*pv;
    	tes.addVertexWithUV(X, Y, Z, minU, minV);
    	tes.addVertexWithUV(X + Pix.SEVEN, Y, Z, maxU, minV);
    	tes.addVertexWithUV(X + Pix.SEVEN, Y, Z + Pix.SEVEN, maxU, maxV);
    	tes.addVertexWithUV(X, Y, Z + Pix.SEVEN, minU, maxV);
    }
    
    private void renderTopLight(Tessellator tes, int x, int y, int z,
    		double minU, double minV, double p, double pv) {
    	double X = x + Pix.FOUR + (Pix.ONE/2);
    	double Z = z + Pix.FOUR + (Pix.ONE/2);
    	double Y = y + Pix.TWELVE;
    	minV += 16*pv;
    	double maxU = minU + 7*p;
    	double maxV = minV + 7*pv;
    	tes.addVertexWithUV(X, Y, Z + Pix.SEVEN, minU, maxV);
    	tes.addVertexWithUV(X + Pix.SEVEN, Y, Z + Pix.SEVEN, maxU, maxV);
    	tes.addVertexWithUV(X + Pix.SEVEN, Y, Z, maxU, minV);
    	tes.addVertexWithUV(X, Y, Z, minU, minV);
    }
    
    private void renderNegXLight(Tessellator tes, int x, int y, int z,
    		double minU, double minV, double p, double pv) {
    	double X = x + Pix.ELEVEN + (Pix.ONE/2);
    	double Y = y + Pix.FIVE;
    	double Z = z + Pix.ELEVEN + (Pix.ONE/2);
    	minU += 14*p;
    	minV += 17*pv;
    	double maxU = minU + 7*p;
    	double maxV = minV + 7*pv;
    	tes.addVertexWithUV(X, Y, Z - Pix.SEVEN, maxU, minV);
    	tes.addVertexWithUV(X, Y + Pix.SEVEN, Z - Pix.SEVEN, maxU, maxV);
    	tes.addVertexWithUV(X, Y + Pix.SEVEN, Z, minU, maxV);
    	tes.addVertexWithUV(X, Y, Z, minU, minV);
    }
    
    private void renderPosXLight(Tessellator tes, int x, int y, int z,
    		double minU, double minV, double p, double pv) {
    	double X = x + Pix.FOUR + (Pix.ONE/2);
    	double Y = y + Pix.FIVE;
    	double Z = z + Pix.ELEVEN + (Pix.ONE/2);
    	minU += 7*p;
    	minV += 17*pv;
    	double maxU = minU + 7*p;
    	double maxV = minV + 7*pv;
    	tes.addVertexWithUV(X, Y, Z, minU, minV);
    	tes.addVertexWithUV(X, Y + Pix.SEVEN, Z, minU, maxV);
    	tes.addVertexWithUV(X, Y + Pix.SEVEN, Z - Pix.SEVEN, maxU, maxV);
    	tes.addVertexWithUV(X, Y, Z - Pix.SEVEN, maxU, minV);
    }
    
    private void renderNegZLight(Tessellator tes, int x, int y, int z,
    		double minU, double minV, double p, double pv) {
    	double X = x + Pix.FOUR + (Pix.ONE/2);
    	double Y = y + Pix.FIVE;
    	double Z = z + Pix.ELEVEN + (Pix.ONE/2);
    	minU += 14*p;
    	minV += 10*pv;
    	double maxU = minU + 7*p;
    	double maxV = minV + 7*pv;
    	tes.addVertexWithUV(X + Pix.SEVEN, Y, Z, maxU, minV);
    	tes.addVertexWithUV(X + Pix.SEVEN, Y + Pix.SEVEN, Z, maxU, maxV);
    	tes.addVertexWithUV(X, Y + Pix.SEVEN, Z, minU, maxV);
    	tes.addVertexWithUV(X, Y, Z, minU, minV);
    }
    
    private void renderPosZLight(Tessellator tes, int x, int y, int z,
    		double minU, double minV, double p, double pv) {
    	double X = x + Pix.FOUR + (Pix.ONE/2);
    	double Y = y + Pix.FIVE;
    	double Z = z + Pix.FOUR + (Pix.ONE/2);
    	minU += 7*p;
    	minV += 10*pv;
    	double maxU = minU + 7*p;
    	double maxV = minV + 7*pv;
    	tes.addVertexWithUV(X, Y, Z, minU, minV);
    	tes.addVertexWithUV(X, Y + Pix.SEVEN, Z, minU, maxV);
    	tes.addVertexWithUV(X + Pix.SEVEN, Y + Pix.SEVEN, Z, maxU, maxV);
    	tes.addVertexWithUV(X + Pix.SEVEN, Y, Z, maxU, minV);
    }
    
    private void renderNegXStand2(Tessellator tes, int x, int y, int z,
    		double minU, double minV, double p, double pv) {
    	double X = x + Pix.TEN;
    	double Y = y + Pix.TWO;
    	double Z = z + Pix.TEN;
    	minU += 20*p;
    	minV += 2*pv;
    	double maxU = minU + 4*p;
    	double maxV = minV + 4*pv;
    	tes.addVertexWithUV(X, Y, Z - Pix.FOUR, maxU, minV);
    	tes.addVertexWithUV(X, Y + Pix.FOUR, Z - Pix.FOUR, maxU, maxV);
    	tes.addVertexWithUV(X, Y + Pix.FOUR, Z, minU, maxV);
    	tes.addVertexWithUV(X, Y, Z, minU, minV);
    }
    
    private void renderPosXStand2(Tessellator tes, int x, int y, int z,
    		double minU, double minV, double p, double pv) {
    	double X = x + Pix.SIX;
    	double Y = y + Pix.TWO;
    	double Z = z + Pix.TEN;
    	minU += 12*p;
    	minV += 2*pv;
    	double maxU = minU + 4*p;
    	double maxV = minV + 4*pv;
    	tes.addVertexWithUV(X, Y, Z, minU, minV);
    	tes.addVertexWithUV(X, Y + Pix.FOUR, Z, minU, maxV);
    	tes.addVertexWithUV(X, Y + Pix.FOUR, Z - Pix.FOUR, maxU, maxV);
    	tes.addVertexWithUV(X, Y, Z - Pix.FOUR, maxU, minV);
    }
    
    private void renderNegZStand2(Tessellator tes, int x, int y, int z,
    		double minU, double minV, double p, double pv) {
    	double X = x + Pix.SIX;
    	double Y = y + Pix.TWO;
    	double Z = z + Pix.TEN;
    	minU += 16*p;
    	minV += 2*pv;
    	tes.addVertexWithUV(X + Pix.FOUR, Y, Z, minU + 4*p, minV);
    	tes.addVertexWithUV(X + Pix.FOUR, Y + Pix.FOUR, Z, minU + 4*p, minV + 4*pv);
    	tes.addVertexWithUV(X, Y + Pix.FOUR, Z, minU, minV + 4*pv);
    	tes.addVertexWithUV(X, Y, Z, minU, minV);
    }
    
    private void renderPosZStand2(Tessellator tes, int x, int y, int z,
    		double minU, double minV, double p, double pv) {
    	double X = x + Pix.SIX;
    	double Y = y + Pix.TWO;
    	double Z = z + Pix.SIX;
    	minU += 8*p;
    	minV += 2*pv;
    	tes.addVertexWithUV(X, Y, Z, minU, minV);
    	tes.addVertexWithUV(X, Y + Pix.FOUR, Z, minU, minV + 4*pv);
    	tes.addVertexWithUV(X + Pix.FOUR, Y + Pix.FOUR, Z, minU + 4*p, minV + 4*pv);
    	tes.addVertexWithUV(X + Pix.FOUR, Y, Z, minU + 4*p, minV);
    }
    
    private void rednerTopStand(Tessellator tes, int X, int Y, int Z,
    		double minU, double maxU, double minV, double maxV, double p, double pv) {
    	double x = X + Pix.FOUR;
    	double z = Z + Pix.FOUR;
    	double y = Y + Pix.TWO;
    	minV += 2*pv; 
    	tes.addVertexWithUV(x, y, z + Pix.EIGHT, minU + 8*p, minV);
    	tes.addVertexWithUV(x + Pix.EIGHT, y, z + Pix.EIGHT, minU, minV);
    	tes.addVertexWithUV(x + Pix.EIGHT, y, z, minU, minV + 8*pv);
    	tes.addVertexWithUV(x, y, z, minU + 8*p, minV + 8*pv);
    }
    
    private void renderNegXStand(Tessellator tes, int X, int y, int Z, double minU,
    		double maxU, double minV, double maxV, double p, double pv) 
    {
    	double x = X + Pix.FOUR;
    	double z = Z + Pix.TWELVE;
    	minU += 24*p;
    	tes.addVertexWithUV(x, y, z, minU, minV + 2*pv);
    	tes.addVertexWithUV(x, y + Pix.TWO, z, minU, minV);
    	tes.addVertexWithUV(x, y + Pix.TWO, z - Pix.EIGHT, minU + 8*p, minV);
    	tes.addVertexWithUV(x, y, z - Pix.EIGHT, minU + 8*p, minV + 2*pv);
    }
    
    private void renderPosXStand(Tessellator tes, int X, int y, int Z, double minU,
    		double maxU, double minV, double maxV, double p, double pv) 
    {
    	double x = X + Pix.TWELVE;
    	double z = Z + Pix.TWELVE;
    	minU += 8*p;
    	tes.addVertexWithUV(x, y, z - Pix.EIGHT, minU + 8*p, minV + 2*pv);
    	tes.addVertexWithUV(x, y + Pix.TWO, z - Pix.EIGHT, minU + 8*p, minV);
    	tes.addVertexWithUV(x, y + Pix.TWO, z, minU, minV);
    	tes.addVertexWithUV(x, y, z, minU, minV + 2*pv);
    }
    
    private void renderNegZStand(Tessellator tes, int x, int y, int z, double minU,
    		double maxU, double minV, double maxV, double p, double pv) 
    {
    	double offX = x + Pix.FOUR;
    	double offZ = z + Pix.TWELVE;
    	tes.addVertexWithUV(offX + Pix.EIGHT, y, offZ, minU + 8*p, minV +2*pv);
    	tes.addVertexWithUV(offX + Pix.EIGHT, y + Pix.TWO, offZ, minU + 8*p, minV);
    	tes.addVertexWithUV(offX, y + Pix.TWO, offZ, minU, minV);
    	tes.addVertexWithUV(offX, y, offZ, minU, minV + 2*pv);
    }
    
    private void renderPosZStand(Tessellator tes, int x, int y, int z, double minU, double maxU, double minV, double maxV, double p, double pv)
    {
    	double offX = x + Pix.FOUR;
    	double offZ = z + Pix.FOUR;
    	minU += 16*p;
    	tes.addVertexWithUV(offX, y, offZ, minU, minV + 2*pv);
    	tes.addVertexWithUV(offX, y + Pix.TWO, offZ, minU, minV);
    	tes.addVertexWithUV(offX + Pix.EIGHT, y + Pix.TWO, offZ, minU + 8*p, minV);
    	tes.addVertexWithUV(offX + Pix.EIGHT, y, offZ, minU + 8*p, minV +2*pv);
    }
    
    @Override
    public boolean shouldRender3DInInventory() {
    	return true;
    }
    
    @Override
    public int getRenderId() {
    	return ClientProxy.ModernDecLampType;
    }
    
    }
    

  8. Hi

     

    Sounds like it might be rendering but not in the place you expect.

     

    Suggest to try

    // comment this out		tes.setTranslation(x, y, z);
    
    	ResourceLocation textures = (new ResourceLocation(Reference.modid + ":textures/models/LEDStrip.png")); 
            Minecraft.getMinecraft().renderEngine.bindTexture(textures);
            
            tes.addVertexWithUV(x,     y,     z, 0, 1);
            tes.addVertexWithUV(x, y+1,     z, 0, 0);
            tes.addVertexWithUV(x, y+1, z+1, 1, 0);
            tes.addVertexWithUV(x,     y, z+1, 1, 1);
    

    -TGG

     

    I've already done that ;)

     

    Actual code:

    package morelights.renderers;
    
    import org.lwjgl.opengl.GL11;
    
    import morelights.lib.Reference;
    import morelights.proxy.ClientProxy;
    import net.minecraft.block.Block;
    import net.minecraft.client.Minecraft;
    import net.minecraft.client.renderer.RenderBlocks;
    import net.minecraft.client.renderer.Tessellator;
    import net.minecraft.client.renderer.texture.TextureMap;
    import net.minecraft.util.ResourceLocation;
    import net.minecraft.world.IBlockAccess;
    import cpw.mods.fml.client.registry.ISimpleBlockRenderingHandler;
    
    public class LEDStripRenderer implements ISimpleBlockRenderingHandler {
    
    @Override
    public void renderInventoryBlock(Block block, int metadata, int modelID,
    		RenderBlocks renderer) {
    
    }
    
    @Override
    public boolean renderWorldBlock(IBlockAccess world, int x, int y, int z,
    		Block block, int modelId, RenderBlocks renderer) {
    
    	Tessellator tes = Tessellator.instance;
    	int lightValue = block.getMixedBrightnessForBlock(world, x, y, z);
    	tes.setBrightness(lightValue);
    	tes.setColorOpaque_F(1.0F, 1.0F, 1.0F);
    
    	ResourceLocation texture = (new ResourceLocation(Reference.modid + ":textures/models/LEDStrip.png"));
    	Minecraft.getMinecraft().getTextureManager().bindTexture(texture);
            
            tes.addVertexWithUV(0, 0, 0, 0, 1);
            tes.addVertexWithUV(0, 1, 0, 0, 0);
            tes.addVertexWithUV(0, 1, 1, 1, 0);
            tes.addVertexWithUV(0, 0, 1, 1, 1);
            
            Minecraft.getMinecraft().getTextureManager().bindTexture(TextureMap.locationBlocksTexture);
            
    	return true;
    }
    
    @Override
    public boolean shouldRender3DInInventory() {
    	return true;
    }
    
    @Override
    public int getRenderId() {
    	return ClientProxy.LEDStripRenderType;
    }
    }

  9. Hi

     

    From looking in EntityRenderer.renderWorld I think this should work:

     

    Minecraft.getMinecraft().getTextureManager().bindTexture(TextureMap.locationBlocksTexture);

             

    -TGG

     

    Well it's almost the same as I did it before and this is binding the texture map for vanilla blocks (and even then there is no texture). But now I know why it was doing that glitch where blocks didn't have texture. It was because I was binding my texture, but then it using it for every block in that chunk. So I have just put Minecraft.getMinecraft().getTextureManager().bindTexture(TextureMap.locationBlocksTexture); when I finished rendering my block and it's not doing that glitch, but my block is still not rendering (or doesn't have texture)

  10. Hi

     

    Well we're making progress...

    I didn't have this problem in my own ISBRH renderers so far, but perhaps you need to undo some of the setting changes you are making (setTranslate, texture, etc). 

    I'd suggest removing them one by one and seeing which one(s) are causing the weirdness.

    And come to think of it, I don't think you need setTranslate, the caller should have done that for you.  Setting it to 0,0,0 might actually be causing your problem.

     

    Ok so binding the texture was the problem. So how do I tell the tessellator which texture to use?

     

     

    Something else to be aware of - if your block has transparent bits (is not a full, opaque cube), you need to override isOpaqueBlock to return false.

    http://4.bp.blogspot.com/-F0FTLzenidU/UfKBs19w_rI/AAAAAAAAABw/nxNmavM7sd4/s1600/StandardBlockWithAlpha-1.png

     

    -TGG

    I know that ;)

  11. Hi,

     

    I wanted to play around with tesselator, but I got this error:

     

    2013-11-28 21:42:33 [iNFO] [sTDERR] 	at net.minecraft.client.renderer.Tessellator.startDrawing(Tessellator.java:343)
    2013-11-28 21:42:33 [iNFO] [sTDERR] 	at net.minecraft.client.renderer.Tessellator.startDrawingQuads(Tessellator.java:333)
    2013-11-28 21:42:33 [iNFO] [sTDERR] 	at morelights.renderers.LEDStripRenderer.renderWorldBlock(LEDStripRenderer.java:28)
    2013-11-28 21:42:33 [iNFO] [sTDERR] 	at cpw.mods.fml.client.registry.RenderingRegistry.renderWorldBlock(RenderingRegistry.java:152)
    2013-11-28 21:42:33 [iNFO] [sTDERR] 	at net.minecraft.src.FMLRenderAccessLibrary.renderWorldBlock(FMLRenderAccessLibrary.java:57)
    2013-11-28 21:42:33 [iNFO] [sTDERR] 	at net.minecraft.client.renderer.RenderBlocks.renderBlockByRenderType(RenderBlocks.java:485)
    2013-11-28 21:42:33 [iNFO] [sTDERR] 	at net.minecraft.client.renderer.WorldRenderer.updateRenderer(WorldRenderer.java:224)
    2013-11-28 21:42:33 [iNFO] [sTDERR] 	at net.minecraft.client.renderer.RenderGlobal.updateRenderers(RenderGlobal.java:1551)
    2013-11-28 21:42:33 [iNFO] [sTDERR] 	at net.minecraft.client.renderer.EntityRenderer.renderWorld(EntityRenderer.java:1129)
    2013-11-28 21:42:33 [iNFO] [sTDERR] 	at net.minecraft.client.renderer.EntityRenderer.updateCameraAndRender(EntityRenderer.java:1006)
    2013-11-28 21:42:33 [iNFO] [sTDERR] 	at net.minecraft.client.Minecraft.runGameLoop(Minecraft.java:946)
    2013-11-28 21:42:33 [iNFO] [sTDERR] 	at net.minecraft.client.Minecraft.run(Minecraft.java:838)
    2013-11-28 21:42:33 [iNFO] [sTDERR] 	at net.minecraft.client.main.Main.main(Main.java:93)
    2013-11-28 21:42:33 [iNFO] [sTDERR] 	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    2013-11-28 21:42:33 [iNFO] [sTDERR] 	at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
    2013-11-28 21:42:33 [iNFO] [sTDERR] 	at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
    2013-11-28 21:42:33 [iNFO] [sTDERR] 	at java.lang.reflect.Method.invoke(Unknown Source)
    2013-11-28 21:42:33 [iNFO] [sTDERR] 	at net.minecraft.launchwrapper.Launch.launch(Launch.java:131)
    2013-11-28 21:42:33 [iNFO] [sTDERR] 	at net.minecraft.launchwrapper.Launch.main(Launch.java:27)
    2013-11-28 21:42:33 [iNFO] [sTDOUT] ---- Minecraft Crash Report ----
    2013-11-28 21:42:33 [iNFO] [sTDOUT] // I just don't know what went wrong 
    2013-11-28 21:42:33 [iNFO] [sTDOUT] 
    2013-11-28 21:42:33 [iNFO] [sTDOUT] Time: 28.11.13 21:42
    2013-11-28 21:42:33 [iNFO] [sTDOUT] Description: Unexpected error
    2013-11-28 21:42:33 [iNFO] [sTDOUT] 
    2013-11-28 21:42:33 [iNFO] [sTDOUT] java.lang.IllegalStateException: Already tesselating!
    2013-11-28 21:42:33 [iNFO] [sTDOUT] 	at net.minecraft.client.renderer.Tessellator.startDrawing(Tessellator.java:343)
    2013-11-28 21:42:33 [iNFO] [sTDOUT] 	at net.minecraft.client.renderer.Tessellator.startDrawingQuads(Tessellator.java:333)
    2013-11-28 21:42:33 [iNFO] [sTDOUT] 	at morelights.renderers.LEDStripRenderer.renderWorldBlock(LEDStripRenderer.java:28)
    2013-11-28 21:42:33 [iNFO] [sTDOUT] 	at cpw.mods.fml.client.registry.RenderingRegistry.renderWorldBlock(RenderingRegistry.java:152)
    2013-11-28 21:42:33 [iNFO] [sTDOUT] 	at net.minecraft.src.FMLRenderAccessLibrary.renderWorldBlock(FMLRenderAccessLibrary.java:57)
    2013-11-28 21:42:33 [iNFO] [sTDOUT] 	at net.minecraft.client.renderer.RenderBlocks.renderBlockByRenderType(RenderBlocks.java:485)
    2013-11-28 21:42:33 [iNFO] [sTDOUT] 	at net.minecraft.client.renderer.WorldRenderer.updateRenderer(WorldRenderer.java:224)
    2013-11-28 21:42:33 [iNFO] [sTDOUT] 	at net.minecraft.client.renderer.RenderGlobal.updateRenderers(RenderGlobal.java:1551)
    2013-11-28 21:42:33 [iNFO] [sTDOUT] 	at net.minecraft.client.renderer.EntityRenderer.renderWorld(EntityRenderer.java:1129)
    2013-11-28 21:42:33 [iNFO] [sTDOUT] 	at net.minecraft.client.renderer.EntityRenderer.updateCameraAndRender(EntityRenderer.java:1006)
    2013-11-28 21:42:33 [iNFO] [sTDOUT] 	at net.minecraft.client.Minecraft.runGameLoop(Minecraft.java:946)
    2013-11-28 21:42:33 [iNFO] [sTDOUT] 	at net.minecraft.client.Minecraft.run(Minecraft.java:838)
    2013-11-28 21:42:33 [iNFO] [sTDOUT] 	at net.minecraft.client.main.Main.main(Main.java:93)
    2013-11-28 21:42:33 [iNFO] [sTDOUT] 	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    2013-11-28 21:42:33 [iNFO] [sTDOUT] 	at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
    2013-11-28 21:42:33 [iNFO] [sTDOUT] 	at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
    2013-11-28 21:42:33 [iNFO] [sTDOUT] 	at java.lang.reflect.Method.invoke(Unknown Source)
    2013-11-28 21:42:33 [iNFO] [sTDOUT] 	at net.minecraft.launchwrapper.Launch.launch(Launch.java:131)
    2013-11-28 21:42:33 [iNFO] [sTDOUT] 	at net.minecraft.launchwrapper.Launch.main(Launch.java:27)
    2013-11-28 21:42:33 [iNFO] [sTDOUT] 
    2013-11-28 21:42:33 [iNFO] [sTDOUT] 
    2013-11-28 21:42:33 [iNFO] [sTDOUT] A detailed walkthrough of the error, its code path and all known details is as follows:
    2013-11-28 21:42:33 [iNFO] [sTDOUT] ---------------------------------------------------------------------------------------
    2013-11-28 21:42:33 [iNFO] [sTDOUT] 
    2013-11-28 21:42:33 [iNFO] [sTDOUT] -- Head --
    2013-11-28 21:42:33 [iNFO] [sTDOUT] Stacktrace:
    2013-11-28 21:42:33 [iNFO] [sTDOUT] 	at net.minecraft.client.renderer.Tessellator.startDrawing(Tessellator.java:343)
    2013-11-28 21:42:33 [iNFO] [sTDOUT] 	at net.minecraft.client.renderer.Tessellator.startDrawingQuads(Tessellator.java:333)
    2013-11-28 21:42:33 [iNFO] [sTDOUT] 	at morelights.renderers.LEDStripRenderer.renderWorldBlock(LEDStripRenderer.java:28)
    2013-11-28 21:42:33 [iNFO] [sTDOUT] 	at cpw.mods.fml.client.registry.RenderingRegistry.renderWorldBlock(RenderingRegistry.java:152)
    2013-11-28 21:42:33 [iNFO] [sTDOUT] 	at net.minecraft.src.FMLRenderAccessLibrary.renderWorldBlock(FMLRenderAccessLibrary.java:57)
    2013-11-28 21:42:33 [iNFO] [sTDOUT] 	at net.minecraft.client.renderer.RenderBlocks.renderBlockByRenderType(RenderBlocks.java:485)
    2013-11-28 21:42:33 [iNFO] [sTDOUT] 	at net.minecraft.client.renderer.WorldRenderer.updateRenderer(WorldRenderer.java:224)
    2013-11-28 21:42:33 [iNFO] [sTDOUT] 	at net.minecraft.client.renderer.RenderGlobal.updateRenderers(RenderGlobal.java:1551)
    2013-11-28 21:42:33 [iNFO] [sTDOUT] 	at net.minecraft.client.renderer.EntityRenderer.renderWorld(EntityRenderer.java:1129)
    2013-11-28 21:42:33 [iNFO] [sTDOUT] 
    2013-11-28 21:42:33 [iNFO] [sTDOUT] -- Affected level --
    2013-11-28 21:42:33 [iNFO] [sTDOUT] Details:
    2013-11-28 21:42:33 [iNFO] [sTDOUT] 	Level name: MpServer
    2013-11-28 21:42:33 [iNFO] [sTDOUT] 	All players: 1 total; [EntityClientPlayerMP['Player261'/19, l='MpServer', x=-41,40, y=5,62, z=121,90]]
    2013-11-28 21:42:33 [iNFO] [sTDOUT] 	Chunk stats: MultiplayerChunkCache: 441
    2013-11-28 21:42:33 [iNFO] [sTDOUT] 	Level seed: 0
    2013-11-28 21:42:33 [iNFO] [sTDOUT] 	Level generator: ID 01 - flat, ver 0. Features enabled: false
    2013-11-28 21:42:33 [iNFO] [sTDOUT] 	Level generator options: 
    2013-11-28 21:42:33 [iNFO] [sTDOUT] 	Level spawn location: World: (-51,4,122), Chunk: (at 13,0,10 in -4,7; contains blocks -64,0,112 to -49,255,127), Region: (-1,0; contains chunks -32,0 to -1,31, blocks -512,0,0 to -1,255,511)
    2013-11-28 21:42:33 [iNFO] [sTDOUT] 	Level time: 357678 game time, 188737 day time
    2013-11-28 21:42:33 [iNFO] [sTDOUT] 	Level dimension: 0
    2013-11-28 21:42:33 [iNFO] [sTDOUT] 	Level storage version: 0x00000 - Unknown?
    2013-11-28 21:42:33 [iNFO] [sTDOUT] 	Level weather: Rain time: 0 (now: false), thunder time: 0 (now: false)
    2013-11-28 21:42:33 [iNFO] [sTDOUT] 	Level game mode: Game mode: creative (ID 1). Hardcore: false. Cheats: false
    2013-11-28 21:42:33 [iNFO] [sTDOUT] 	Forced entities: 4 total; [EntityClientPlayerMP['Player261'/19, l='MpServer', x=-41,40, y=5,62, z=121,90], EntityPig['Pig'/10, l='MpServer', x=-99,75, y=4,00, z=62,22], EntityPig['Pig'/14, l='MpServer', x=-65,50, y=4,00, z=50,09], EntityPig['Pig'/15, l='MpServer', x=-66,66, y=4,00, z=47,22]]
    2013-11-28 21:42:33 [iNFO] [sTDOUT] 	Retry entities: 0 total; []
    2013-11-28 21:42:33 [iNFO] [sTDOUT] 	Server brand: fml,forge
    2013-11-28 21:42:33 [iNFO] [sTDOUT] 	Server type: Integrated singleplayer server
    2013-11-28 21:42:33 [iNFO] [sTDOUT] Stacktrace:
    2013-11-28 21:42:33 [iNFO] [sTDOUT] 	at net.minecraft.client.multiplayer.WorldClient.addWorldInfoToCrashReport(WorldClient.java:440)
    2013-11-28 21:42:33 [iNFO] [sTDOUT] 	at net.minecraft.client.Minecraft.addGraphicsAndWorldToCrashReport(Minecraft.java:2312)
    2013-11-28 21:42:33 [iNFO] [sTDOUT] 	at net.minecraft.client.Minecraft.run(Minecraft.java:863)
    2013-11-28 21:42:33 [iNFO] [sTDOUT] 	at net.minecraft.client.main.Main.main(Main.java:93)
    2013-11-28 21:42:33 [iNFO] [sTDOUT] 	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    2013-11-28 21:42:33 [iNFO] [sTDOUT] 	at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
    2013-11-28 21:42:33 [iNFO] [sTDOUT] 	at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
    2013-11-28 21:42:33 [iNFO] [sTDOUT] 	at java.lang.reflect.Method.invoke(Unknown Source)
    2013-11-28 21:42:33 [iNFO] [sTDOUT] 	at net.minecraft.launchwrapper.Launch.launch(Launch.java:131)
    2013-11-28 21:42:33 [iNFO] [sTDOUT] 	at net.minecraft.launchwrapper.Launch.main(Launch.java:27)
    2013-11-28 21:42:33 [iNFO] [sTDOUT] 
    2013-11-28 21:42:33 [iNFO] [sTDOUT] -- System Details --
    2013-11-28 21:42:33 [iNFO] [sTDOUT] Details:
    2013-11-28 21:42:33 [iNFO] [sTDOUT] 	Minecraft Version: 1.6.4
    2013-11-28 21:42:33 [iNFO] [sTDOUT] 	Operating System: Windows 7 (amd64) version 6.1
    2013-11-28 21:42:33 [iNFO] [sTDOUT] 	Java Version: 1.7.0_45, Oracle Corporation
    2013-11-28 21:42:33 [iNFO] [sTDOUT] 	Java VM Version: Java HotSpot(TM) 64-Bit Server VM (mixed mode), Oracle Corporation
    2013-11-28 21:42:33 [iNFO] [sTDOUT] 	Memory: 671491320 bytes (640 MB) / 1038876672 bytes (990 MB) up to 1038876672 bytes (990 MB)
    2013-11-28 21:42:33 [iNFO] [sTDOUT] 	JVM Flags: 3 total; -Xincgc -Xmx1024M -Xms1024M
    2013-11-28 21:42:33 [iNFO] [sTDOUT] 	AABB Pool Size: 18395 (1030120 bytes; 0 MB) allocated, 71 (3976 bytes; 0 MB) used
    2013-11-28 21:42:33 [iNFO] [sTDOUT] 	Suspicious classes: FML and Forge are installed
    2013-11-28 21:42:33 [iNFO] [sTDOUT] 	IntCache: cache: 0, tcache: 0, allocated: 0, tallocated: 0
    2013-11-28 21:42:33 [iNFO] [sTDOUT] 	FML: MCP v8.11 FML v6.4.41.946 Minecraft Forge 9.11.1.946 4 mods loaded, 4 mods active
    2013-11-28 21:42:33 [iNFO] [sTDOUT] 	mcp{8.09} [Minecraft Coder Pack] (minecraft.jar) Unloaded->Constructed->Pre-initialized->Initialized->Post-initialized->Available->Available->Available->Available
    2013-11-28 21:42:33 [iNFO] [sTDOUT] 	FML{6.4.41.946} [Forge Mod Loader] (bin) Unloaded->Constructed->Pre-initialized->Initialized->Post-initialized->Available->Available->Available->Available
    2013-11-28 21:42:33 [iNFO] [sTDOUT] 	Forge{9.11.1.946} [Minecraft Forge] (bin) Unloaded->Constructed->Pre-initialized->Initialized->Post-initialized->Available->Available->Available->Available
    2013-11-28 21:42:33 [iNFO] [sTDOUT] 	morelights{1.6.4 v0.1} [More Lights Mod] (bin) Unloaded->Constructed->Pre-initialized->Initialized->Post-initialized->Available->Available->Available->Available
    2013-11-28 21:42:33 [iNFO] [sTDOUT] 	Launched Version: 1.6
    2013-11-28 21:42:33 [iNFO] [sTDOUT] 	LWJGL: 2.9.0
    2013-11-28 21:42:33 [iNFO] [sTDOUT] 	OpenGL: AMD Radeon HD 5800 Series GL version 4.2.12422 Compatibility Profile Context 13.152.0.0, ATI Technologies Inc.
    2013-11-28 21:42:33 [iNFO] [sTDOUT] 	Is Modded: Definitely; Client brand changed to 'fml,forge'
    2013-11-28 21:42:33 [iNFO] [sTDOUT] 	Type: Client (map_client.txt)
    2013-11-28 21:42:33 [iNFO] [sTDOUT] 	Resource Pack: Default
    2013-11-28 21:42:33 [iNFO] [sTDOUT] 	Current Language: English (US)
    2013-11-28 21:42:33 [iNFO] [sTDOUT] 	Profiler Position: N/A (disabled)
    2013-11-28 21:42:33 [iNFO] [sTDOUT] 	Vec3 Pool Size: 286 (16016 bytes; 0 MB) allocated, 51 (2856 bytes; 0 MB) used
    2013-11-28 21:42:33 [iNFO] [sTDOUT] #@!@# Game crashed! Crash report saved to: #@!@# D:\Data\Dokumenty\Development\forge\mcp\jars\.\crash-reports\crash-2013-11-28_21.42.33-client.txt
    2013-11-28 21:42:33 [iNFO] [Minecraft-Server] Stopping server
    2013-11-28 21:42:33 [iNFO] [Minecraft-Server] Saving players
    2013-11-28 21:42:33 [iNFO] [Minecraft-Server] Stopping server
    2013-11-28 21:42:33 [iNFO] [Minecraft-Server] Saving players
    AL lib: (EE) alc_cleanup: 1 device not closed

     

    I was trying to google it, but I didn't find an answer :(

     

    Here is the code:

     

    package morelights.renderers;
    
    import org.lwjgl.opengl.GL11;
    
    import morelights.lib.Reference;
    import morelights.proxy.ClientProxy;
    import net.minecraft.block.Block;
    import net.minecraft.client.Minecraft;
    import net.minecraft.client.renderer.RenderBlocks;
    import net.minecraft.client.renderer.Tessellator;
    import net.minecraft.util.ResourceLocation;
    import net.minecraft.world.IBlockAccess;
    import cpw.mods.fml.client.registry.ISimpleBlockRenderingHandler;
    
    public class LEDStripRenderer implements ISimpleBlockRenderingHandler {
    
    @Override
    public void renderInventoryBlock(Block block, int metadata, int modelID,
    		RenderBlocks renderer) {
    
    }
    
    @Override
    public boolean renderWorldBlock(IBlockAccess world, int x, int y, int z,
    		Block block, int modelId, RenderBlocks renderer) {
    
    	Tessellator tes = Tessellator.instance;
    	tes.startDrawingQuads();
    	int lightValue = block.getMixedBrightnessForBlock(world, x, y, z);
    	tes.setBrightness(lightValue);
    	tes.setColorOpaque_F(1.0F, 1.0F, 1.0F);
    
    	tes.setTranslation(x, y, z);
    
    	ResourceLocation textures = (new ResourceLocation(Reference.modid + ":textures/models/LEDStrip.png")); 
            Minecraft.getMinecraft().renderEngine.bindTexture(textures);
            
            tes.addVertexWithUV(0, 0, 0, 0, 1);
            tes.addVertexWithUV(0, 1, 0, 0, 0);
            tes.addVertexWithUV(0, 1, 1, 1, 0);
            tes.addVertexWithUV(0, 0, 1, 1, 1);
            
            tes.draw();
    
    	return true;
    }
    
    @Override
    public boolean shouldRender3DInInventory() {
    	return true;
    }
    
    @Override
    public int getRenderId() {
    	return ClientProxy.LEDStripRenderType;
    }
    }

  12. Hi

     

    I suspect that it might be a more general problem caused by alpha blending rendering.  It's important to render the polygons in reverse depth order (from furthest to nearest) when performing alpha blending rendering, otherwise the results aren't right

    (see the first few paragraphs of

    http://www.openglsuperbible.com/2013/08/20/is-order-independent-transparency-really-necessary/

    )

     

    I don't know an easy way to solve it.  You could perhaps try rendering as two models, one with all the opaque bits, then one with all the smoky glass.  Or alternatively, come up with four models with defined rendering order, that you switch between depending on the viewing direction.  But that's a pure guess and I actually have no idea if it will work!

     

    Let us know if you crack it yeah? :-)

     

    -TGG

     

    Ok, I actually have the models separated to multiple model (lamp, glass, fire) and I tried to switch the order of rendering them, but it's still the same and I noticed that the fire is not even blending after recompiling.

     

    Maybe try to look at the code if am doing something wrong: https://github.com/EnkeyMC/morelights/blob/master/renderers/ModelOldStreetLampRenderer.java

  13. If its an all-the-time thing, the one on the right looks way better.

     

    If its an angle-of-view issue, that would be annoying.  No idea what the problem is.

     

    Well, it renders normally at some angles, but it's pretty rare. Personally it feels to me that it doesn't fit the style of the lamp and the fire kinda blends in when you look straight through the glass :/

  14. You'll probably need custom renderer for that ;) (class that implements ISimpleBlockRenderingHandler). I have similar block in my mod so you can have a look at these files:

     

    Custom renderer:

    https://github.com/EnkeyMC/morelights/blob/master/renderers/LampRenderer.java

     

    Block class:

    https://github.com/EnkeyMC/morelights/blob/master/block/BlockOverlayLamp.java

     

    Hope it helps ;)

     

    EDIT:

    I am basically rendering the block in two passes (0 & 1). In each pass is rendered different block (different texture) and the block is taking the base texture from blocks around itself.

  15. Hey guys again :D

     

    So I released v0.1-alpha of my mod (so my friend can do bug hunting :P ) and I don't know why, but in recompiled version it renders weirdly:

     

    waaeJLS.png

     

    When I look at it in certain angels it renders normally but most of the time it renders weirdly :(

     

    Any idea why is that happening and how to solve this? :)

     

    Thanks in advance ;)

×
×
  • Create New...

Important Information

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