Everything posted by Meoco
-
Metadata sub-blocks with different classes?
I got what I needed! Thanks a lot!!
-
Rendering mob as different mob
If you're wanting to just replace the mob with a different one entirely, I'd suggest looking at the code that turns zombie villagers back into regular ones.
-
Metadata sub-blocks with different classes?
Ok, here's the actual scenario: I have a block with no collision that when powered will push entities upward, but also provide a weak redstone signal on its top to power any other blocks of that type above it, making it so you only have to power the bottom block. At the moment, it works perfectly, but I'm using 2 ID's. I'm not quite getting how to manipulate the metadata to do what I want. (P.S. The powered block has the same texture, and won't be in the creative menu.)
-
Metadata sub-blocks with different classes?
Simple question that I haven't been able to find a good answer to: Can I make a block ID with each metadata value referencing a different class? i.e. A block that, when powered, will switch to another block with specific logic and emits redstone. Or am I going about this wrong?
-
Config Creation Crashes Client?
I have noticed that, as well. And you have been particularly helpful to me, in pretty much every thread I'm involved in, so thanks for that!
-
Config Creation Crashes Client?
It was. I just figured it out, and felt REALLY stupid. Sometimes I just need to think things through before I start asking for help all willy nilly. lol
-
Config Creation Crashes Client?
My mod works flawlessly until I try to implement a config file, upon which time, the client crashes upon running, claiming slot 0 is already occupied by another one of my blocks, regardless of how I had intended to set them in the config, and the generated config is blank. Is there some change in 1.5 that I didn't know about that makes this happen? In my @PreInit: Configuration config = new Configuration(event.getSuggestedConfigurationFile()); config.load(); //blocks IDRef.ABS_BLOCK_ID = config.getBlock("AbsBlock", IDRef.ABS_BLOCK_IDD).getInt(); IDRef.DARK_BLOCK_ID = config.getBlock("DarkBlock", IDRef.DARK_BLOCK_IDD).getInt(); IDRef.LIGHT_BLOCK_ID = config.getBlock("LightBlock", IDRef.LIGHT_BLOCK_IDD).getInt(); IDRef.HARVESTER_ID = config.getBlock("Harvester", IDRef.HARVESTER_IDD).getInt(); IDRef.ABS_COMP_ID = config.getBlock("AbsComp", IDRef.ABS_COMP_IDD).getInt(); //items IDRef.ABS_INGOT_ID = config.getItem("AbsIngot", IDRef.ABS_INGOT_IDD).getInt(); IDRef.ABS_ROD_ID = config.getItem("AbsRod", IDRef.ABS_ROD_IDD).getInt(); IDRef.DARK_BALL_ID = config.getItem("DarkBall", IDRef.DARK_BALL_IDD).getInt(); IDRef.DARK_INGOT_ID = config.getItem("DarkIngot", IDRef.DARK_INGOT_IDD).getInt(); IDRef.LIGHT_BALL_ID = config.getItem("LightBall", IDRef.LIGHT_BALL_IDD).getInt(); IDRef.LIGHT_INGOT_ID = config.getItem("LightIngot", IDRef.LIGHT_INGOT_IDD).getInt(); IDRef.UNSTABLE_ABS_ID = config.getItem("UnstableAbs", IDRef.UNSTABLE_ABS_IDD).getInt(); config.save(); EDIT: All the "SOMETHING_ID" fields are empty global variables, and "SOMETHING_IDD" are global variables with default ID values.
-
[SOLVED] Custom Collision Boxes and Disappearing Models
That worked perfectly! Thank you very much!
-
[SOLVED] Custom Collision Boxes and Disappearing Models
Ok, so I have a block with a custom model and collision box set, made so that it can spawn items inside of itself. the problem is that if the last collision box set goes mostly off camera, the whole block model just disappears! Anyone know a good way around this?
-
Render a block as a sprite?
So basically the main orb is a mostly static particle? I considered that idea, but I'm pretty inexperienced with particles, so I'll have to do some research!
-
WorldGeneration Liquid
Buildcraft has world gen liquid with its oil. It is also open source. I'd suggest starting there! https://github.com/BuildCraft/BuildCraft
-
No rendering in inventory?
Ok, first off, you'll want an item renderer class, which should look like this: package package.package; [imports] public class Item[YOURBLOCK]Renderer implements IItemRenderer { private [MODEL VAR] [MODEL]; public Item[YOUR BLOCK]Renderer() { [MODEL VAR] = new [MODEL](); } @Override public boolean handleRenderType(ItemStack item, ItemRenderType type) { return true; } @Override public boolean shouldUseRenderHelper(ItemRenderType type, ItemStack item, ItemRendererHelper helper) { return true; } @Override public void renderItem(ItemRenderType type, ItemStack item, Object... data) { TileEntityRenderer.instance.renderTileEntityAt(new TileEntity[YOUR TILE ENTITY](), 0.0D, 0.0D, 0.0D, 0.0F); } } and then register your item renderer in your Proxy like this: MinecraftForgeClient.registerItemRenderer([bLOCK ID], new Item[YOUR BLOCK]Renderer());
-
Render a block as a sprite?
Thanks for the push in the right direction! Now I just need to figure out what the parameters are for rendering a sprite.
-
Render a block as a sprite?
The block that Nitor places is rendered as a sprite with accompanying particle effects. It's definitely what is going on there, but I don't know enough OpenGL stuff to figure out what to do to replicate the effect.
-
Light Value Override?
Good point. What I mean is not fully replace every sky block in the area with a dummy block but only construct walls around the area so everything within would be darkened while still allowing mobs to spawn. I'm going to face a similar problem soon, too, so I'd really like to know the solution... I have tried to do it that way, and it works, but again, it's very gimmicky, and any light sources inside the range will still provide light, kinda ruining the effect regardless. It's not so much forcing the monsters to spawn as much as the spawning is supposed to be an effect of the block's use, so I'm not sure I'd want to do that, and as for your blindness thing, there is a function (I'll look up the name later) that gets all entities within a range of the specified coords, and then it's just a matter of adding the potion effect to the returned entity, which is fairly straightforward.
-
Light Value Override?
I considered that, but at the same time, I don't know how to circumvent it. My mod actually has a block that is semi-transparent, and has a full light opacity, and no collision. I'm trying to avoid using a gimmick like spawning invisible blocks, mainly because Wherever those blocks lay, mobs will not spawn, and there are various other issues, like replacing an invisible block with a regular one, then removing it, leaving a hole. Stupid light and its stupid properties... -.- lol
-
Render a block as a sprite?
I need some help figuring out how to render a placed block as a sprite, similar to how Thaumcraft's nitor is. I think it will serve my purpose better than a custom model, and I'd think, will be easier to implement.
-
Light Value Override?
I have tried using the World.setLightValue function (which IS different than the Block.setLightValue), to no avail, I've looked into using dummy darkness blocks, but the desired effect isn't there (because a block exists that isn't a sky block, mobs will not spawn, which is one of the big reasons for having the effect in the first place). I've looked into every class and every function I could find involving light, and I'm still lost. lol Another idea: Is it possible to change the light opacity of a sky block?
-
Light Value Override?
Hello! I was wondering if there was a clean way to override ambient light levels in specified air blocks. In other words, I want to make an area dark, regardless of light sources. Any ideas?
-
Overriding tool/weapon recipes??
Thanks! I'll have to look into implementing that!
-
Overriding tool/weapon recipes??
Hello! I'm attempting to override the recipes of all (Vanilla) tools and weapons, but they are not handled in CraftingManager so I can't just remove the recipes and add new ones... In any way that I can see, at least. So does anyone know a clean way to do so?
-
[SOLVED]Checking time with an item?
I got it working perfectly, and learned a few new interesting things I might want to do with the item! Thanks a lot!
-
[SOLVED]Checking time with an item?
- [SOLVED]Checking time with an item?
Thanks for the help! I'm still not sure how to implement the world object to tell time, but I'm sure I can figure it out with some research, especially with a push in the right direction!- [SOLVED]Checking time with an item?
I'm looking to adding a sword that changes its properties based on the time of day, but thus far have been unable to effectively run a check for the time. I was going to look at the code for the clock, but to my dismay, I couldn't find it! Basically, I am attempting to create a sword that is stronger during dusk and dawn hours of the Minecraft day. Any ideas? - [SOLVED]Checking time with an item?
IPS spam blocked by CleanTalk.
Important Information
By using this site, you agree to our Terms of Use.