Jump to content
Search In
  • More options...
Find results that contain...
Find results in...

josephcsible

Members
  • Posts

    22
  • Joined

  • Last visited

Converted

  • Gender
    Male
  • URL
    https://github.com/josephcsible

josephcsible's Achievements

Tree Puncher

Tree Puncher (2/8)

1

Reputation

  1. If hasCapability would return false for a given capability and facing, must getCapability return null for the same capability and facing, or may it throw an exception? Conversely, may you call getCapability and test for null instead of calling hasCapability?
  2. Ah, conditions for recipes were exactly what I was looking for. Thanks! (For anyone else who reads this, note that it's minecraft:item_exists, not forge:item_exists).
  3. I still feel like I'm missing something. How can I make a JSON recipe either work or not work depending on a configuration setting?
  4. I just thought of something: even if I do still register the items, how would I then go about disabling the crafting recipe? Would I have to basically hardcode what CraftTweaker does, or is there an easier way?
  5. Doesn't registering the item mean that I have to register a model for it too?
  6. The reason I wanted disabling them to not register them is to make the mod more RAM-friendly. If I register them and just hide them, there's no real point.
  7. I want some of my mod's items to be disableable in the config file, so that if the player or pack maker doesn't want them, they don't have to be loaded into memory. When I disable items this way, I get this error for recipes for the disabled items: com.google.gson.JsonSyntaxException: Unknown item 'mymod:myitem' at net.minecraftforge.common.crafting.CraftingHelper.getItemStack(CraftingHelper.java:211) ~[CraftingHelper.class:?] at net.minecraftforge.common.crafting.CraftingHelper.lambda$init$14(CraftingHelper.java:516) ~[CraftingHelper.class:?] at net.minecraftforge.common.crafting.CraftingHelper.getRecipe(CraftingHelper.java:408) ~[CraftingHelper.class:?] at net.minecraftforge.common.crafting.CraftingHelper.lambda$loadRecipes$22(CraftingHelper.java:711) ~[CraftingHelper.class:?] The game still works fine, and all of the recipes are there except for the ones that make/use the disabled item, so the only problem that this is causing is the log spam. Is there a way to not load crafting recipes for some items in 1.12? In 1.11 and prior versions, I'm used to being able to conditionally add the recipe via Java, but I don't know of an equivalent for that in JSON.
  8. This doesn't sound right to me. Isn't the whole point of virtual methods that you don't have to worry about this?
  9. Done, https://github.com/MinecraftForge/MinecraftForge/issues/4397
  10. Given a mod that adds a new type of wood, what's the best way to let its planks be used to repair wooden tools in an anvil? Looking at the code, I see it's calling getIsRepairable on the tool, which in turn calls OreDictionary.itemMatches with Blocks.PLANKS. (IMO, this is somewhat misleadingly named since it does a straight item/metadata comparison and not an ore dictionary comparison. If it did an ore dictionary comparison, this would be trivial.) The only solution I see is to subscribe to AnvilUpdateEvent, and then reimplement almost all of updateRepairOutput() in it. Is this what I have to do, or is there a better way to do this?
  11. While testing one of my mods alongside some others, I got this crash that I can't figure out: Important part: java.lang.ClassCastException: java.lang.reflect.Field cannot be cast to java.lang.Byte at net.minecraft.entity.EntityLivingBase.func_184587_cr(EntityLivingBase.java:2641) Here's what I figured out myself: First, here's net.minecraft.entity.EntityLivingBase.func_184587_cr(EntityLivingBase.java:2641): public boolean isHandActive() { return (((Byte)this.dataManager.get(HAND_STATES)).byteValue() & 1) > 0; } HAND_STATES is declared as a DataParameter<Byte>, so all through this next part, T is Byte. Next, here's this.dataManager.get: public <T> T get(DataParameter<T> key) { return (T)this.getEntry(key).getValue(); } And here's getValue: public T getValue() { return this.value; } And finally, here's value: private T value; I don't get how a Field could have gotten as far as it did. "value" is declared as type T, as are the return values of getValue() and get(). Even get() itself has an explicit cast to T. Where did the Field come from here, and why didn't it crash anywhere prior to isHandActive where it must have been shoehorned into an inappropriate variable?
  12. 1.7.10 is more than three years old now. Why can't you just write mods for newer versions?
  13. That seems to be the default location for it in the MDK, though. (And when you download a fresh one and do ./gradlew setupDecompWorkspace eclipse, it will work fine there. It just stops working if you try to rebuild the stuff that .gitignore excludes.)
  14. Realms only supports the latest release of Minecraft, and Forge doesn't support 1.12 yet. Until it does (which will be soon, but please don't bug for an ETA), you can't use Forge and Realms together.
  15. Here's the important part of your error: java.lang.IllegalArgumentException: Malformed \uxxxx encoding. at java.util.Properties.loadConvert(Properties.java:574) at java.util.Properties.load0(Properties.java:390) at java.util.Properties.load(Properties.java:341) at batty.ui.BattyUI.retrieveRuntimeOptions(BattyUI.java:576) Batty's Coordinates PLUS Mod is crashing your game due to a syntax error in your BatMod.runtime file, specifically an invalid Unicode escape sequence (supposed to be "\u" followed by 4 hexadecimal digits). If you don't know what that means or can't find it, upload the contents of that entire file.
×
×
  • Create New...

Important Information

By using this site, you agree to our Privacy Policy.