Abastro
Forge Modder-
Posts
1075 -
Joined
-
Last visited
-
Days Won
2
Everything posted by Abastro
-
Then please show your code..
-
Oh, sorry. I used improper word. By the way, then you can use the method for your dimension, too. It is far from any bugs, and I think this way is standard for those uses.
-
first, override onBlockPlacedBy: /** * Called when the block is placed in the world. */ public void onBlockPlacedBy(World par1World, int par2, int par3, int par4, EntityLivingBase par5EntityLivingBase, ItemStack par6ItemStack) { int l = MathHelper.floor_double((double)(par5EntityLivingBase.rotationYaw * 4.0F / 360.0F) + 0.5D) & 3; if (l == 0) { par1World.setBlockMetadataWithNotify(par2, par3, par4, 2, 2); } if (l == 1) { par1World.setBlockMetadataWithNotify(par2, par3, par4, 5, 2); } if (l == 2) { par1World.setBlockMetadataWithNotify(par2, par3, par4, 3, 2); } if (l == 3) { par1World.setBlockMetadataWithNotify(par2, par3, par4, 4, 2); } if (par6ItemStack.hasDisplayName()) { ((TileHeatFurnace)par1World.getBlockTileEntity(par2, par3, par4)).setGuiDisplayName(par6ItemStack.getDisplayName()); } } The metadata is the direction of the furnace. You can see Direction class to see the name of each direction
-
[1.7.2] Custom Bow / Arrow Need help! [SOLVED / FIXED]
Abastro replied to proalt's topic in Modder Support
I think it is has to do with GL11.glRotatef(par1EntityBolt.prevRotationYaw + (par1EntityBolt.rotationYaw - par1EntityBolt.prevRotationYaw) * par9 - 90.0F, 0.0F, 1.0F, 0.0F); Maybe GL11.glRotatef(par1EntityBolt.prevRotationYaw + (par1EntityBolt.rotationYaw - par1EntityBolt.prevRotationYaw) * par9, 0.0F, 1.0F, 0.0F); is correct. -
Yes, it DOES keep them constant. Since the Brightness in the minecraft day is from the SUN, the light level is Highly Dependent to the position of the SUN. If someone has the SUN stop, then the day-light cycle would gone in most world, even in minecraft. Please do not neglect the Sky and the SUN, and do not use the unreliable way.
-
How did you initialize the stackTagCompound? I think this problem is related with the problem...
-
Override the calculateCelestialAngle method of your WorldProvider class, and just return 0.75F every time. So, It would look like this: public float calculateCelestialAngle(long par1, float par3) { return 0.75F; }
-
You can also make a crossover mod for your mod and the another mod. you can have several mods in your mod.jar, so you can pack them in a jar.
-
For second question, you can implement IFluidHandler. You can use the FluidTank to support it. Let the tileentity implement it, and when a bucket is interacting with the tileentity, let the block handle the state. For first question, I think it would be related with slot, so please post your container...
-
Hmm.. maybe you are confused with capital letters. Do not make and use a static variable: tileentitykeypad. Just change all of them to: tileEntityKeyPad. It was already declared in the GuiKeyPad class, but not used.
-
I'll change name of some parameters so you can easily understand them. //This method is called when right-clicked with an item. //I think it was for placing block from the items, so the block position would be where a block would appear. //bx, by, bz is the coordinate of the clicked region. //side is the placing side. Bottom = 0, Top = 1, East = 2, West = 3, North = 4, South = 5. //px, py, pz is the coordinate of the player relative to the clicked block. public boolean onItemUse(ItemStack used, EntityPlayer player, World world, int bx, int by, int bz, int side, float px, float py, float pz) { //clicked bottom of the block if (side == 0) { //decreases the y position to get the actual clicked block --by; } //clicked top of the block if (side == 1) { //increases the y position to get the actual clicked block ++by; } //and so on... if (side == 2) { --bz; } if (side == 3) { ++bz; } if (side == 4) { --bx; } if (side == 5) { ++bx; } //check if player can edit the block. if (!player.canPlayerEdit(bx, by, bz, side, used)) { //Item didnt used. return false; } else { //When the block is air, if (world.isAirBlock(bx, by, bz)) { //play Sound at the center of the block. world.playSoundEffect((double)x+ 0.5D, (double)y+ 0.5D, (double)z+ 0.5D, "fire.ignite", 1.0F, itemRand.nextFloat() * 0.4F + 0.8F); //Sets the Block! world.setBlock(par4, par5, par6, Block.fire.blockID); } //Damages the Item. used.damageItem(1, player); //Item used. return true; }
-
Then please post your code now. I think it would be changed a lot..
-
You already have the tileEntityKeyPad in GuiKeyPad class, So you can use it. Also, if the variable is not static, it will be always an initialized variable when you calls "new TileEntityKeyPad().pass". So you should not use new TileEntityKeyPad(). Just use the tileEntityKeyPad in GuiKeyPad class for those use, I think it is the solution.
-
I think the problem is, that you moves the position of the player BEFORE transferring dimension. It would probably cause some issues, like on the case that teleport to the position is invalid.
-
why do you use "new TileEntityKeyPad()" every time? It would be a new instance, and using the component of the instance would be no use. instead, you can use GuiKeyPad#tileEntityKeyPad. Replace new TileEntityKeyPad() to tileEntityKeyPad.
-
So, you have to deal with each of them. It seems that there are no other ways to do that.
-
Try again till the "gradlew setupDecompWorkspace --reresh-dependencies" builds successful. (<-I had mistaken too;) It might have some random errors, I also frustrated with them. But it finally built successful when I tried 4~5 times.
-
They are another type of recipe, so you have to check each of them. It might be hard to deal with all of them, but it is necessary if you want to deal with every recipe.
-
What were the red exclamation marks? please show us them.
-
Of course most recipes would be saved to the IRecipes, but there are an exceptional case. Tool Damage adding Recipes is the case. They are processed externally, not related with the IRecipes. You can see the code in the net.minecraft.item.crafting.CraftingManager. However, It is simple case so you would easily be able to deal with the case.
-
http://www.minecraftforge.net/forum/index.php?topic=17281.25 I think the topic above would be help.