
starwarsmace
Members-
Posts
333 -
Joined
-
Last visited
Everything posted by starwarsmace
-
[1.8] [SOLVED] Can't Reduce Amount of energy in a pipe
starwarsmace replied to AnZaNaMa's topic in Modder Support
public void subtractEnergy(int energy){ this.energyContained = this.energyContained + energy; } Its never helpful to add energy when you want to be removing it. -
To really understand what your code is doing, you should look at all the functions called. Then look at the source code for those functions, go back till you understand what all the functions that are called inside that function. Then do the same for all the other ones.
-
[1.8.9] Render armour on player without item
starwarsmace replied to Wehavecookies56's topic in Modder Support
I tried doing that, the problem is getting it perfectly aligned with the player. I have some really bad memories associated with aligning models with players... I was rendering a .obj model as a sword and it was hard. I had to change a number than restart minecraft. Till I found the perfect match. It was a painstaking process that took a long time. Then after I finished spending hours on trying to align it, I found out that in debugging mode, it will change it without you having to restart minecraft. So, just run it in debug mode and try looking for the perfect numbers. -
[1.8.9] Switch contents between inventories on key press
starwarsmace replied to LogicTechCorp's topic in Modder Support
Well, this should help. -
[1.8.9] Switch contents between inventories on key press
starwarsmace replied to LogicTechCorp's topic in Modder Support
To be honest, I really dont see why you would store something in a scythe and what a pouch would have anything to do with it. -
[1.8.9] Switch contents between inventories on key press
starwarsmace replied to LogicTechCorp's topic in Modder Support
I think what he means is that the scythe inventory is completely unrelated from the pouch inventory. But, when you press a certain key it switches the item that's stored in the scythe, and moves it over the to the end of the pouch. But that first item in the pouch is moved over to the scythe inventory. It then moves over all the original pouch items one slot, so the scythe item is at the end. -
[1.8.9] Switch contents between inventories on key press
starwarsmace replied to LogicTechCorp's topic in Modder Support
Woah. Thats a whole lot of switching and moving... I think this is how I would do it: 1. Set the scythe to pouch and the pouch to the scythe. 2. Loop through the entire inventory of the pouch, and set the item to the slot before it by subtracting one from the slot number. -
[1.8] Big solid door Block of 3x3 x1 size how ??
starwarsmace replied to perromercenary00's topic in Modder Support
Heh. Imagine that. -
How do I make my Truck work? Help Me!!!
starwarsmace replied to WitherBoss2000's topic in Modder Support
Wow, I have to say you've got some of the best explanations. Very thorough, tells you where to look, and at the same time isn't spoonfeeding. Not sure you can get any better than that. -
[UNSOLVED]Strange things happen with my energysystem[1.8]
starwarsmace replied to ItsAMysteriousYT's topic in Modder Support
okayyyy...But what excactly am i sending in that packet then? Do i send the whole tileentity? If yes, how? This will probably help. Also, as diesieben said, you can send whatever you need to know on the client side. So if you want the amount of energy in the gui(I think that's what you want) you send the amount in the packet to the client. -
[1.7.10] what is the current equivalent of IPlayerTracker?
starwarsmace replied to kauan99's topic in Modder Support
Why is it hacky? -
Said webmaster(s) shouldn't. They are illegally redistributing other's work, and sometimes claiming credit for it. If one or more of your mods ends up on one of these sites, you should immediately have them take it down. And how? Websites like 9minecraft.com don't give a **** about you and definitely are not going to take down the mod. I mean you can try and file a complaint to google to take it down but...
-
Making a custom rail placed on any side of a block
starwarsmace replied to starwarsmace's topic in Modder Support
Hmmmm.... I just realized something that I should have realized a long time ago... I could just flip the block render wise on a 180 degree angle if its upside down. Isn't it something like... GL11.glPushMatrix(); GL11.glRotatef(0, 180, 0, 0); GL11.glPopMatrix(); -
Making a custom rail placed on any side of a block
starwarsmace replied to starwarsmace's topic in Modder Support
Ok... im stumped... I really don't know what the heck the code for rendering the lever in RenderBlocks means... I think I should start from scratch... How exactly do I make the renderer...? -
Making a custom rail placed on any side of a block
starwarsmace replied to starwarsmace's topic in Modder Support
Oh... Is the button and lever some type of special render in the render type? That would explain it.... What handles rotated forms? Found this though... /** * The type of render function that is called for this block */ public int getRenderType() { return 12; } Wait in the render types, they have numbers, maybe I could copy/ modify one of the lever renderers or something. I'll see what I can come up with. -
I have been trying to make rails that you put on any side of the block and it will still work. So like upside down riding. Anyway, for the time being I'm just trying to be able to put the rail on any side of the block. Here is my code for it. package com.starwarsmace.sticky_rails.blocks; import static net.minecraftforge.common.util.ForgeDirection.EAST; import static net.minecraftforge.common.util.ForgeDirection.NORTH; import static net.minecraftforge.common.util.ForgeDirection.SOUTH; import static net.minecraftforge.common.util.ForgeDirection.WEST; import static net.minecraftforge.common.util.ForgeDirection.UP; import static net.minecraftforge.common.util.ForgeDirection.DOWN; import net.minecraft.block.BlockRail; import net.minecraft.world.World; import net.minecraftforge.common.util.ForgeDirection; public class StickyRail extends BlockRail{ public StickyRail(){ super(); } public boolean canPlaceBlockOnSide(World world, int x, int y, int z, int orientation){ ForgeDirection dir = ForgeDirection.getOrientation(orientation); return (dir == DOWN && world.isSideSolid(x, y + 1, z, DOWN )) || (dir == UP && world.isSideSolid(x, y - 1, z, UP )) || (dir == NORTH && world.isSideSolid(x, y, z + 1, NORTH)) || (dir == SOUTH && world.isSideSolid(x, y, z - 1, SOUTH)) || (dir == WEST && world.isSideSolid(x + 1, y, z, WEST )) || (dir == EAST && world.isSideSolid(x - 1, y, z, EAST )); } public boolean canPlaceBlockAt(World world, int x, int y, int z){ return world.isSideSolid(x - 1, y, z, EAST ) || world.isSideSolid(x + 1, y, z, WEST ) || world.isSideSolid(x, y, z - 1, SOUTH) || world.isSideSolid(x, y, z + 1, NORTH) || world.isSideSolid(x, y - 1, z, UP ) || world.isSideSolid(x, y + 1, z, DOWN ); } } It behaves almost exactly like a regular rail. I can't place it anywhere special like underneath or on the sides. What else special do you have to do? In the lever class this is all that was needed to be put on any side of a block. I must be missing something...
-
how to add a drop to a vanilla mob [1.7.10]
starwarsmace replied to 2FastAssassin's topic in Modder Support
Don't register your eventhandler on both buses... -
Don't use drawTexturedModalRect use this: public static void drawTexturedQuadFit(double x, double y, double width, double height, double zLevel){ Tessellator tessellator = Tessellator.instance; tessellator.startDrawingQuads(); tessellator.addVertexWithUV(x + 0, y + height, zLevel, 0,1); tessellator.addVertexWithUV(x + width, y + height, zLevel, 1, 1); tessellator.addVertexWithUV(x + width, y + 0, zLevel, 1,0); tessellator.addVertexWithUV(x + 0, y + 0, zLevel, 0, 0); tessellator.draw(); } And call that whenever you need to instead of the drawTexturedModalRect I dont think it will help with your problem but ok.. Try putting the box at 0,0 and see if that works...
-
[1.7.10]No OpenGL context found in current thread?
starwarsmace replied to HappyKiller1O1's topic in Modder Support
Theres a thank you button if you want to... you know.... thank somebody -
[1.7.10] Packet Out Of Bounds Exception
starwarsmace replied to starwarsmace's topic in Modder Support
Not the nicest... Not the best.... But it works And the player can't run it because its a server command... Edit: Another question: Would reflection really be better than this idea? -
[1.7.10]No OpenGL context found in current thread?
starwarsmace replied to HappyKiller1O1's topic in Modder Support
Yes and as I had told you in the other thread to have that canUpdate boolean? In the onMessage of your packet have it set the canUpdate to true. -
I don't see anything wrong with it at first glance. Run it and tell us if anything goes wrong.
-
[1.7.10] Packet Out Of Bounds Exception
starwarsmace replied to starwarsmace's topic in Modder Support
Well yes... But instead of using reflection, I could call a server command that I made in forge on bukkit and then that calls whatever I need to call... -
Textures Missing in Client but not Eclipse Executor
starwarsmace replied to gosaints70's topic in Modder Support
Let me try asking other people to fix the short circuit in my machine... without showing the machine! Show the code!