Jump to content

Choonster

Moderators
  • Posts

    5170
  • Joined

  • Last visited

  • Days Won

    77

Everything posted by Choonster

  1. I can't see any obvious errors in your code. Could you upload the FML log to Gist and link it here? Are your files at tetracraft:blockstates/brox_stone.json, tetracraft:models/block/brox_stone.json, and tetracraft:models/item/brox_stone.json?
  2. Yes. Every Forge mod is a resource pack, so you can override vanilla assets with your own. Keep in mind that user-added resource packs will take priority over mod resource packs.
  3. If you call ShapedRecipes#func_92100_c on a shaped recipe, it will copy the NBT tag to the output from the last ingredient that has one. If you want more control over the output NBT, create your own implementation of IRecipe (optionally extending an existing one like ShapedRecipe / ShapedOreRecipe ), override IRecipe#getCraftingResult to set the NBT of the output ItemStack and add an instance of it using GameRegistry.addRecipe(IRecipe) . Side note: The whole point of vararg methods like GameRegistry.addShapedRecipe is that you just pass in the arguments as normal and Java creates the array for you.
  4. There should be an error in the log telling you what went wrong.
  5. The log just ends without any error, so I'm not too sure what's going on. Does it just get stuck while loading the world?
  6. I've never seen that happen, it's probably a bug in one of your mods. If you want to narrow it down, try removing mods that modify character models in some way until you find which one causes it.
  7. All mods will work in any form of single or multiplayer unless the author screwed things up. Most mods need to be installed on both the server and client, but some are client-only (e.g. minimaps, HUDs) or server-only (e.g. backup utilities). In single player and local multiplayer the host client is running an integrated server in the background, so you can run server-only mods. The guest clients won't need to have these installed. Installing client-only mods on the dedicated server will usually crash it, though a mod can specifically mark itself as client-only to avoid being loaded at all on the dedicated server.
  8. All mods are cross-platform, unless they go out of their way to break that. I'm not aware of any mods that do this. You can copy over your mods and config directories via a local network (if you have that set up) or upload them to something like DropBox/OneDrive from your computer and download them on her computer.
  9. You're calling World#setBlockToAir before you check what the player's holding, so it always removes the block. Do you actually understand what your code is doing?
  10. For a model's parent model you need to specify the model path relative to the models directory, so use block/pane_nsew as the parent instead of just pane_nsew . You're registering your azrons_wrath and fantasysw items twice, don't do this.
  11. Basically I want the function to allow only blocks or items within my mod. I know how to allow items in... but I'm completely lost on how you allow blocks to be placed inside of it...Any ideas? When in inventories, Block s are just regular Item s (most of which extend ItemBlock or a subclass). Use Block.getBlockFromItem and Item.getItemFromBlock to convert between the Block and ItemBlock form of a block. Pay attention to the return values, not every Item has a Block and not every Block has an ItemBlock . Some blocks (e.g. Sugar Canes, Cakes, Beds) use a separate Item that doesn't extend ItemBlock and won't work with these methods, other blocks (e.g. Air) don't have any item form at all.
  12. Likely because your field is a Map<String, ModelResourceLocation> (i.e. String keys). Use a Map<Pair<String, String>, ModelResourceLocation> if you have Pair<String, String> keys. Something was null in ModelBakery.registerItemVariants (line 765), I suspect it was one of the ResourceLocation s you passed to it. Set a breakpoint on that line with a condition that any of the values that have a field accessed or method called on them are null (e.g. value1 == null || value2 == null ) and run Minecraft in debug mode. When it hits the breakpoint, look at what's null . It means you can't create an instance of Pair , you need to create an instance of a concrete (non-abstract) class that extends it, i.e. ImmutablePair or MutablePair . You don't need to modify these pair keys, so use an immutable pair (either call Pair.of or manually instantiate ImmutablePair ).
  13. Upload the FML log (logs/fml-client-latest.log) to Gist and link it here. This will tell us what's going wrong. Don't put your models and other assets in the minecraft resource domain, use dbound:modelname in your blockstates file so it loads models from your resource domain.
  14. When asking for help with a crash, always include the crash report. Don't use the toString output as the key, use the Pair itself; though make sure the Pair class you're using overrides Object#hashCode so two Pair objects with the same contents are treated as the same key for hash maps. org.apache.commons.lang3.tuple.Pair supports this, but I'm not sure which class you're using.
  15. The game would look for the other pulling models (they're not just textures) if you called ModelLoader.registerItemVariants (or Registers.registerItemVariants if that's correctly coded) with the model locations directly. Your caching of model locations in ModelJsonReference.getBowPullingTextures is broken because it ignores the state argument after the first call and always returns the location of the first state for the specified type . If you want to cache the locations, you need to use a data structure that includes the type and state in the key. This could be something like a map with tuple/pair keys ( cache.put(new Pair(type, state), location) ) or nested maps ( cache.get(type).put(state, location) ), you'll have to figure out which works best for your situation.
  16. ISmartItemModel is probably what you want. There are lots of threads here that mention it.
  17. Do you actually have a model at tetracraft:models/item/ballistic_bow_standby.json? ModeLoader only tries to load the variant from the blockstates JSON when it can't find the item model. Your pulling textures aren't working because the map used by ModelJsonReference.getBowPullingTextures ignores the state argument, only using type as the key. Side note: Hashtable is very old and shouldn't be used (see its doc comment for more details). Use a HashMap if you don't need thread safety (Minecraft is mostly single-threaded, so thread safety isn't required except for IMessageHandler s).
  18. I didn't ask for a crash report and that crash report doesn't have Forge in it, so we can't help you with it. Talk to the person who repackaged everything as "fuckYouSkid". I asked for the FML log, which you can find in the logs folder of Minecraft's game directory (.minecraft by default). It will be named fml-client-latest.log. Upload that log to Gist and link it here.
  19. You installed a coremod built for 1.7.10 or earlier (TooManyItems) but you're running Minecraft 1.8.9. Mods (especially coremods) only work with specific versions of Minecraft.
  20. ModelBakery.registerItemVariants expects ResourceLocation s/ ModelResourceLocation s with the domain, model name and variant specified. It doesn't expect the whole model path. If you use a ResourceLocation , the variant will default to inventory . Instead of passing tetracraft:models/item/ballistic_bow_pulling_0#inventory , just pass tetracraft:ballistic_bow_pulling_0#inventory .
  21. Have you tried opening a copy of your world in 1.8.9 to see if anything breaks? Some 1.8 mods may work in 1.8.9.
  22. Check if the hurt entity is a player. If it is, cast it to EntityPlayer and then check if it's wearing your armour. If you want the effect to apply to any living entity wearing the armour rather than just players, skip the player check and use EntityLivingBase#getEquipmentInSlot to check the armour.
  23. Where are you getting player from? You must get all data from the event itself. LivingHurtEvent#entityLiving is the entity that was hurt. LivingHurtEvent#source is the DamageSource that caused the damage. DamageSource#getEntity will get the Entity that caused the damage, if any (this will be null if the damage wasn't caused by an entity).
  24. Read the tutorial properly, event handler methods can only have a single argument (the event that they handle).
  25. I'm trying to test the new capability system by adding a pig spawner capability that allows items to spawn a pig when right clicked on a block. There are two types of spawner: finite (has charges that are used up when spawning pigs, pigs can't be spawned if there aren't any charges left) and infinite (can always spawn pigs). I've got the actual spawning of pigs working without issue, but now I'm trying to sync the remaining charges of finite pig spawners to the client so that they can be used in rendering (e.g. use the durability/damage bar to display the remaining charge percentage). On the integrated server, the charges seem to be synced to the client thread automatically (even though the client and server have their own ItemStack s and IPigSpawner instances). On the dedicated server, the charges aren't synced to the client. Even when I send a packet to update the value from PlayerInteractEvent (where I handle the spawning), it seems that the slot is overwritten by S2FPacketSetSlot afterwards. Has anyone managed to get something like this working? Logs (everything marked with PIG_SPAWNER is from pig spawner code) Code: Interfaces, Implementations and Capability, Message
×
×
  • Create New...

Important Information

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