Jump to content
View in the app

A better way to browse. Learn more.

Forge Forums

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

WiseNoobCrusher

Members
  • Joined

  • Last visited

Everything posted by WiseNoobCrusher

  1. Well this post went off topic real quick Just want to know how to make an axe lose durability when using it in a crafting recipe.
  2. Ik, I am the worst for posting 2 questions in a day but, again newb I want to be able to chop the planks up with an axe and make it lose its durability. There isn't seem to be any tutorial on how to do it, so I came here Again, link to my code: https://github.com/WiseNoobCrusher/Extra-Additions/tree/master/src EDIT: I meant use it in a crafting recipe and make it lose durability, sorry for the confusion.
  3. So basically, do not register dummy recipe?
  4. Is it possible to overwrite this with a new recipe?
  5. Apparently this: public class DummyRecipe extends IForgeRegistryEntry.Impl<IRecipe> implements IRecipe Does not want to play nice EDIT: nvm had to manually import it.
  6. I am a newbie at this and wanted to disable the wood log recipe, how would I go about doing that? Link to all classes: https://github.com/WiseNoobCrusher/Extra-Additions/tree/master/src/main
  7. I solved it!!! The new code: package com.hardwareplus.mod; import java.util.List; import java.util.Random; import javax.swing.Icon; import cpw.mods.fml.relauncher.Side; import cpw.mods.fml.relauncher.SideOnly; import net.minecraft.block.Block; import net.minecraft.block.BlockLog; import net.minecraft.block.material.Material; import net.minecraft.client.renderer.texture.IIconRegister; import net.minecraft.creativetab.CreativeTabs; import net.minecraft.item.Item; import net.minecraft.item.ItemStack; import net.minecraft.util.IIcon; import net.minecraft.world.IBlockAccess; import net.minecraft.world.World; public class BlockOakLog extends BlockLog { public static final String[] field_150169_M = new String[] {"new_oak"}; private static final String __OBFID = "CL_00000277"; public void getSubBlocks(Item p_149666_1_, List p_149666_3_) { p_149666_3_.add(new ItemStack(p_149666_1_, 1, 0)); p_149666_3_.add(new ItemStack(p_149666_1_, 1, 1)); } public void registerBlockIcons(IIconRegister p_149651_1_) { this.field_150167_a = new IIcon[field_150169_M.length]; this.field_150166_b = new IIcon[field_150169_M.length]; for (int var2 = 0; var2 < this.field_150167_a.length; ++var2) { this.field_150167_a[var2] = p_149651_1_.registerIcon("hardwareplus:oaklogside2"); this.field_150166_b[var2] = p_149651_1_.registerIcon("hardwareplus:oaklogside0"); } } } Thx larsgerrits for the idea man I appreciate it!!!
  8. Crashed: ---- Minecraft Crash Report ---- // Don't do that. Time: 03/09/15 11:17 AM Description: Rendering item java.lang.NullPointerException: Rendering item at net.minecraft.block.BlockLog.getTopIcon(BlockLog.java:80) at net.minecraft.block.BlockRotatedPillar.getIcon(BlockRotatedPillar.java:64) at net.minecraft.block.Block.getBlockTextureFromSide(Block.java:686) at net.minecraft.item.ItemBlock.getIconFromDamage(ItemBlock.java:51) at net.minecraft.item.Item.getIconIndex(Item.java:457) at net.minecraft.item.ItemStack.getIconIndex(ItemStack.java:131) at net.minecraft.client.renderer.entity.RenderItem.renderItemIntoGUI(RenderItem.java:420) at net.minecraft.client.renderer.entity.RenderItem.renderItemAndEffectIntoGUI(RenderItem.java:585) at net.minecraft.client.gui.GuiIngame.renderInventorySlot(GuiIngame.java:973) at net.minecraftforge.client.GuiIngameForge.renderHotbar(GuiIngameForge.java:209) at net.minecraftforge.client.GuiIngameForge.renderGameOverlay(GuiIngameForge.java:144) at net.minecraft.client.renderer.EntityRenderer.updateCameraAndRender(EntityRenderer.java:1114) at net.minecraft.client.Minecraft.runGameLoop(Minecraft.java:1067) at net.minecraft.client.Minecraft.run(Minecraft.java:962) at net.minecraft.client.main.Main.main(Main.java:164) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source) at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) at java.lang.reflect.Method.invoke(Unknown Source) at net.minecraft.launchwrapper.Launch.launch(Launch.java:135) at net.minecraft.launchwrapper.Launch.main(Launch.java:28) at net.minecraftforge.gradle.GradleStartCommon.launch(Unknown Source) at GradleStart.main(Unknown Source) A detailed walkthrough of the error, its code path and all known details is as follows: --------------------------------------------------------------------------------------- -- Head -- Stacktrace: at net.minecraft.block.BlockLog.getTopIcon(BlockLog.java:80) at net.minecraft.block.BlockRotatedPillar.getIcon(BlockRotatedPillar.java:64) at net.minecraft.block.Block.getBlockTextureFromSide(Block.java:686) at net.minecraft.item.ItemBlock.getIconFromDamage(ItemBlock.java:51) at net.minecraft.item.Item.getIconIndex(Item.java:457) at net.minecraft.item.ItemStack.getIconIndex(ItemStack.java:131) at net.minecraft.client.renderer.entity.RenderItem.renderItemIntoGUI(RenderItem.java:420) -- Item being rendered -- Details: Item Type: net.minecraft.item.ItemBlock@64f1e9f8 Item Aux: 0 Item NBT: null Item Foil: false Stacktrace: at net.minecraft.client.renderer.entity.RenderItem.renderItemAndEffectIntoGUI(RenderItem.java:585) at net.minecraft.client.gui.GuiIngame.renderInventorySlot(GuiIngame.java:973) at net.minecraftforge.client.GuiIngameForge.renderHotbar(GuiIngameForge.java:209) at net.minecraftforge.client.GuiIngameForge.renderGameOverlay(GuiIngameForge.java:144) -- Affected level -- Details: Level name: MpServer All players: 1 total; [EntityClientPlayerMP['Player769'/291, l='MpServer', x=-803.91, y=5.62, z=-349.24]] Chunk stats: MultiplayerChunkCache: 0, 0 Level seed: 0 Level generator: ID 01 - flat, ver 0. Features enabled: false Level generator options: Level spawn location: World: (-782,4,-319), Chunk: (at 2,0,1 in -49,-20; contains blocks -784,0,-320 to -769,255,-305), Region: (-2,-1; contains chunks -64,-32 to -33,-1, blocks -1024,0,-512 to -513,255,-1) Level time: 359990 game time, 359990 day time Level dimension: 0 Level storage version: 0x00000 - Unknown? Level weather: Rain time: 0 (now: true), thunder time: 0 (now: false) Level game mode: Game mode: creative (ID 1). Hardcore: false. Cheats: false Forced entities: 1 total; [EntityClientPlayerMP['Player769'/291, l='MpServer', x=-803.91, y=5.62, z=-349.24]] Retry entities: 0 total; [] Server brand: fml,forge Server type: Integrated singleplayer server Stacktrace: at net.minecraft.client.multiplayer.WorldClient.addWorldInfoToCrashReport(WorldClient.java:415) at net.minecraft.client.Minecraft.addGraphicsAndWorldToCrashReport(Minecraft.java:2566) at net.minecraft.client.Minecraft.run(Minecraft.java:984) at net.minecraft.client.main.Main.main(Main.java:164) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source) at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) at java.lang.reflect.Method.invoke(Unknown Source) at net.minecraft.launchwrapper.Launch.launch(Launch.java:135) at net.minecraft.launchwrapper.Launch.main(Launch.java:28) at net.minecraftforge.gradle.GradleStartCommon.launch(Unknown Source) at GradleStart.main(Unknown Source) -- System Details -- Details: Minecraft Version: 1.7.10 Operating System: Windows 10 (amd64) version 10.0 Java Version: 1.8.0_60, Oracle Corporation Java VM Version: Java HotSpot(TM) 64-Bit Server VM (mixed mode), Oracle Corporation Memory: 849252096 bytes (809 MB) / 1038876672 bytes (990 MB) up to 1038876672 bytes (990 MB) JVM Flags: 3 total; -Xincgc -Xmx1024M -Xms1024M AABB Pool Size: 0 (0 bytes; 0 MB) allocated, 0 (0 bytes; 0 MB) used IntCache: cache: 0, tcache: 0, allocated: 0, tallocated: 0 FML: MCP v9.05 FML v7.10.99.99 Minecraft Forge 10.13.4.1448 4 mods loaded, 4 mods active States: 'U' = Unloaded 'L' = Loaded 'C' = Constructed 'H' = Pre-initialized 'I' = Initialized 'J' = Post-initialized 'A' = Available 'D' = Disabled 'E' = Errored UCHIJAAAA mcp{9.05} [Minecraft Coder Pack] (minecraft.jar) UCHIJAAAA FML{7.10.99.99} [Forge Mod Loader] (forgeSrc-1.7.10-10.13.4.1448-1.7.10.jar) UCHIJAAAA Forge{10.13.4.1448} [Minecraft Forge] (forgeSrc-1.7.10-10.13.4.1448-1.7.10.jar) UCHIJAAAA hardwareplus{0.1} [Hardware Plus] (bin) GL info: ' Vendor: 'Intel' Version: '4.0.0 - Build 10.18.10.4252' Renderer: 'Intel(R) HD Graphics' Launched Version: 1.7.10 LWJGL: 2.9.1 OpenGL: Intel(R) HD Graphics GL version 4.0.0 - Build 10.18.10.4252, Intel GL Caps: Using GL 1.3 multitexturing. Using framebuffer objects because OpenGL 3.0 is supported and separate blending is supported. Anisotropic filtering is supported and maximum anisotropy is 16. Shaders are available because OpenGL 2.1 is supported. Is Modded: Definitely; Client brand changed to 'fml,forge' Type: Client (map_client.txt) Resource Packs: [] Current Language: English (US) Profiler Position: N/A (disabled) Vec3 Pool Size: 0 (0 bytes; 0 MB) allocated, 0 (0 bytes; 0 MB) used Anisotropic Filtering: Off (1) My BlockOakLog class: package com.hardwareplus.mod; import java.util.Random; import javax.swing.Icon; import net.minecraft.block.Block; import net.minecraft.block.BlockLog; import net.minecraft.block.material.Material; import net.minecraft.item.Item; import net.minecraft.util.IIcon; import net.minecraft.world.World; public class BlockOakLog extends BlockLog { protected IIcon[] field_150167_a; protected IIcon[] field_150166_b; private static final String __OBFID = "CL_00000266"; public BlockOakLog() { super(); this.setCreativeTab(HardwarePlus.tabHardwarePlus); this.setHardness(2.0F); this.setStepSound(soundTypeWood); } public static int func_150165_c(int p_150165_0_) { return p_150165_0_ & 3; } /** * Returns the quantity of items to drop on block destruction. */ public int quantityDropped(Random p_149745_1_) { return 1; } public Item getItemDropped(int p_149650_1_, Random p_149650_2_, int p_149650_3_) { return Item.getItemFromBlock(this); } public void breakBlock(World p_149749_1_, int p_149749_2_, int p_149749_3_, int p_149749_4_, Block p_149749_5_, int p_149749_6_) { byte var7 = 4; int var8 = var7 + 1; if (p_149749_1_.checkChunksExist(p_149749_2_ - var8, p_149749_3_ - var8, p_149749_4_ - var8, p_149749_2_ + var8, p_149749_3_ + var8, p_149749_4_ + var8)) { for (int var9 = -var7; var9 <= var7; ++var9) { for (int var10 = -var7; var10 <= var7; ++var10) { for (int var11 = -var7; var11 <= var7; ++var11) { if (p_149749_1_.getBlock(p_149749_2_ + var9, p_149749_3_ + var10, p_149749_4_ + var11).getMaterial() == Material.leaves) { int var12 = p_149749_1_.getBlockMetadata(p_149749_2_ + var9, p_149749_3_ + var10, p_149749_4_ + var11); if ((var12 & == 0) { p_149749_1_.setBlockMetadataWithNotify(p_149749_2_ + var9, p_149749_3_ + var10, p_149749_4_ + var11, var12 | 8, 4); } } } } } } } protected IIcon func_150163_b(int p_150163_1_) { return this.field_150167_a[p_150163_1_ % this.field_150167_a.length]; } protected IIcon func_150161_d(int p_150161_1_) { return this.field_150166_b[p_150161_1_ % this.field_150166_b.length]; } protected BlockOakLog(Material material) { } } What did i do wrong?
  9. kk i am copying the same code from BlockLog and extended the class to that to see if that works
  10. Tried this sort of code but no luck the bottom of the log texture is the side texture... package com.hardwareplus.mod; import javax.swing.Icon; import cpw.mods.fml.relauncher.Side; import cpw.mods.fml.relauncher.SideOnly; import net.minecraft.block.Block; import net.minecraft.block.material.Material; import net.minecraft.client.renderer.texture.IIconRegister; import net.minecraft.entity.EntityLivingBase; import net.minecraft.item.ItemStack; import net.minecraft.tileentity.TileEntityMobSpawner; import net.minecraft.tileentity.TileEntityPiston; import net.minecraft.util.IIcon; import net.minecraft.util.MathHelper; import net.minecraft.world.World; import net.minecraftforge.common.util.ForgeDirection; public class BlockOakLog extends Block { private IIcon top, bottom; protected BlockOakLog(Material material) { super(material); this.setHardness(2F); this.setResistance(10F); this.setStepSound(soundTypeWood); } public void registerBlockIcons (IIconRegister iiconRegister) { this.blockIcon = iiconRegister.registerIcon("hardwareplus:oaklogside2"); this.top = iiconRegister.registerIcon("hardwareplus:oaklogside0"); this.bottom = iiconRegister.registerIcon("hardwareplus:oaklogside1"); } public void onBlockPlacedBy(World world, int x, int y, int z, EntityLivingBase living, ItemStack stack) { int direction = MathHelper.floor_double((double)(living.rotationYaw * 4.0F / 360.0F) + 2.5D) & 3; world.setBlockMetadataWithNotify(x, y, z, direction, 2); } @SideOnly(Side.CLIENT) public IIcon getIcon(int side, int metadata) { return side == 3 && metadata == 0 ? this.top : (side == 1 && metadata == 0 ? this.top : (side == 4 && metadata == 1 ? this.top : (side == 2 && metadata == 2 ? this.top : (side == 5 && metadata == 3 ? this.top : this.blockIcon)))); } public boolean rotateBlock(World world, int x, int y, int z, ForgeDirection axis) { if((axis == ForgeDirection.UP || axis == ForgeDirection.DOWN) && !world.isRemote) { int direction = world.getBlockMetadata(x, y, z) + 1; if(direction > 3) { direction = 0; } world.setBlockMetadataWithNotify(x, y, z, direction, 3); return true; } return false; } public ForgeDirection[] getValidRotations(World world, int x, int y, int z) { return new ForgeDirection[] {ForgeDirection.UP, ForgeDirection.DOWN}; } } Can someone tell me what is wrong plz
  11. Yeah i ran out of ideas on how to fix it so does anyone know the problem with the code?
  12. Ok so if anyone knows what i did wrong then feel free to tell me but otherwise i am going to go experiment
  13. Sorry for being mean, i am just angry that i can't find a solution. Anyway i changed the code, am i close to the solution or am i still completely wrong? Code package com.hardwareplus.mod; import javax.swing.Icon; import cpw.mods.fml.relauncher.SideOnly; import net.minecraft.block.Block; import net.minecraft.block.material.Material; import net.minecraft.client.renderer.texture.IIconRegister; import net.minecraft.entity.EntityLivingBase; import net.minecraft.item.ItemStack; import net.minecraft.tileentity.TileEntity; import net.minecraft.tileentity.TileEntityFurnace; import net.minecraft.tileentity.TileEntityMobSpawner; import net.minecraft.tileentity.TileEntityPiston; import net.minecraft.util.IIcon; import net.minecraft.util.MathHelper; import net.minecraft.world.World; public class BlockOakLog extends Block { public IIcon top0; public IIcon top1; public IIcon sides; protected BlockOakLog(Material material) { super(material); this.setHardness(2F); this.setResistance(10F); this.setStepSound(soundTypeWood); } @Override 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) + 2.5D) & 3; par1World.setBlockMetadataWithNotify(par2, par3, par4, l, 2); } @Override public void registerBlockIcons(IIconRegister iconRegister) { top0 = iconRegister.registerIcon("hardwareplus:oaklogside0"); top1 = iconRegister.registerIcon("hardwareplus:oaklogside0"); sides = iconRegister.registerIcon("hardwareplus:oaklogside2"); } @Override public IIcon getIcon(int side, int meta) { if (meta == 0 && side == 1) return top0; else if (meta == 1 && side == 1) return top1; else if (meta == 2 && side == 1) return top0; else if (meta == 3 && side == 1) return top1; return sides; } }
  14. Do u even know how long i have been trying to find a solution for this

Important Information

By using this site, you agree to our Terms of Use.

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.