
IMleader
Members-
Posts
56 -
Joined
-
Last visited
Everything posted by IMleader
-
He just told you. Create a GUI as you normally would, then listen for the GuiOpenEvent and replace the GUI it renders with yours.
-
Ah, forgot I left that there. I have switched it over, however now I don't know where to use my ModelBullet.class. It simply renders a small hitbox with no bullet. Any clue on the hitbox issue as well?
-
How to add a Colission Box onto the player?
IMleader replied to Oscarita25's topic in Modder Support
You can do it either way. I recommend looking to what Minecraft does when f+b are hit. -
Bump! Still have not figured it out!
-
Hello! I have been working on a mod and one of the main things currently is my bullet entity. It renders in-game and works but I cannot get the hitbox right. Currently, I am using this: setSize(0.1F, 0.1F); to set the bounding box size. However, it renders this box below the entity in game: As you can see the bullet(Yelllow square) is in the air and the bounding box is below it. Another small issue is that my bullet can be pushed and hurt. Any way to disable this? RenderBullet.class & EntityBullet.class package codes.matthewp.nerdwarcraft.client; import codes.matthewp.nerdwarcraft.entity.EntityBullet; import net.minecraft.client.model.ModelZombie; import net.minecraft.client.renderer.entity.Render; import net.minecraft.client.renderer.entity.RenderLiving; import net.minecraft.client.renderer.entity.RenderManager; import net.minecraft.util.ResourceLocation; import net.minecraftforge.fml.client.registry.IRenderFactory; import javax.annotation.Nonnull; public class RenderBullet extends RenderLiving<EntityBullet> { public static ResourceLocation mobTexture = new ResourceLocation("warcraft:textures/entity/bullet.png"); public static final Factory FACTORY = new Factory(); public RenderBullet(RenderManager renderManager) { super(renderManager, new ModelBullet(), 0.f); } @Override @Nonnull protected ResourceLocation getEntityTexture(@Nonnull EntityBullet entity) { return mobTexture; } public static class Factory implements IRenderFactory<EntityBullet> { @Override public Render<? super EntityBullet> createRenderFor(RenderManager manager) { return new RenderBullet(manager); } } } package codes.matthewp.nerdwarcraft.entity; import net.minecraft.entity.EntityLiving; import net.minecraft.util.math.AxisAlignedBB; import net.minecraft.world.World; public class EntityBullet extends EntityLiving { public EntityBullet(World worldIn) { super(worldIn); setSize(0.1F, 0.1F); } public void entityInit() { super.entityInit(); } } EDIT: Added ModelBullet.class @SideOnly(Side.CLIENT) public class ModelBullet extends ModelBase { public ModelRenderer bulletBody; public int textureWidth = 16; public int textureHeight = 16; public ModelBullet() { bulletBody = new ModelRenderer(this, 0, 0); bulletBody.addBox(0, 0, 0, 2, 1, 4); bulletBody.setTextureSize(textureWidth, textureHeight); } @Override public void render(Entity entityIn, float limbSwing, float limbSwingAmount, float ageInTicks, float netHeadYaw, float headPitch, float scale) { renderBullet((EntityBullet) entityIn, limbSwing, limbSwingAmount, ageInTicks, netHeadYaw, headPitch, scale); } private void renderBullet(EntityBullet parEnntity, float limbSwing, float limbSwingAmount, float ageInTicks, float netHeadYaw, float headPitch, float scale) { bulletBody.render(0.01F); } }
-
When i change to not use the block state, i get the same model error
-
I have made this but it says that a registery name is not set for the item. But my other register name for the block is based off of the meta data. How do i go about this?
-
I have a new issue. I set the creative tab to decor. But it does not show up and i cannot give myself the block?
-
Haah! You were right, the [] made an array. Weird how that works but it goes to the textures now. All good
-
I wanted to version with two colors only so i can see how it works. Dont want you to do more work so if you could show me the correct way with two colors ill do the rest
-
I haved fixed the syntax. Can you show me an example with just two colors?
-
Even with all the variants in there. The same error still pop up
-
The problem is white is still showing an error even though the white one is in there.
-
[14:41:57] [Client thread/ERROR] [FML]: Exception loading model for variant mycraft:sim_light_block_color#color=white for blockstate "mycraft:sim_light_block_color[color=white]" net.minecraftforge.client.model.ModelLoaderRegistry$LoaderException: Exception loading model mycraft:sim_light_block_color#color=white with loader VariantLoader.INSTANCE, skipping at net.minecraftforge.client.model.ModelLoaderRegistry.getModel(ModelLoaderRegistry.java:153) ~[ModelLoaderRegistry.class:?] at net.minecraftforge.client.model.ModelLoader.registerVariant(ModelLoader.java:264) ~[ModelLoader.class:?] at net.minecraft.client.renderer.block.model.ModelBakery.loadBlock(ModelBakery.java:153) ~[ModelBakery.class:?] at net.minecraftforge.client.model.ModelLoader.loadBlocks(ModelLoader.java:252) ~[ModelLoader.class:?] at net.minecraftforge.client.model.ModelLoader.setupModelRegistry(ModelLoader.java:159) ~[ModelLoader.class:?] at net.minecraft.client.renderer.block.model.ModelManager.onResourceManagerReload(ModelManager.java:28) [ModelManager.class:?] at net.minecraft.client.resources.SimpleReloadableResourceManager.registerReloadListener(SimpleReloadableResourceManager.java:122) [SimpleReloadableResourceManager.class:?] at net.minecraft.client.Minecraft.init(Minecraft.java:541) [Minecraft.class:?] at net.minecraft.client.Minecraft.run(Minecraft.java:387) [Minecraft.class:?] at net.minecraft.client.main.Main.main(Main.java:118) [Main.class:?] at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[?:1.7.0_79] at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source) ~[?:1.7.0_79] at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) ~[?:1.7.0_79] at java.lang.reflect.Method.invoke(Unknown Source) ~[?:1.7.0_79] at net.minecraft.launchwrapper.Launch.launch(Launch.java:135) [launchwrapper-1.12.jar:?] at net.minecraft.launchwrapper.Launch.main(Launch.java:28) [launchwrapper-1.12.jar:?] at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[?:1.7.0_79] at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source) ~[?:1.7.0_79] at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) ~[?:1.7.0_79] at java.lang.reflect.Method.invoke(Unknown Source) ~[?:1.7.0_79] at net.minecraftforge.gradle.GradleStartCommon.launch(GradleStartCommon.java:97) [start/:?] at GradleStart.main(GradleStart.java:26) [start/:?] For each color
-
Ive tried it with the orange and white models but it still throws an model error https://github.com/xXXIMMATTHEWXXx/MyCraft/blob/master/src/main/resources/assets/mycraft/blockstates/sim_light_color.json
-
Hello! I am working on a block that has multiple states and based on the state, it has a different color. I have made the block and it registers all of the variants, but how exactly does the .json work. I know how it works for a regular block. But I cannot get it to work for the JSON part. I tried to look at Minecraft assets to no avail. Source can be found here: https://github.com/xXXIMMATTHEWXXx/MyCraft How do I setup the JSON for different block states to use a different texture? Some explanation. I use all of the default Minecraft colors and create a sub-block of the block. This leads to 16 different blocks
-
I know that @Draco18s... Anyhow this is fixed
-
Heyo! So I am working on a basic mod atm and for some reason, my items will not register. The stack trace leads to my client proxy, I commented that out, and t runs. But my items do not show up. So that means that the root cause of the Null pointer is that the items are not set. My method chain looks like this. MyCraft.preInit(proxy.preInit) CommonProxy.preInit { MyItem.regItems } then MyItems.regitems { ref(); reg(); } MyItems.ref{ cooper_coin = new BasicItem("cooper_coin", CreativeTabs.MATERIALS);} and MyItems.reg{GameRegistry.register(cooper_coin)}. So I do not understand where the null pointer is coming from?? My whole project is on github: https://github.com/xXXIMMATTHEWXXx/MyCraft EDIT: It still seems that the item is just not registering...
-
I got annoyed with this issue and decompiled in my 64 gig server Still dont know how to fix this so sorry to anyone in the future looking for this
-
Hello! I am starting a 1.11.2 mod. Ever since 1.8, I have not been able to run the command setupDecompWorkspace. It always stops at :decompileMc: 56% I have tried what force has said. I have modified gradlew.properties and gradlew.bat. Still hangs there. I am allocating 3 gigs of ram to this process. Is this enough? How can I fix this? Do I need to download gradle? PS: On Windows 10 64 bit with 4 gigs of ram
-
How to set a custom item name and a custom item name color
IMleader replied to IMleader's topic in Modder Support
It does not. Do you know how lucky blocks achieves this? -
How to set a custom item name and a custom item name color
IMleader replied to IMleader's topic in Modder Support
Just was reading around some nbt code. Found this: http://minecraft.gamepedia.com/Tutorials/Command_NBT_tags under display. The items name and color are both under this display value. How do I go about chaneging these? -
How to set a custom item name and a custom item name color
IMleader replied to IMleader's topic in Modder Support
Can you check my updated code? It does not seem to work. I looked at what the avil does. -
How to set a custom item name and a custom item name color
IMleader replied to IMleader's topic in Modder Support
Thank you! Sorry ive been doing java for abit but forge/Minecraft is new to me! Thank you!!!!!!! -
How to set a custom item name and a custom item name color
IMleader replied to IMleader's topic in Modder Support
https://github.com/xXXIMMATTHEWXXx/BroCubes/blob/master/src/main/java/xyz/lexium/brocubes/blocks/BroBlock.java#L85 to be more specific sorry