Everything posted by Draco18s
-
[1.7.10] Detect if player is looking at the sun.
There's a function in the Block class that for the longest time had two parameters, one of which no one had any idea what it did. That parameter was a boolean which was only ever "true" when the player right-clicked with a boat and which water used to go "raytace me!" I java-doc'd it through MCP once, but I think in the 1.6 -> 1.7 update that got lost. Ah, no, it's still there. Block#canCollideCheck(...) Anyway, you'd want to wholesale replicate World's public MovingObjectPosition func_147447_a and just replace the call for Block#canCollideCheck(...) with Block#isOpaqueCube() There might be some edge cases where it doesn't return what you would like (e.g. a chest will return false, but ostensibly would block the user's view), but it'll be damn close. If you want something more accurate, you'll likely have to code it yourself.
-
[1.7.10] Problems using other mods in development environment
In a fit of irony: if I try that with Rotary Craft, it crashes, so wtf.
-
Item Names and Textures not showing?
"Something like" and "is" are not the same. If that's what your path is, it's wrong: yuppie missing a folder that has the same name as your mod id.
-
[1.7.10] Explosion needs to created in the server PLS HELP
Note: I have not registered a snowball item in 1.7, only 1.6, but the code looks very similar and I was able to look up the function just fine.
-
[1.7.10] Explosion needs to created in the server PLS HELP
Ok, be nice to the kid. Ernio's code is actually wrong. I've kind of only been skimming it, but given that Eclipse wouldn't import things and resolve the errors, I thought I'd take a look. getRenderItem() and getRenderManager() are both undefined for class Minecraft in 1.7.10 And RenderSnowball doesn't want either one in its constructor: RenderSnowball(Item p_i1259_1_, int p_i1259_2_){...}
-
[1.7.10] Problems using other mods in development environment
As an aside, I have CCC/NEI in my dev environment as external libraries. Doesn't crash...but doesn't load the mods either.
-
[1.7.10] Problems using other mods in development environment
Put CodeChickenCore in your mods folder. You may need the "dev" version. Your problem is that the dev environment is deobfuscated (so you can read it) and mods are obfuscated (so they bloody work). CCC does runtime deobf
-
[1.8] [SOLVED] Names of in-game objects acting funny?
You need to rename it in the file explorer. Notepad doesn't know what a .lang file is, so it assumed you meant .lang.txt
-
[1.8] [SOLVED] Names of in-game objects acting funny?
lang files!
-
[1.7.10] NBT persistent saving issue - adding additional player data
Scrap all of your IEEP code right now and go back to saving something simple, like an integer or a string. Figure out how it works first, doing one simple piece, then expand to encompass all the data you actually want. That way when you go from "well it saved a string" to "but it didn't save an array of strings" you can puzzle out why, rather than going, "fuck this doesn't work."
-
Custom biome taking the place of other biomes
list.add(new BiomeEntry(BiomeGenBase.forest, 10)); compared to BiomeManager.addBiome(BiomeType.DESERT, new BiomeEntry(MyBiome_1, 100)); Well. You kind of told the biome manager that your biomes are 10 times more common than every other vanilla biome.
-
[1.7.10] Furnace-Like GUI issues [SOLVED]
TE spoiler contains GuiContainer code. That said: Bad code monkey, no cookie. You don't need two blocks to make this work. Just because vanilla did it doesn't mean it was a good idea. There is no reason to swap blockIDs just because the furnace stopped cooking. Just make it display a different icon and emit a different amount of light. Both of those operations have functions that pass World/x/y/z.
-
[1.8] Some problems with TESR
This. And it will take a while. Be prepared to spend an hour or two tweaking and retweaking each vertex.
-
Crafting with a customblock.
No, they don't work, because you're trying to define/declare them outside of the correct mod lifecycle.
-
[1.7.10]Fill Bucket from right-clicking on a mob
Override public boolean interact(EntityPlayer p_70085_1_) in your entity. check that the player is holding a bucket, then do stuff.
-
Crafting with a customblock.
ItemStack stackBetterBomb = new ItemStack(BlockBetterBomb.getBlockFromItem(betterbomb)); What? No! Stop that. Do it like you did your other two stacks. ItemStack stackBetterBomb = new ItemStack(betterbomb)
-
[1.7.10] NBT persistent saving issue - adding additional player data
Panel 2 http://imgs.xkcd.com/comics/well_2.png[/img]
-
[1.7.10] Significant frame rate drop when looking at block with custom model..
I don't know why new ResourceLocation(...) takes so much time then. Because it does.
-
Please Help Me
Ok, I don't know what's wrong, but I suspect that it's your GUI Handler. if(ID == FireElementBlock.guiIDWorkSurface) { return ID == FireElementBlock.guiIDWorkSurface && world.getBlock(x, y, z) == FireElementBlock.blockWorkSurface ? new ContainerWorkSurface(player.inventory, world, x, y, z) : null; } The hell are you doing here? First you're checking to see if the ID is the right ID, then you check to see if the ID is the right ID. if(ID == FireElementBlock.guiIDWorkSurface) { return ID new ContainerWorkSurface(player.inventory, world, x, y, z); } Done. And do the same to the other one for the client side.
-
[Solved] How to make this per-block
worldObject.isRemote http://www.minecraftforge.net/forum/index.php/topic,22764.0.html
-
[1.7.10] Significant frame rate drop when looking at block with custom model..
It's this. You're causing Minecraft to load the texture from disk and reallocate memory for it (and then immediately discard it) every frame.
-
[1.8] Sword Projectile (Need Help)
How would I do that? http://en.wikipedia.org/wiki/Method_overriding
-
[Solved] How to make this per-block
Well I can tell you right now that this: @Override public void updateEntity() { this.moveEye(); } @SideOnly(Side.CLIENT) public void moveEye() { //... } Will crash the dedicated server.
-
Feasibility of "Blackboard" Mod idea
...and rather than sending the data when the typer hits "done" you send it immediately as soon as it changes.
-
[1.8]ItemBlock crash
Ah, I know what it is. You need to have a constructor that takes a block in its constructor, because the method is called via Reflection and Forge doesn't know that you've given a 0-parameter constructor and passed the block yourself. In other words: you thought you were being clever and instead Forge is saying, "no you idiot, that's bad!" public ItemBlockCoalGun(Block b) { super(b); setMaxStackSize(1); setUnlocalizedName("coal_gun"); } It's to insure that the Block you're registering the ItemBlock for is actually passed to the ItemBlock class.
IPS spam blocked by CleanTalk.