Everything posted by GotoLink
-
Using the oredictionary...
That can't work. The base principle of crafting is to return a defined result, not a "general" item. What is the "proper" planks anyway ?
-
on item break get new item? [SOLVED]
PlayerDestroyItemEvent There are couple tutorials about events on the wiki, and some threads about it here.
-
Item with different damage crafting problem
Item#setHasSubtypes(true) You need that so merging check for the item damage beforehand.
-
Help with custom chat packet handling (casting EntityClientPlayerMP problem)
cGeneral.stringInInputFieldText; Don't reference the gui class in your packet handler. Write that field into the packet, then read it into the packet handler. You can use Packet.writeString(String, DataOutput) for that.
-
[Solved] Breaking blocks when shift-right-clicking with specific item [1.6]
Change things on server side: if(!world.isRemote){ }
-
[SOLVED] Custom Liquid Issues
You have trouble constructing objects and fixing a null exception. That isn't an issue with Forge. registerBLock(blockSewageWater, "FluidSewageWater"); Does that method exist ?
-
Singleplayer tabs?
You have to do it yourself from the ground up. Nothing in vanilla does it. Start by adding buttons to the list of buttons in the main inventory gui after it is opened. You can use custom buttons that render like tabs, and open another gui on click.
-
[ unsolved ] - Issue with ASM not finding the correct class
Your thing isn't mod compatible at all. You are replacing the entire class simply to add a method. Use ASM to add the method into the vanilla class.
-
Sound play problem.
You don't need a TileEntity. But the updateTick needs a first call so then the ticks will be scheduled. For example with Block#onBlockPlacedBy(...)
-
Help With Read Text From File
Minecraft#mcDataDir Links to Minecraft active folder. Then you can use whatever child path you want.
-
Help with custom chat packet handling (casting EntityClientPlayerMP problem)
Huh...no, quite the opposite actually. By the way, gui is client side only, so you don't need to check.
-
getStrVsBlock and setToolClass Harvest Level
MinecraftForge.setToolClass(myItemTool, "pickaxe", 3); I did miss that on your post. This ForgeHooks thing only applies to Item, not ItemStack with NBT and all that. You'd better use PlayerEvent.HarvestCheck and PlayerEvent.BreakSpeed rather than this. If you still want to use it, you'd have to set the bricks harvest level too. MinecraftForge.setBlockHarvestLevel(Block.bricks, "pickaxe", 0); I've already explained why any pick can harvest bricks, without relying on this hook. With ItemPickaxe#canHarvestBlock returning true for any block with material as rock, except a few ores block.
-
Gui additional tabs
I'd add buttons that renders like that, their position being set relative to the current gui size. Each one links to a different gui, while all gui contains all buttons, with the button linking to the current gui is disabled.
-
getStrVsBlock and setToolClass Harvest Level
Not really backwards you know...if you can harvest a block without any str, then you don't need to check the str required If you try a diamond pickaxe on obsidian, it won't get the str check. That is expected. Always return false, and you'll always get the str check.
-
Sound play problem.
In Block#updateTick(World,...) use World#playSound(String,...) then World#scheduleBlockUpdate(...) try to set the delay to something close to the sound length in ticks.
-
And... What the heck just happened?
I'd suggest override: Block#onNeighborBlockUpdate(...) check if neighbour is the fluid source, then set the block to air.
-
can we have a "forgegradle in a nutshell"
"Better" building process than Maven and "better" dependency management than Ant, supposedly ? You can migrate from both to Gradle. That's all i know.
-
And... What the heck just happened?
Of course snow block does that. Snow material is set to being replaceable.
-
Block with TlieEntity adn Container gui nullpointer
When do you initialize your GuiHandler ?
-
getStrVsBlock and setToolClass Harvest Level
par1Block.blockMaterial == Material.rock ? true: If that is from the ItemPickaxe, then you get the expected result. You might want to do things differently.
-
And... What the heck just happened?
What is the block material ?
-
getStrVsBlock and setToolClass Harvest Level
Item#canHarvestBlock(Block, ItemStack) If you return true, you won't get the str check. Same goes if the block Material#isAdventureModeExempt(). Vanilla material for bricks is rock, which is not exempt, IIRC. From EntityPlayer: if (block.blockMaterial.isAdventureModeExempt()) { return true; } if (this.getCurrentEquippedItem() != null) { ItemStack itemstack = this.getCurrentEquippedItem(); if (itemstack.canHarvestBlock(block) || itemstack.getStrVsBlock(block) > 1.0F) { return true; } }
-
NBT information lost on player dead
Yes, you can write on the NBT which is stored on the "persisted tag" key.
-
Trying to make vanilla client server side mods with forge
I thought Forge was compatible with vanilla...maybe you should report this as a bug.
-
Making the entire world snow?
Or maybe changing every biome to being "snowable" ? BiomeGenBase#setEnableSnow() BiomeGenBase#setTemperatureRainfall(0.0F, wtvF)
IPS spam blocked by CleanTalk.