-
Posts
588 -
Joined
-
Last visited
Everything posted by shadowfacts
-
If what you're trying to accomplish is making it easier to add furnace fuels, you could have an interface which you implement that requires a method like int getBurnTime(), then in the IFuelHandler you could check if the block/item is an instance of your interface, if so, cast it and return the burn time from getBurnTime(). A side note: Using your example you could use something like this to make it a little easier: ArrayList<ItemStack> burnList = new ArrayList<ItemStack>(); for (ItemStack stack : burnList) { // do stuff... }
-
1. What do you mean "enter multiple lines of code per item", you can add more code before the return statement in each case of the if loop. 2. What appraoches have you tried? 3. What do you mean "I cant seem to get it to call the item/block and the burn times"?
-
FireDrgn, just go here and you can set it yourself.
-
The packet doesn't modify the NBT, it tells the server which player's inventory to modify, which slot, and what the modification should be. In the onMessage of the packet handler the server modifies the the correct item. For packets I suggest using this tutorial.
-
[1.6.4][SOLVED] Need Dev builds of a Item Transfer mod
shadowfacts replied to AceScottie's topic in Modder Support
Translocator by Chicken Bones, use the dropdown to switch to 1.6.4, hit the "Translocator" button and download the dev version of the most recent one. The translocators should work on any side. (You will also need CodeChickenCore) -
Not sure if 1.7.10 requires Java 7, but you might be using a Java feature that was added (or changed) in Java 7, hence not being able to use your mod with Java 6.
-
FireDrgn, that is the correct order for the parameters, ExtendedHorizons just had minY and maxY reversed.
-
Disable XP spawned from a mod spawner
shadowfacts replied to TheSgtPunishment's topic in Modder Support
If you can't stop MFR from creating mob essence, then it sounds like it's futile to try and prevent the mobs from dropping experience. -
Switch 1f with 0f when you call setBlockBounds() the first one should be the minimum x and the second one should be the maximum x, it looks like you have these flipped.
-
1. Why are you taking and integer as a parameter for the constructor? 2. Are you using the right constructor when you initialize the block?
-
Disable XP spawned from a mod spawner
shadowfacts replied to TheSgtPunishment's topic in Modder Support
On a side note: I see no reason why the spawned mobs shouldn't be able to drop experience. This makes soul shards useless for experience spawners. If it's balancing that you're worried about, start by nerfing tier 5 spawners. -
[1.7.10] Increasing a Player's Step Height
shadowfacts replied to angellus's topic in Modder Support
Show the code for getThePlayer() -
Disable XP spawned from a mod spawner
shadowfacts replied to TheSgtPunishment's topic in Modder Support
Unless there is a publicly accessible method or field, you would have to use ASM. -
1. Use the IBlockAccess (in your case, it's named world) and use it to find the TileEntity of your furnce, use world.getTileEntity(x, y, z), make sure it is an instance of YourCustomFurnaceTileEntity, cast it to one, use a field/method to ask the tile entity wether or not it's active. By doing it this way instead of the Vanilla way, you don't need to have two blocks (active and inactive) but just one. 2. Return any IIcon that you register in registerIcons, you will need to check the side to see if you should return the side icon or the front active/idle icon. This is the furnace that I made, feel free to use it as a refernece. Other than a minor graphical glitch, mine works perfectly.
-
In getIcon, you should be checking if the metadata == side, instead you are checking if the metadata == 0 and the side == 3. This will only use the front furnace texture on side 3. I suggest you use something like this to check if the furnace is active: @SideOnly(Side.CLIENT) public IIcon getIcon(IBlockAccess world, int x, int y, int z, int side) { // get wether the furnace is active, then return the propper texture }
-
Did you read the third sentence? mcmod.info is part of your mod's assets.
-
I have a block, BlockZinchoriumFurnace, which also has a TileEntity and I want to change the texture based on data from the TileEntity, namely, wether the furnace is burning or not. I found this but its out of date and getBlockTexture doesn't seem to exist anymore. Any help would be greatly appreciated . Also, here is the source code for the rest of my mod, and this is required mod, contains base classes and whatnot.
-
[1.6.4] Random crash in development environment
shadowfacts replied to SkylordJoel's topic in Modder Support
Don't use 1.6.4 use 1.7.10 or 1.8. -
What does your mod do? If it adds blocks/items then it NEEDS to be on the server as well as the client to work properly. Also why do you need to check if the player is op on a server?
-
You could do this two ways: 1. Just make a separate texture for the "active" block and use something like Photoshop or GIMP to tint the normal texture red. 2. As for programmatically, I have no idea how you would do this, sorry.
-
You should finish packet-responses to make it easier to see if the packet has been received. The packet might have been received but nothing happened because Minecraft didn't know what do with it, so the packet was discarded.
-
Not sure about this but theoretically you could use GameRegistry.registerCustomItemStack(String name, ItemStack itemstack) with an ItemStack that already has the default NBT data on it.
-
Yeah, the slash in unnecessary because Forge automatically prepends the classpath of your mod to the beginning of path that you provide.