Jump to content

OwnAgePau

Forge Modder
  • Posts

    217
  • Joined

  • Last visited

Converted

  • Gender
    Male
  • URL
    http://www.planetminecraft.com/mod/151-soul-forest-10-ores-vines-dimension-mobs-and-more/
  • Location
    The Netherlands
  • Personal Text
    Soul Forest Mod

OwnAgePau's Achievements

Creeper Killer

Creeper Killer (4/8)

4

Reputation

  1. But isn't it so in this case that on remote it sets the output and thus the enchantment on that output, but then on local it doesn't put anything in the output at all. And therefor I am not able to take anything out? Because If I turn this around, visually it doesn't set the output but locally and "underwater" there is something in the output and when I click the output slot I get the output with an enchantment. It seems that on remote it sets what the output looks like but what you actually get from the output happens on the !remote side....
  2. Well when I do that it won't let me grab the result out of the slot.
  3. It is a bit messy though and I currently removed the split between remote or not. public void onCraftMatrixChanged(IInventory par1IInventory){ ItemStack result = GemmingCraftingRecipes.getInstance().findMatchingRecipe(this.craftMatrix, this.worldObj); if(!this.worldObj.isRemote){ if(result != null){ ItemStack input = null; if(this.getSlot(0).getStack() != null){ input = this.getSlot(0).getStack(); } if(this.getSlot(1).getStack() != null){ input = this.getSlot(1).getStack(); } if(input != null){ if(input.getItem() != SoulItems.ScarletiteAmuletStone.get()){ ArrayList<Enchantment> enchants = new ArrayList(); for(Enchantment e : Enchantment.enchantmentsList){ if(e != null){ if(e.canApply(input)){ enchants.add(e); } } } System.out.println("--------------------------"); int random = new Random().nextInt(enchants.size()); Enchantment newEnchantment = enchants.get(random); System.out.println("New Enchantment : " + newEnchantment.getName()); Map map = EnchantmentHelper.getEnchantments(input); Iterator iterator = map.keySet().iterator(); int newEnchLevel = 0; boolean flag = false; while (iterator.hasNext()){ int i = ((Integer)iterator.next()).intValue(); Enchantment ench = Enchantment.enchantmentsList[i]; int enchLevel = map.containsKey(Integer.valueOf(i)) ? ((Integer)map.get(Integer.valueOf(i))).intValue() : 0; System.out.println(ench.effectId + ", " + newEnchantment.effectId); if(ench.effectId == newEnchantment.effectId){ flag = true; enchLevel += 1; } boolean flag1 = ench.canApply(result); if("enchantment.lootBonusDigger".equals(newEnchantment.getName())){ if("enchantment.untouching".equals(ench.getName())){ flag1 = false; } } if("enchantment.untouching".equals(newEnchantment.getName())){ if("enchantment.lootBonusDigger".equals(ench.getName())){ flag1 = false; } } if(!(newEnchantment.canApplyTogether(ench) && ench.canApplyTogether(newEnchantment))){ flag1 = false; } if(flag1){ if (enchLevel > ench.getMaxLevel()){ enchLevel = ench.getMaxLevel(); } System.out.println("ID : " + ench.getName() + ", lvl : " + enchLevel); map.put(Integer.valueOf(ench.effectId), Integer.valueOf(enchLevel)); } else{ if (enchLevel > ench.getMaxLevel()){ enchLevel = ench.getMaxLevel(); } System.out.println("ID : " + ench.getName() + ", lvl : " + enchLevel); map.put(Integer.valueOf(ench.effectId), Integer.valueOf(enchLevel)); } } if(!flag){ if (newEnchLevel > newEnchantment.getMaxLevel()){ newEnchLevel = newEnchantment.getMaxLevel(); } if(newEnchLevel == 0){ newEnchLevel += 1; } boolean canApply = newEnchantment.canApply(result); if(canApply){ System.out.println("NEW -> ID : " + newEnchantment.getName() + ", lvl : " + newEnchLevel); map.put(Integer.valueOf(newEnchantment.effectId), Integer.valueOf(newEnchLevel)); } } EnchantmentHelper.setEnchantments(map, result); } } } } this.craftResult.setInventorySlotContents(0, result); }
  4. Hi there, I have succesfully created a block that allows me to combine a tool or armor with a magical stone to give the tool or armor a random enchantment. However I want to see the actual output on the right side. What happens right now is that it randomly selects an enchantment both on remote and !remote. So the enchantment you see in the output is not the enchantment that is being added to the tool/armor. I tried placing the randomization only on !remote side or on remote but this either results in the output not showing an enchantment and recieving an enchantment upon creation or showing an enchantment in the ouput and not recieving an enchantment upon creation. How could I make it so it selects a randomized enchantment and gives that enchantment to the weapon.
  5. Thank you, It turned out this problem was much easier to solve than I imagined.
  6. So I have made a few items that will manipulate the damage done to or by the player and I have succesfully made a check that checks whether this is the case. I want to check how much damage is done (in both cases) and decrease or increase the total damage by half the amount. Item A is there to increase the damage done by the player to other entities by 50%. - The Black Diamond Ring in this case. Item B is there to decrease the damage done to the player by other entities by 50%. To do this I thought it would be best to do this in a forge event and the entityAttacked(LivingAttackEvent event) seemed perfect for that. So far I have not found a way to alter the amount of damage done by that specific attack so I made it so the entity is attacked another time but now its damageSource is "bonus magic" so that the event wont trigger my check. My code to do this so far: @SubscribeEvent public void entityAttacked(LivingAttackEvent event){ if(event.entityLiving.worldObj.isRemote){ if(!(event.entityLiving instanceof EntityPlayer)){ EntityLiving attackedEnt = (EntityLiving) event.entityLiving; DamageSource attackSource = event.source; Entity player = event.source.getEntity(); if(player instanceof EntityPlayer){ EntityPlayer thePlayer = (EntityPlayer)player; if("generic".equals(attackSource.damageType) || "magic".equals(attackSource.damageType) || "player".equals(attackSource.damageType)){ if(this.checkPlayerHasAmulet(thePlayer)){ System.out.println("Normal Damage : " + event.ammount); System.out.println("Bonus Damage from Ring : " + event.ammount / 2); attackedEnt.attackEntityFrom(new DamageSource("bonus magic"), event.ammount / 2); } } } } } } private boolean checkPlayerHasAmulet(EntityPlayer player){ ItemStack[] inventoryPlayer = player.inventory.mainInventory; for(int i = 0; i < inventoryPlayer.length;i++){ ItemStack stack = inventoryPlayer[i]; if(stack != null){ if(stack.stackSize > 0){ Item item = stack.getItem(); // Check if Black Diamond Ring is in your hotbar if(item.equals(SoulItems.BlackdiamondAmuletRing.get()) && i < 9){ item.setDamage(stack, item.getDamage(stack) + 1); return true; } } } } return true; } As you can probably see I now attack the entity with half the event.ammount (which is always 0.5, or in cases of a critical attack 0.75) as somehow the event.ammount is always 1, it seems it uses the base player damage or something. Is there any way to check how much damage is actually done? And is there perhaps an easier way to go about doing this?
  7. In case you are still having trouble adding the source code, just download the source code from chickenbones from NEI and CCC and add them in eclipse in lib. Next configure the build path and set the source of CCC and NEI dev jars.
  8. Hi there, I desided to take some time to create myself a nice custom model to use in my mod, when I finally had all the rotations and such as I wanted it to be and completed the texture for the model, I exported it to java and added it to minecraft. Soon though I noticed that some of the blocks on the staff were rotated differently then I created, and most blocks (even with rotations) came up just fine. Here is a picture of it in mc: http://gyazo.com/f9893308041eac5cbe6e448367829612 and here is it while it is still in Techne: http://gyazo.com/4b8959ae131c309f2e7dcd4c963d5d75 If you look at the top of the staff, it goes terrible wrong on that part. But why?? Thanks for the help in advance!
  9. Moving up to 1.7.10 did seem to not give any errors any more, so thanks
  10. Allright I'll set it up for 1.7.10 with java 8 and see how that goes thanks for helping so far.
  11. Well at first I compiled for java 8, then I noticed that I shouldnt use Java 8 so I stepped back to 7. Is there any way I can make this file go "un-corupted". Also I was working on getting my mod for 1.7.2 and I need to check what was broken at that point before I start compiling for 1.7.10.
  12. Ok so, I worked on porting my mod from 1.6.2 to 1.7.2 a while back, and I wanted to continue this so I started setting up Gradle and eclipse. After a couple of hickups I got it (I think), but now it FML seems to throw an error when trying to process my file : [16:16:37] [Client thread/ERROR] [FML]: Unable to read a class file correctly java.lang.IllegalArgumentException at org.objectweb.asm.ClassReader.<init>(ClassReader.java:170) ~[asm-debug-all-4.1.jar:4.1] at org.objectweb.asm.ClassReader.<init>(ClassReader.java:153) ~[asm-debug-all-4.1.jar:4.1] at org.objectweb.asm.ClassReader.<init>(ClassReader.java:424) ~[asm-debug-all-4.1.jar:4.1] at cpw.mods.fml.common.discovery.asm.ASMModParser.<init>(ASMModParser.java:52) [ASMModParser.class:?] at cpw.mods.fml.common.discovery.DirectoryDiscoverer.exploreFileSystem(DirectoryDiscoverer.java:100) [DirectoryDiscoverer.class:?] at cpw.mods.fml.common.discovery.DirectoryDiscoverer.exploreFileSystem(DirectoryDiscoverer.java:89) [DirectoryDiscoverer.class:?] at cpw.mods.fml.common.discovery.DirectoryDiscoverer.exploreFileSystem(DirectoryDiscoverer.java:89) [DirectoryDiscoverer.class:?] at cpw.mods.fml.common.discovery.DirectoryDiscoverer.exploreFileSystem(DirectoryDiscoverer.java:89) [DirectoryDiscoverer.class:?] at cpw.mods.fml.common.discovery.DirectoryDiscoverer.discover(DirectoryDiscoverer.java:53) [DirectoryDiscoverer.class:?] at cpw.mods.fml.common.discovery.ContainerType.findMods(ContainerType.java:42) [ContainerType.class:?] at cpw.mods.fml.common.discovery.ModCandidate.explore(ModCandidate.java:71) [ModCandidate.class:?] at cpw.mods.fml.common.discovery.ModDiscoverer.identifyMods(ModDiscoverer.java:123) [ModDiscoverer.class:?] at cpw.mods.fml.common.Loader.identifyMods(Loader.java:346) [Loader.class:?] at cpw.mods.fml.common.Loader.loadMods(Loader.java:467) [Loader.class:?] at cpw.mods.fml.client.FMLClientHandler.beginMinecraftLoading(FMLClientHandler.java:204) [FMLClientHandler.class:?] at net.minecraft.client.Minecraft.startGame(Minecraft.java:510) [Minecraft.class:?] at net.minecraft.client.Minecraft.run(Minecraft.java:880) [Minecraft.class:?] at net.minecraft.client.main.Main.main(Main.java:112) [Main.class:?] at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[?:1.7.0_79] at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source) ~[?:1.7.0_79] at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) ~[?:1.7.0_79] at java.lang.reflect.Method.invoke(Unknown Source) ~[?:1.7.0_79] at net.minecraft.launchwrapper.Launch.launch(Launch.java:134) [launchwrapper-1.9.jar:?] at net.minecraft.launchwrapper.Launch.main(Launch.java:28) [launchwrapper-1.9.jar:?] at net.minecraftforge.gradle.GradleStartCommon.launch(Unknown Source) [start/:?] at GradleStart.main(Unknown Source) [start/:?] [16:16:37] [Client thread/ERROR] [FML]: There was a problem reading the file F:\MinecraftModding\Forge\bin\com\Mod_Ores\BiomeGen\BiomeEventMarona.class - probably this is a corrupt file cpw.mods.fml.common.LoaderException: java.lang.IllegalArgumentException at cpw.mods.fml.common.discovery.asm.ASMModParser.<init>(ASMModParser.java:58) ~[ASMModParser.class:?] at cpw.mods.fml.common.discovery.DirectoryDiscoverer.exploreFileSystem(DirectoryDiscoverer.java:100) [DirectoryDiscoverer.class:?] at cpw.mods.fml.common.discovery.DirectoryDiscoverer.exploreFileSystem(DirectoryDiscoverer.java:89) [DirectoryDiscoverer.class:?] at cpw.mods.fml.common.discovery.DirectoryDiscoverer.exploreFileSystem(DirectoryDiscoverer.java:89) [DirectoryDiscoverer.class:?] at cpw.mods.fml.common.discovery.DirectoryDiscoverer.exploreFileSystem(DirectoryDiscoverer.java:89) [DirectoryDiscoverer.class:?] at cpw.mods.fml.common.discovery.DirectoryDiscoverer.discover(DirectoryDiscoverer.java:53) [DirectoryDiscoverer.class:?] at cpw.mods.fml.common.discovery.ContainerType.findMods(ContainerType.java:42) [ContainerType.class:?] at cpw.mods.fml.common.discovery.ModCandidate.explore(ModCandidate.java:71) [ModCandidate.class:?] at cpw.mods.fml.common.discovery.ModDiscoverer.identifyMods(ModDiscoverer.java:123) [ModDiscoverer.class:?] at cpw.mods.fml.common.Loader.identifyMods(Loader.java:346) [Loader.class:?] at cpw.mods.fml.common.Loader.loadMods(Loader.java:467) [Loader.class:?] at cpw.mods.fml.client.FMLClientHandler.beginMinecraftLoading(FMLClientHandler.java:204) [FMLClientHandler.class:?] at net.minecraft.client.Minecraft.startGame(Minecraft.java:510) [Minecraft.class:?] at net.minecraft.client.Minecraft.run(Minecraft.java:880) [Minecraft.class:?] at net.minecraft.client.main.Main.main(Main.java:112) [Main.class:?] at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[?:1.7.0_79] at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source) ~[?:1.7.0_79] at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) ~[?:1.7.0_79] at java.lang.reflect.Method.invoke(Unknown Source) ~[?:1.7.0_79] at net.minecraft.launchwrapper.Launch.launch(Launch.java:134) [launchwrapper-1.9.jar:?] at net.minecraft.launchwrapper.Launch.main(Launch.java:28) [launchwrapper-1.9.jar:?] at net.minecraftforge.gradle.GradleStartCommon.launch(Unknown Source) [start/:?] at GradleStart.main(Unknown Source) [start/:?] Caused by: java.lang.IllegalArgumentException at org.objectweb.asm.ClassReader.<init>(ClassReader.java:170) ~[asm-debug-all-4.1.jar:4.1] at org.objectweb.asm.ClassReader.<init>(ClassReader.java:153) ~[asm-debug-all-4.1.jar:4.1] at org.objectweb.asm.ClassReader.<init>(ClassReader.java:424) ~[asm-debug-all-4.1.jar:4.1] at cpw.mods.fml.common.discovery.asm.ASMModParser.<init>(ASMModParser.java:52) ~[ASMModParser.class:?] ... 22 more [16:16:37] [Client thread/WARN] [FML]: Identified a problem with the mod candidate F:\MinecraftModding\Forge\bin, ignoring this source cpw.mods.fml.common.LoaderException: java.lang.IllegalArgumentException at cpw.mods.fml.common.discovery.asm.ASMModParser.<init>(ASMModParser.java:58) ~[ASMModParser.class:?] at cpw.mods.fml.common.discovery.DirectoryDiscoverer.exploreFileSystem(DirectoryDiscoverer.java:100) ~[DirectoryDiscoverer.class:?] at cpw.mods.fml.common.discovery.DirectoryDiscoverer.exploreFileSystem(DirectoryDiscoverer.java:89) ~[DirectoryDiscoverer.class:?] at cpw.mods.fml.common.discovery.DirectoryDiscoverer.exploreFileSystem(DirectoryDiscoverer.java:89) ~[DirectoryDiscoverer.class:?] at cpw.mods.fml.common.discovery.DirectoryDiscoverer.exploreFileSystem(DirectoryDiscoverer.java:89) ~[DirectoryDiscoverer.class:?] at cpw.mods.fml.common.discovery.DirectoryDiscoverer.discover(DirectoryDiscoverer.java:53) ~[DirectoryDiscoverer.class:?] at cpw.mods.fml.common.discovery.ContainerType.findMods(ContainerType.java:42) ~[ContainerType.class:?] at cpw.mods.fml.common.discovery.ModCandidate.explore(ModCandidate.java:71) ~[ModCandidate.class:?] at cpw.mods.fml.common.discovery.ModDiscoverer.identifyMods(ModDiscoverer.java:123) [ModDiscoverer.class:?] at cpw.mods.fml.common.Loader.identifyMods(Loader.java:346) [Loader.class:?] at cpw.mods.fml.common.Loader.loadMods(Loader.java:467) [Loader.class:?] at cpw.mods.fml.client.FMLClientHandler.beginMinecraftLoading(FMLClientHandler.java:204) [FMLClientHandler.class:?] at net.minecraft.client.Minecraft.startGame(Minecraft.java:510) [Minecraft.class:?] at net.minecraft.client.Minecraft.run(Minecraft.java:880) [Minecraft.class:?] at net.minecraft.client.main.Main.main(Main.java:112) [Main.class:?] at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[?:1.7.0_79] at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source) ~[?:1.7.0_79] at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) ~[?:1.7.0_79] at java.lang.reflect.Method.invoke(Unknown Source) ~[?:1.7.0_79] at net.minecraft.launchwrapper.Launch.launch(Launch.java:134) [launchwrapper-1.9.jar:?] at net.minecraft.launchwrapper.Launch.main(Launch.java:28) [launchwrapper-1.9.jar:?] at net.minecraftforge.gradle.GradleStartCommon.launch(Unknown Source) [start/:?] at GradleStart.main(Unknown Source) [start/:?] Caused by: java.lang.IllegalArgumentException at org.objectweb.asm.ClassReader.<init>(ClassReader.java:170) ~[asm-debug-all-4.1.jar:4.1] at org.objectweb.asm.ClassReader.<init>(ClassReader.java:153) ~[asm-debug-all-4.1.jar:4.1] at org.objectweb.asm.ClassReader.<init>(ClassReader.java:424) ~[asm-debug-all-4.1.jar:4.1] at cpw.mods.fml.common.discovery.asm.ASMModParser.<init>(ASMModParser.java:52) ~[ASMModParser.class:?] ... 22 more [16:16:37] [Client thread/ERROR] [FML]: FML has detected a mod that is using a package name based on 'net.minecraft.src' : net.minecraft.src.FMLRenderAccessLibrary. This is generally a severe programming error. There should be no mod code in the minecraft namespace. MOVE YOUR MOD! If you're in eclipse, select your source code and 'refactor' it into a new package. Go on. DO IT NOW! [16:16:38] [Client thread/INFO] [FML]: Forge Mod Loader has identified 3 mods to load [16:16:38] [Client thread/INFO]: Reloading ResourceManager: Default, FMLFileResourcePack:Forge Mod Loader, FMLFileResourcePack:Minecraft Forge [16:16:38] [Client thread/INFO] [FML]: Processing ObjectHolder annotations [16:16:38] [Client thread/INFO] [FML]: Found 341 ObjectHolder annotations [16:16:38] [Client thread/INFO] [FML]: Configured a dormant chunk cache size of 0 [16:16:38] [Client thread/INFO] [FML]: Applying holder lookups [16:16:38] [Client thread/INFO] [FML]: Holder lookups applied I tried creating a new file and moving the content from the old file to the new, but that didnt change a thing. I also tried cleaning and building gradle. This is the file it says being corrupt: package com.Mod_Ores.BiomeGen; import net.minecraft.world.biome.BiomeDecorator; import net.minecraft.world.biome.BiomeGenBase; import cpw.mods.fml.common.eventhandler.Event; import cpw.mods.fml.common.eventhandler.Event.HasResult; import cpw.mods.fml.relauncher.Side; import cpw.mods.fml.relauncher.SideOnly; public class BiomeEventMarona extends Event { public final BiomeGenBase biome; public BiomeEventMarona(BiomeGenBase biome) { this.biome = biome; } public static class CreateDecorator extends BiomeEventMarona { public final BiomeDecorator originalTheBiomeDeco; public BiomeDecorator newTheBiomeDeco; public CreateDecorator(BiomeGenBase biome, BiomeDecorator original) { super(biome); originalTheBiomeDeco = original; newTheBiomeDeco = original; } } public static class BlockReplacement extends BiomeEventMarona { public final int original; public int replacement; public BlockReplacement(BiomeGenBase biome, int original, int replacement) { super(biome); this.original = original; this.replacement = replacement; } } @SideOnly(Side.CLIENT) public static class BiomeColor extends BiomeEventMarona { public final int originalColor; public int newColor; public BiomeColor(BiomeGenBase biome, int original) { super(biome); originalColor = original; newColor = original; } } @HasResult public static class GetVillageBlockID extends BlockReplacement { public GetVillageBlockID(BiomeGenBase biome, int original, int replacement) { super(biome, original, replacement); } } @HasResult public static class GetVillageBlockMeta extends BlockReplacement { public GetVillageBlockMeta(BiomeGenBase biome, int original, int replacement) { super(biome, original, replacement); } } @SideOnly(Side.CLIENT) public static class GetGrassColor extends BiomeColor { public GetGrassColor(BiomeGenBase biome, int original) { super(biome, original); } } @SideOnly(Side.CLIENT) public static class GetFoliageColor extends BiomeColor { public GetFoliageColor(BiomeGenBase biome, int original) { super(biome, original); } } @SideOnly(Side.CLIENT) public static class GetWaterColor extends BiomeColor { public GetWaterColor(BiomeGenBase biome, int original) { super(biome, original); } } } Thanks for the help in advance!
  13. Is there anyone that can help me, it would be much appreciated.
  14. Hi there, Up to 1.6.4 I had my custom dimension generate like hell with a custom stone and multiple biomes. I also had custom top and filler blocks in each biome that generated throughout my custom dimension on different layered noises. Somehow now on 1.7.2 it generates the top and filler block right under the bedrock at the top of the world and only there..... I can't seem to figure out why it does not longer generate it throughout the level. I think all you need is the next class, but if you need more classes to provide help. Ask and ill provide! Thanks in advance for your help. ChunkProviderClass :
  15. It seems to have done the trick, why did they decide to go to 32768??
×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.