LTLightning
-
Posts
18 -
Joined
-
Last visited
Posts posted by LTLightning
-
-
Pseudo-code, put it inside your armor class:
@Override
public void onArmorTick(World world, EntityPlayer player, ItemStack itemStack){
if (// check if armor is there){
// allow flight here
} else {
// disable flight
}
}
-
Something like this should work:
public boolean onBlockStartBreak(ItemStack itemstack, int x, int y, int z, EntityPlayer player){ if (!player.worldObj.isRemote){ player.worldObj.setBlockToAir(x, y, z); // spawn item here } itemstack.damageItem(1, player); return false; }
-
I'm using this, which seems to work:
public static org.apache.logging.log4j.Logger logger;
@EventHandler
public void preInit(FMLPreInitializationEvent event){
logger = event.getModLog();
logger.info("Something");
}
-
One of these two:
CraftingManager.getInstance().getRecipeList().add(new ShapedOreRecipe(result, recipe));
CraftingManager.getInstance().getRecipeList().add(new ShapelessOreRecipe(result, recipe));
-
Learn Java. It's:
if (!world.isRemote()){
}
-
Correct me if I'm wrong, but can't you do:
Items.item.setTextureName("mod:other_texture");
Where "item" is the vanilla item, "mod" is your folder for textures, and "other_texture" is for your other texture.
-
-
Hi
I'm not sure I understand your question correctly, but it sounds to me like you have many swords made of different materials all within the one class, and each sword should only be repaired by its corresponding material eg
copper ingot for copper sword
iron ingot for iron sword
lead ingot for lead sword
Very much like the vanilla ItemSword with wood, stone, diamond, etc
If so, your isRepairable might look something like ItemSword.getIsRepairable, except that you have to add your own ingots
public boolean getIsRepairable(ItemStack par1ItemStack, ItemStack par2ItemStack) { switch (materialIamMadeOf) { case iron: { return ingotIron == par2ItemStack.itemID ? true : super.getIsRepairable(par1ItemStack, par2ItemStack); } case copper: { return ingotCopper == par2ItemStack.itemID ? true : super.getIsRepairable(par1ItemStack, par2ItemStack); } etc
-TGG
Yup, that's what I meant! What should I put in the switch()?
-
That works, but then the copper sword can be repaired with a steel ingot and a copper ingot. Same thing with a steel sword.
-
Hi there! I know it's possible to add tools and armors to the anvil repair system by doing this:
public boolean getIsRepairable(ItemStack par1ItemStack, ItemStack par2ItemStack) {
return ingotSomething == par2ItemStack.itemID ? true : super.getIsRepairable(par1ItemStack, par2ItemStack);
}
But I made it so that all my swords are put into one class like so:
public static Item copperSword = new ItemModSword...
public static Item steelSword = new ItemModSword...
Which means the getIsRepairable will only allow one item to use for repairing. My question is, is there a way to use more than one item for repairing depending on what tool I put in the anvil, without making new classes?
-
Nevermind! All fixed! Sorry about that.
-
Tried with recommended and latest.
If I open the file I downloaded, cmd opens a split second and says: Could not find or load main class
If I extract it and run the .java, nothing happens.
Using Java 64Bit. Help please, new to the 1.6 installation.
-
Also, Littleblocks mod isn't compatible with Gullliver mod. They said so on the mod's page.
-
Sorry if I'm not allowed to double post, but I think I fixed my problem.
1. I deleted minecraft.jar.
2. I force updated.
3. And everything seems fixed, no more crashing at all.
-
Nothing at all. Mods folder and coremods folder is empty. I disabled all mods in Magic Launcher too. Also, I tried installing Forge the old way (copy-pasting into the jar), and same thing happens.
Where would I find an fml log? Is it in the crash-reports folder? If it is, then it's not there.
EDIT: When using with mods, Minecraft crashes at start. Just so you know.
-
Anything I can do? And how am I not installing it correctly? I downloaded it from files.minecraftforge.net and did what you would do when installing a mod using Magic Launcher. Also, I don't wanna use another launcher because I like Magic Launcher.
-
Not using anything else but Forge. Coremods folder is empty. Any forge related config are deleted, but Minecraft crashes when creating a new world. It doesn't without Forge.
---- Minecraft Crash Report ----
// Oops.
Time: 5/9/13 6:58 PM
Description: Exception preparing structure feature
java.lang.NoSuchMethodError: net.minecraft.world.World.v()Lnet/minecraft/world/biome/WorldChunkManager;
at net.minecraft.world.gen.feature.MapGenScatteredFeature.func_75047_a(SourceFile:54)
at net.minecraft.world.gen.structure.MapGenStructure.func_75037_a(SourceFile:32)
at net.minecraft.world.gen.MapGenBase.func_75036_a(SourceFile:29)
at net.minecraft.world.gen.ChunkProviderGenerate.func_73154_d(ChunkProviderGenerate.java:335)
at net.minecraft.world.gen.ChunkProviderServer.func_73158_c(ChunkProviderServer.java:131)
at net.minecraft.world.gen.ChunkProviderServer.func_73154_d(ChunkProviderServer.java:166)
at net.minecraft.world.World.func_72964_e(World.java:525)
at net.minecraft.world.World.func_72798_a(World.java:410)
at net.minecraft.world.World.func_72799_c(World.java:434)
at net.minecraft.world.World.func_72922_b(World.java:381)
at net.minecraft.world.WorldProvider.func_76566_a(WorldProvider.java:100)
at net.minecraft.world.WorldServer.func_73052_b(WorldServer.java:837)
at net.minecraft.world.WorldServer.func_72963_a(WorldServer.java:801)
at net.minecraft.world.World.<init>(World.java:294)
at net.minecraft.world.WorldServer.<init>(WorldServer.java:107)
at net.minecraft.server.integrated.IntegratedServer.func_71247_a(IntegratedServer.java:72)
at net.minecraft.server.integrated.IntegratedServer.func_71197_b(IntegratedServer.java:105)
at net.minecraft.server.MinecraftServer.run(MinecraftServer.java:430)
at net.minecraft.server.ThreadMinecraftServer.run(SourceFile:573)
A detailed walkthrough of the error, its code path and all known details is as follows:
---------------------------------------------------------------------------------------
-- Head --
Stacktrace:
at net.minecraft.world.gen.feature.MapGenScatteredFeature.func_75047_a(SourceFile:54)
-- Feature being prepared --
Details:
Is feature chunk: ~~ERROR~~ NoSuchMethodError: net.minecraft.world.World.v()Lnet/minecraft/world/biome/WorldChunkManager;
Chunk location: 9,4
Chunk pos hash: 17179869193
Structure type: net.minecraft.world.gen.feature.MapGenScatteredFeature
Stacktrace:
at net.minecraft.world.gen.structure.MapGenStructure.func_75037_a(SourceFile:32)
at net.minecraft.world.gen.MapGenBase.func_75036_a(SourceFile:29)
at net.minecraft.world.gen.ChunkProviderGenerate.func_73154_d(ChunkProviderGenerate.java:335)
-- Chunk to be generated --
Details:
Location: 1,0
Position hash: 1
Generator: RandomLevelSource
Stacktrace:
at net.minecraft.world.gen.ChunkProviderServer.func_73158_c(ChunkProviderServer.java:131)
at net.minecraft.world.gen.ChunkProviderServer.func_73154_d(ChunkProviderServer.java:166)
at net.minecraft.world.World.func_72964_e(World.java:525)
-- Requested block coordinates --
Details:
Found chunk: true
Location: World: (30,64,3), Chunk: (at 14,4,3 in 1,0; contains blocks 16,0,0 to 31,255,15), Region: (0,0; contains chunks 0,0 to 31,31, blocks 0,0,0 to 511,255,511)
Stacktrace:
at net.minecraft.world.World.func_72798_a(World.java:410)
at net.minecraft.world.World.func_72799_c(World.java:434)
at net.minecraft.world.World.func_72922_b(World.java:381)
at net.minecraft.world.WorldProvider.func_76566_a(WorldProvider.java:100)
at net.minecraft.world.WorldServer.func_73052_b(WorldServer.java:837)
at net.minecraft.world.WorldServer.func_72963_a(WorldServer.java:801)
-- Affected level --
Details:
Level name: Test 2
All players: 0 total; []
Chunk stats: ServerChunkCache: 1 Drop: 0
Level seed: 800868553892490320
Level generator: ID 00 - default, ver 1. Features enabled: true
Level generator options:
Level spawn location: World: (0,0,0), Chunk: (at 0,0,0 in 0,0; contains blocks 0,0,0 to 15,255,15), Region: (0,0; contains chunks 0,0 to 31,31, blocks 0,0,0 to 511,255,511)
Level time: 0 game time, 0 day time
Level dimension: 0
Level storage version: 0x04ABD - Anvil
Level weather: Rain time: 0 (now: false), thunder time: 0 (now: false)
Level game mode: Game mode: creative (ID 1). Hardcore: false. Cheats: true
Stacktrace:
at net.minecraft.world.World.<init>(World.java:294)
at net.minecraft.world.WorldServer.<init>(WorldServer.java:107)
at net.minecraft.server.integrated.IntegratedServer.func_71247_a(IntegratedServer.java:72)
at net.minecraft.server.integrated.IntegratedServer.func_71197_b(IntegratedServer.java:105)
at net.minecraft.server.MinecraftServer.run(MinecraftServer.java:430)
at net.minecraft.server.ThreadMinecraftServer.run(SourceFile:573)
-- System Details --
Details:
Minecraft Version: 1.5.2
Operating System: Windows 7 (amd64) version 6.1
Java Version: 1.7.0_17, Oracle Corporation
Java VM Version: Java HotSpot 64-Bit Server VM (mixed mode), Oracle Corporation
Memory: 492895488 bytes (470 MB) / 681508864 bytes (649 MB) up to 699072512 bytes (666 MB)
JVM Flags: 2 total; -Xms750m -Xmx750m
AABB Pool Size: 0 (0 bytes; 0 MB) allocated, 0 (0 bytes; 0 MB) used
Suspicious classes: FML and Forge are installed
IntCache: cache: 16, tcache: 0, allocated: 3, tallocated: 63
FML: MCP v7.51 FML v5.2.5.691 Minecraft Forge 7.8.0.691 3 mods loaded, 3 mods active
mcp{7.44} [Minecraft Coder Pack] (minecraft.jar) Unloaded->Constructed->Pre-initialized->Initialized->Post-initialized->Available->Available
FML{5.2.5.691} [Forge Mod Loader] (coremods) Unloaded->Constructed->Pre-initialized->Initialized->Post-initialized->Available->Available
Forge{7.8.0.691} [Minecraft Forge] (coremods) Unloaded->Constructed->Pre-initialized->Initialized->Post-initialized->Available->Available
Profiler Position: N/A (disabled)
Player Count: 0 / 8; []
Type: Integrated Server (map_client.txt)
Is Modded: Definitely; Client brand changed to 'fml,forge'
More info: I'm using 1.5.2. Magic Launcher also says that Forge is not compatible (but I don't trust it that much). This also happens on older versions, including recommended version. I'll add more info if you guys need.
How to tell when a piece of armor is unequipped?
in Modder Support
Posted
Ah, I forgot that. Whoops.