Everything posted by TLHPoE
-
onNeighborBlockChange -> activate block
Don't think that's quite possible unless you do some base class edits.
-
[UNSOLVED] Generating Custom Flowers in Prexisting Biomes?
Just don't check for a biome at all. Also, tweak your block so that it can spawn on anything. Unless you don't want it to spawn on everything, just make it spawn on BlockGrass. Most other mods' grass blocks will extend BlockGrass.
-
Rendering my GuiContainer alongside the inventory?
I've figured out a way to detect when the player's inventory is open, but is it possible to render another GuiContainer on the side of the inventory?
-
[HELP] Making A wire(Like IC2) To Transfer Data. Still Unsolved!
I would recommend looking into how spawner's spawn their mobs (for the tick) Then just look at the chest's code for the unifying with other wires.
-
[HELP] Making A wire(Like IC2) To Transfer Data. Still Unsolved!
You would have to "bind" a tile entity to the wire. With that tile entity, you can use it's NBT methods to write how much data the wire has stored up. You could also use the onBlockPlacedBy method in Block to connect to other wires.
-
Editing spawner's NBT?
Are there any tags I could add to make the spawner spawn entities with a potion effect?
-
Editing spawner's NBT?
Much thanks Draco
-
Transporting the player to the overworld?
Ok, I've tweaked my code so that it has a flag. It's still stuck in a recursive loop though? Edit: I tried putting the "nbt.setBoolean("Joined", true); behind the travelToDimension method, still a stack trace error.
-
Editing spawner's NBT?
I know that there are external programs that can easily edit an existing spawner's NBT data, but how would I do it in code? I've looked around the code, and there are tags that you can write to the spawner's NBT. Does anybody know of a list of the possible tags? As in tags that would adjust the entity? I.E. Potion effects?
-
Server side integer saving?
If you need help with using an ItemStack's NBT, look around in Minecraft's code.
-
How to change the item drop of a mob when killed
First of all, editing any base class and distributing it is illegal. Unless you use ASM, which is very un-needed for this situation. What I would recommend, is looking into Forge's events. Here is a great tutorial by AtomicStryker: http://www.minecraftforum.net/topic/1419836-forge-4x-events-howto/
-
Custom Chests Connecting to each other?
In my mod, I add 2 chests that run on 1 class. My problem, is that they get buggy when I place them next to each other. They also get buggy when I place them right next to the vanilla chest. Am I missing something? I looked inside BlockChest and saw some methods. But those methods used a check for block IDs, which shouldn't be a problem. BlockColoredChest:
-
Transporting the player to the overworld?
Not sure if I'm doing this the most efficient way possible, but I have this piece of code: if(world.provider.dimensionId != 0 && player.ridingEntity == null && player.riddenByEntity == null && !world.isRemote) { player.travelToDimension(0); } It's job is to just teleport the player to the overworld if they're not already there. After that, I teleport the player else where. But I get a stack over flow error whenever I'm in a dimension that isn't the overworld. Crash log:
-
Opening GuiScreen?
Yeah, I have the NetworkMod annotation.
-
Homing projectile
I guess you could try finding out how entities move and get the location of the entity you want to kill. There was something with AxisAllignedBB for detecting entities within the bounding box.
-
What is @Instance?
I'm almost 100% sure that if you want to use GUIs, then you'll need the Instance annotation.
-
Opening GuiScreen?
I tried it like this: if(player.worldObj.isRemote) { player.openGui(RPG.instance, 0, player.worldObj, (int) player.posX, (int) player.posY, (int) player.posZ); } Didn't call the client method? Do I need a container? Sorry if I sound a bit dumb, today has not been my brightest day.
-
Opening GuiScreen?
Oh. I just tried putting a print in, and it turns out that it doesn't call the Client side thing. But it does call the server side...
-
Opening GuiScreen?
I'm trying to open a GUI that extends GuiScreen, but nothing seems to happen. I put a check to see if my GUI handler was working, and it was. GuiStats: GuiHandler: Code I use to open it: player.openGui(RPG.instance, 0, player.worldObj, (int) player.posX, (int) player.posY, (int) player.posZ);
-
Detecting slot change?
Agghhhhh. Kind of the same problem, but I put it in, it detects equipped, I remove it, nothing. I close and re-open, and it detects nothing.
-
Detecting slot change?
Thanks for all the help, one last problem though. I was testing and saw it earlier and knew the cause, but I had to go do something else. Now I can't figure out why it says that it's equipping and unequipping every tick.
-
Custom Enchantment WaterWorker
I'm assuming that you mean that when the player is holding the pickaxe, it has the effect. First, I would make a player tick handler, and check if the player was holding your pickaxe. And after that, I would find out how "WaterWorker" actually applies it's effects to the player. Finally, I would apply said effects to the player in the tick handler.
-
Making a furnace explode
ASM is something about core mods and transforming base classes. Assuming that you're working with a custom furnace, just look into how other things explode. Usually you get a world object and there's a method to cause an explosion.
-
Detecting slot change?
Ok, I've moved the code back into my player tick handler. Currently, it refuses to detect nothing different with the slots. I know it's checking them because of a check I added, but it doesn't detect anything different. http://pastebin.com/fX1yvk0j
-
Detecting slot change?
Ok, I've switched to a much more efficient way. Instead of doing it every tick, I'm doing it every time a slot changes. My only problem now, is that it detects if it's been equipped. But if I try to remove it, it does nothing. It also only detects if it's equipped when it's the first thing I do in the inventory. I have to close and reopen for it to detect it. My code:
IPS spam blocked by CleanTalk.