Jump to content

RainbowLuigi281

Members
  • Posts

    20
  • Joined

  • Last visited

Converted

  • Gender
    Male

Recent Profile Visitors

The recent visitors block is disabled and is not being shown to other users.

RainbowLuigi281's Achievements

Tree Puncher

Tree Puncher (2/8)

0

Reputation

  1. It works now! ? I had to do another gradlew eclipse, but it works now! I kept refreshing the Minecraft Forge download site to see if a new version would fix it and now I don't have to anymore. I have a seperate directory for it. It's possible that I could have confused the two directory (which I have done before), but I don't think I did.
  2. I change the build.gradle first, then with gradlew in command line I say "buildNeeded", then "eclipse", then "genEclipseRuns", and then "prepareRuns." setupDecompWorkspace disappeared last Minecraft update. Again, I can view classes that weren't affected by the 1.14.2 (like many of the different block classes), but not classes that were affected by it (ex. TileEntityFurnace.class).
  3. Hello everyone. I have created a new workspace in Eclipse with Minecraft Forge Version 1.14.2-26.0.14, but some of Minecraft's source code (some of classes that are involved with the Minecraft 1.14.2 update) is unviewable and looks like Java byte code. It is somewhat readable but it is still quite confusing. If anyone knows what to do to fix this, that would be greatly appreciated. Or maybe I have to wait until Forge updates something.
  4. I'm still having a bit of trouble with this, if anyone knows anything that would be great! If not that's fine as well.
  5. Hello. I have a tile entity that looks for json crafting recipes like the furnace does, but it won't work. The function in my tile entity IRecipe irecipe = this.world.getRecipeManager().getRecipe(new RecipeWrapper(this.inv, 0, 0), this.world, SoulMagic.SOUL_INFUSING_TYPE); is returning null no matter what the items in the inventory are. I found the method in TileEntityFurnace.java, and I am using an item capability. (I need the RecipeWrapper to "wrap" it from capabilities to IInventory). TileEntitySoulInfuser: I have all the conditionals met and it spams "null" in my terminal. SoulMagic: (My main mod java class) I don't know where else to put it, I couldn't find an event for it easily. SoulInfuserRecipe and SoulInfuserRecipe.Serializer: As stated, the json is being imported correctly. flaming_touch.json What the tileentity does is it adds something (a "spell") to another item's capability in the tileentity. That's why there's going to be no real "output". the "output" is the spell that the tileentity will add if there is a "recipe". I want json support with my mod. I don't know if my logic here is good or not. I have forge 1.13.2-25.0.215. I don't have github quite yet. Edit: I have tried to make the recipe wrapper an instance variable only created once, but that still doesn't work.
  6. Hello. So I have a GuiScreen that isn't displaying textures it loaded and I am at a loss of ideas. This is my render function in my gui. @Override public void render(int mouseX, int mouseY, float partialTicks) { List<Spell> spells = this.isg.getSpells(); if(spells.size() > 0) { double angle = (2 * Math.PI) / (spells.size()); double range = 90; for(int i = 0; i < spells.size(); i++) { int x = (int) (range * Math.sin(angle * i)); int y = (int) (-range * Math.cos(angle * i)); GlStateManager.color3f(1.0F, 1.0F, 1.0F); this.mc.getTextureManager().bindTexture(spells.get(i).getSpellTexture()); SoulMagic.LOGGER.info("hello"); this.drawTexturedModalRect((this.width / 2) + x - 16, (this.height / 2) + y - 16, 0, 0, 32, 32); } } super.render(mouseX, mouseY, partialTicks); } I know for a fact that my x and y positions are correct and my textures are being loaded, as it showed a broken texture in the right positions when the texture weren't being loaded properly. With the logger.info it spams "hello" in the console, so it is being called. I'm not good with GUIs so I don't know if "render" is the best place for it. I only know the draw foreground/background methods from GuiContainer. I grabbed that GlStateManager statement from somewhere, it was originally .color4f but that doesn't work either. The textures is 32x32 and I want to render the whole thing. I am on Forge Version 1.13.2-25.0.215, the latest version of forge for 1.13.2.
  7. I figured it out, the enchantment table calls ItemStack#isItemEnchantable, which in turn calls Item#isItemTool. Since my item used the default implementation, it return false and not work, but after I override it to return true, it worked.
  8. I don't know exactly what classifies a "MainHand item", but I do have attributes on the item that check if the slot is equal to EntityEquipmentSlot.MAINHAND before applying them. The ring is intended to be used as a weapon you use in your main hand, so I am assuming that the ring is classified as a "MainHand item". Perhaps the key to solving the problem is to find what replaced EnchantmentHelper.mapEnchantmentData(this.getItemEnchantability(), new ItemStack(this));
  9. According to the code, the MAX-enchantability is 41, while the min-enchantability is 1. Even after I switched those values, it still wouldn't work. I did override canApplyAtEnchantingTable and canApply, but that also didn't work. When I say it's not working, I mean that the enchantment levels don't show up when I put my item in, as shown below.
  10. Hello. I have created a custom item, and I would like to be able to enchant that item with a custom enchantment I created. Even though the item can get the enchantment through the "/enchant" command, I would like to have it be obtainable through an enchantment table. However, I am having trouble with that. I have registered my item and my enchantment, and have created a new type of EnumEnchantmentType that supports my item. I am using forge version 13.20.0.2279. Enchantment Registry Code: Enchantment Code: Item Code: I looked at the source code for ExNihlo 2 to see how this would be done, but the author used code that works for 1.10.2, but not 1.11.2. EnchantmentHelper.mapEnchantmentData(this.getItemEnchantability(), new ItemStack(this)); If you could help, that would be greatly appreciated.
  11. So when I was creating a TileEntity with the IItemHandler capability (you can tell I'm a big fan of capabilities), I had the same problem. However, I figured it out without having to use markDirty() or any other method. I'm not quite sure why it worked that time, but it was working when I replaced the tileentity block I was working with. I tried it with the TileEntity with the IFluidHandler capability, and it worked as well. So problem solved.
  12. I got it to work by calling TileEntity#markDirty() on my TileEntity that was storing the capability. I still might want to look into it some more to see if there are other ways to fix it and pick the best option, because I'm not to familiar on what the method exactly does.
  13. Well, I have debug code that fills the tileentity with 500mb of lava and then prints out the amount of fluid to the console (on both server and client side) when you right click on the block. The filling code works, and you can see the number increase as you right click on it, but the number resets when you leave the world and come back in. About the IStorage interface, I noticed that the capacity's implementation for IStorage is very similar to FluidTank#readNbt() and FluidTank#writeNbt() (which I am using in my code). Plus, the implemention of IStorage (the writeNBT() part) creates a brand new NBTTagCompound object, while I want to append the data to my TileEntities's NBT data (I bet there's a way to do it, but I do not know it). For accessing the implementation, I am using CapabilityFluidHandler#FLUID_HANDLER_CAPABILITY#getStorage()#readNBT() and it's writeNBT counterpart. Sorry I couldn't reply earlier, my internet was down for a while.
  14. So I have a TileEntity with a capability of IFluidHandler (my tileentity is using FluidTank, which is an implementation of IFluidHandler), but it does not appear to be saving it's nbt data. I'm pretty sure that I am using the capability correct and I'm positive I'm not just getting confused from the server client desync. I'm not too good with capabilities, but like I said, I think that I used it correctly. Most of the code comes from the TileFluidHandler class that forge provided. TileEntityCode: http://pastebin.com/Z1HzMBzX BlockCode: http://pastebin.com/Fhv7xTTB
  15. In order to get the axe working, you need to use the secondary constructor in ItemAxe, which is ItemAxe(ToolMaterial material, float damage, float speed). The reason the ItemAxe(ToolMaterial material) constructor crashes is because it grabs the damage and attack speed from an array of floats relative to the index of the toolmaterial passed. Since the array has only four elements, it crashes since you're passing a toolmaterial of index five (which you can't do anything about).
×
×
  • Create New...

Important Information

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