Everything posted by ImaFool
-
Special ResourceLocation
What does srg mean and how can I get it?
-
Special ResourceLocation
I'm new to reflection, how do I add something to a field? My first attemt: f = Minecraft.class.getDeclaredField("defaultResourcePacks"); f.setAccessible(true); List list = (List) f.get(Minecraft.getMinecraft()); list.add(..);
-
Special ResourceLocation
I don't know if I get this straight, you mean I can just put "C:\Users\User\Desktop" as a domain? Or I have to "create" a domain? Explain that part a little bit please
-
Special ResourceLocation
Hello, Is it possible to make a resource location with a location outside the minecraft jar? Like just on my desktop or something?
-
[1.7.10]Spawning Lightning Bolts
I suggest you just use onItemUse(ItemStack par1ItemStack, EntityPlayer par2EntityPlayer, World par3World, int par4, int par5, int par6, int par7, float par8, float par9, float par10) wich gives u the x,y,z coords off the block clicked. note this will not work for clicking on air water and lava
-
[1.7.10]Spawning Lightning Bolts
Uhm, im pretty damn sure the maxDamage parameters are the x, y, z coords How else would minecraft know where to spawn it?
-
[1.6.4][SOLVED]Ghost Items in Container
I dont know what this code is supposed to do at all. Just use this: if(!world.isRemote) { TileEntity tileEntity = world.getBlockTileEntity(x, y, z); if (tileEntity != null) player.openGui(OreManager.instance, 0, world, x, y, z); } return true;
-
[1.6.4][SOLVED]Ghost Items in Container
In your onBlockActivated check for !world.isRemote only open a tile entity on server
-
[1.8] Get world name
Or world.getWorldInfo().getWorldName() Don't know where's the difference
-
[1.7.10/9] Making a powered block glow?
all resource packs do is, they contain all the items blocks gui's.. -textures for the redstone lamp this is "redstone_lamp_on" and "redstone_lamp_off", eg dirt only has "dirt". cuz its not ment to have a diffrent texture based on its powerd or not: Soooo, you cant achieve what u want with only a resource pack.
-
Auto Smelting Pickaxe
Cant be that hard, check in breakBlockEvent (or something similar) if your custom pickaxe was used to break the block, no: do nothing. yes: check if the block has a furnace recipe. no: do nothing. yes: remove the old drop and add the furnace recipe output Edit: ahh w8, you don't have to use a event ofc
-
Generate block on the surface instead of in the ground (Just like flowers)
ofc
-
Generate block on the surface instead of in the ground (Just like flowers)
int j1 = y + random.nextInt(4) - random.nextInt(4); Thats where u set the height, ofc your flowers get set in the groung use the method world.getHeightValue() to get the height of a position
-
How do I generate blocks onthe surface (Like flowers)
Is there a reason you dont use IWorldGenerator? That would make things easier
-
[1.7.10/9] Making a powered block glow?
So, u want to do that programmatically or with a resourcepack? For custom blocks or vanilla blocks? I dont know how that guy in the vid did it, dont think thats possible. Edit: look at the comments: "All the texture pack does is retexture redstone lamps, all of you have been fooled"
-
1.7.10 Making it rain in all biomes
Field xy = BiomeGenBase.class.getDeclaredField("enableRain"); xy.setAccessible(true); xy.set(BiomeGenBase.desert, true); like that? Cuz it's still not raining in the desert, I have the code in my preInit is that alright?
-
1.7.10 Making it rain in all biomes
Uhm, im trying to get into reflection, can somebody tell me whats wrong with this code: Field xy = BiomeGenBase.desert.getClass().getSuperclass().getDeclaredField("enableRain"); xy.setAccessible(true); xy.set(true, null); Cause the error looks somewhat weird in my eyes: Can not set boolean field net.minecraft.world.biome.BiomeGenBase.enableRain to java.lang.Boolean
-
get the block instance thingy from block
I found Block.getStateById & Block.getStateId, that's going to cause problems with other mods, hu?
-
get the block instance thingy from block
But how do I get the metadata of a block? world.getBlockMetadata() does not exist anymore
-
get the block instance thingy from block
Uhm, lil off-topic, did metadata actually got replaces by the BlockState in 1.8? if not, how do I get the metadata of a block? (sry didnt found something useful with google)
-
get the block instance thingy from block
K, thanks
-
get the block instance thingy from block
Well, I'm writing a tool for structure generation, (I know there are a few out there), so basically u hit 2 blocks with a new item and it should give you the java code for all the blocks in between there like: world.setBlockState(pos, Blocks.sand.getStateFromMeta(..)); So what would you suggest to do? Can I get the block back from the id?
-
get the block instance thingy from block
Hey guys, probably a java question: When I for example call world.getBlockState(pos).getBlock() and there is a sand block, I want to have "Blocks.sand" as a String. The closest i got to is world.getBlockState(pos).getBlock().getClass().getTypeName() but well thats the BlockSand class.. So, basically I got the class X with the variable y in it, how can i get the String "X.y"?
-
[1.7.10] disallowing tooluse under a certain condition
I guess PlayerUseItemEvent is a good place to start for example, check if the item is a pickaxe and if the players level is less then 10 and the cancel then event. I dont know what to do for the armor
-
An issue of potential Harrassement being supported by some moderators here
and to the harsh harassment thingy, well seriously, you'll get over it, u cant expect ever person in the world to be super nice to you. And actually this is not "harassment" They just got a little mad, maybe they could have said it a little bit nicer
IPS spam blocked by CleanTalk.