-
Posts
16559 -
Joined
-
Last visited
-
Days Won
156
Everything posted by Draco18s
-
Now that I look at your setVals function, I can tell you're doing it wrong. double xx = par3Entity.posX; double yy = par3Entity.posY-1; double zz = par3Entity.posZ; Vec3 v = par3Entity.getLookVec(); xx += v.xCoord; zz += v.zCoord; int x = (int)xx; int y = (int)yy; int z = (int)zz; world.setBlock(x, y, z, Block.brick.blockID); That sets the block directly in front of the player, at the level that they're walking, to bricks. It doesn't take into account strafing, but your intent doesn't appear to need that (my own use could benefit from it, but I'm more amused by the fact that it doesn't).
-
ResourceLocation("assets/mschouses/textures/generation/somefile.png");
-
"mschouses:BLAHBLAH" -> "src/minecraft/assets/mschouses/textures/*/BLAHBLAH.png" When you compile for release, you just add the /assets directory to the root of your zip file. Where * is either "blocks" or "items" depending on if you have registered a block texture or an item texture. A few others may be handled as well (i.e. gui, entities, etc.) but I haven't checked.
-
Actually that's where it SHOULD NOT be. And one thing you're not doing, that you should be, is overriding RegisterIcon: public void registerIcons(IconRegister par1IconRegister) { this.blockIcon = par1IconRegister.registerIcon("mymodid:myblock"); } Then the texture goes in src/minecraft/assets/mymodid/textures/blocks/myblock.png
-
RENDERING DISTANCE PROBLEM in Custom modeled block
Draco18s replied to Alesimula's topic in Modder Support
A little forewarning. The tessellator is very difficult to work with. When I was working on rail bridges (can't find any pictures) I spent probably 4 hours individually drawing planes with the tessellator to get it to look right. I kept getting them backwards, or in the wrong place, even twisted on a few occasions. -
[SOLVED] Change block properties in an if statement.
Draco18s replied to Flayr's topic in Modder Support
Use block metadata. When the block is placed, set its metadata to a value based on its position (etc.etc.) and then create a tile entity based on the metadata using: public TileEntity createTileEntity(World world, int metadata) { } -
[SOLVED] Change block properties in an if statement.
Draco18s replied to Flayr's topic in Modder Support
You haven't actually used a TileEntity have you? When you (the modder) creates one, you don't have block coordinates. You only have the world: @Override public TileEntity createNewTileEntity(World world) { return new MyTileEntity(); } Vanilla code handles the rest. -
You've gone about things in a really weird way, took me almost 10 minutes to figure it out. And... I have no idea.
-
Look at BlockIce to figure out what you're doing wrong. You gave the block a transparent texture, but didn't tell the rendering engine that it is a transparent block.
-
[SOLVED] Change block properties in an if statement.
Draco18s replied to Flayr's topic in Modder Support
if(!this.worldObj.isRemote) { //I am on the server, therefore all objects I can see are on the server } -
I'm actually avoiding using events for this mod. I've decided to rename this "bug" as "feature."
-
This function is not called for item frames. It is only called for living entities as indicated by the parameter type passed (and tested anyway, no dice). Tested a few other functions, none of them are covered either.
-
I will look at that, thanks!
-
My signature arose from the fact that I tried to kindly remind someone that they shouldn't post in mod threads about updates. I was all "hey, I just found out myself, but your post is technically against the TOS, didn't want to get you in trouble, just thought I'd let you know." Someone decided I was being a total asshat. Flames ensued. I ended up reporting my own post to the mods for calling myself an asshole. So I created my signature in an effort to deter such events in the future.
-
You mean the one I'm working on? At last check I have over 67 million different items which may or may not have enchantments.
-
Welcome to client-server disparity. The alternations you're seeing are Client: not-set, Server: set, Client: not-set, Server: set You need to start using packets.
-
If you are using any of the FML (or ModLoader) classes, you're doing it wrong. You need to find out the correct Forge class/method to call (use Eclipse's navigation tools to go look at the FML method to find the Forge method it calls, then change your code).
-
So add a variable which is a timer that gets decremented to 0 every onUpdate. If the timer is 0 when the player interacts with it, set the timer to 6000 (5 minutes) or whatever
-
[SOLVED] Change block properties in an if statement.
Draco18s replied to Flayr's topic in Modder Support
if(player.getHeldItem() == new ItemStack(MagicLights.lightStaff)){ That is not how you check to see if two item stacks are equal. You need to use the ItemStack.equal(stack, stack) function. -
[SOLVED] Change block properties in an if statement.
Draco18s replied to Flayr's topic in Modder Support
This is where your IDE comes in. If you look at the error it tells you that the objects don't match and to add a cast. player = (EntityPlayer) w.get(i); -
Proxies allow you to register renderers, because the server doesn't HAVE a renderer, so trying to do so will throw class not found errors.
-
Forge is an API, of sorts, to allow mods to work without creating conflicts due to all the base-class editing. Instead Forge does it once and mods just use hooks to make the changes they need. ModLoader is an API, of sorts, that allows mods to work without creating conflicts, blah blah blah, written by different authors with a slightly different feature set. FML (Forge ModLoader) is an API-API that allows Forge to run ModLoader mods without needing ModLoader installed.