Everything posted by Choonster
-
[1.8 and 1.9] Having a few issues on 1.9 and 1.8
Did you create and register the Serializer ? Look at the pig loot table to see how it uses the on_fire property to determine whether the meat should be cooked.
-
[1.8 and 1.9] Having a few issues on 1.9 and 1.8
You need to implement EntityProperty , look at EntityOnFire for an example.
-
Forge
Then the load time is unrelated to the loading screen. Sky Factory does have approximately 118 mods, whereas Tekkit has approximately 62 mods. It's not that surprising that loading almost twice as many mods will take longer.
-
[1.8 and 1.9] Having a few issues on 1.9 and 1.8
It looks like you'll need to create an EntityProperty to test whether the entity has been tamed. You'll also need to create its EntityProperty.Serializer and register an instance of it with EntityPropertyManager.registerProperty . In your loot table, use the entity_properties condition with your property.
-
[solved][1.7.10] and [1.8.9] Getting current Server url (client side)
I can assure you that the method and field both exist in 1.8.9.
-
LivingAttackEvent problems [solved]
Side note: The instanceof operator already returns false if the object is null , there's no need to check for null before using the operator.
-
Forge
The EAQ explains how to disable the loading screen (search for "loading screen"). Try disabling the loading screen and see if it makes any difference to the loading time.
-
Switching to Capabilities from IInventory
You shouldn't need a custom implementation of IItemHandler , just use ItemStackHandler . Create an IItemHandler field in your TileEntity to contain its inventory and set it to an instance of ItemStackHandler . To replicate ISidedInventory , use a separate IItemHandler for each group of slots. Override hasCapability to return true when the Capability is CapabilityItemHandler.ITEM_HANDLER_CAPABILITY and the inventory can be accessed from the specified EnumFacing (if you actually care about the facing at all). Override getCapability to check if the Capability is CapabilityItemHandler.ITEM_HANDLER_CAPABILITY . If it is, return the appropriate IItemHandler for the specified EnumFacing . In both hasCapability and getCapability , return the result of the super method when the Capability isn't CapabilityItemHandler.ITEM_HANDLER_CAPABILITY . This allows external capabilities attached from AttachCapabilitiesEvent to be used.
-
[1.8.9] [1.9] Rendering fullbright texture
I'm not entirely sure if this is possible with the baked model system. You can disable shadows for a model element/ BakedQuad (see the model format or this example), but that doesn't render the model at full brightness. You may need to use a TESR for this.
-
[solved][1.7.10] and [1.8.9] Getting current Server url (client side)
Minecraft#getCurrentServerData returns the ServerData of the current server, if any. ServerData#serverIP contains the IP/URL of the server.
-
[1.8 and 1.9] Having a few issues on 1.9 and 1.8
See the wiki page. They're basically a more flexible replacement for ChestGenHooks / WeightedRandomChestContent that are also used for entity drops. Forge hasn't added any hooks for loot tables yet, but you can still register your own using the vanilla classes. You can see my loot table registration class here and a loot table here.
-
[1.8 and 1.9] Having a few issues on 1.9 and 1.8
Don't call ModelBakery.registerItemVariants for the override models, they will automatically be loaded. This error looks like it's caused by Forge trying to load tetracraft:item/ballisticBow_pulling_1 , which is trying to load the parent model tetracraft:item/ballisticBow , which is trying to load the override model tetracraft:item/ballisticBow_pulling_1 . If you allow the override models to be loaded automatically, you won't run into any circular reference errors.
-
[1.7.10] onItemRightClick Spawn based on ray trace
The last argument of World#rayTraceBlocks (used by both EntityLivingBase#rayTrace and Item#getMovingObjectPositionFromPlayer ) determines whether it should return the MovingObjectPosition of the last uncollidable block or null when the raytrace doesn't hit anything. You'll need to call this yourself with the appropriate arguments rather than using one of its wrappers, though you can reuse the code from Item#getMovingObjectPositionFromPlayer .
-
Single-Modded 10.13.4.1558-1.7.10
Minecraft ran out of memory. There are lots of tutorials out there that explain how to give Minecraft more memory.
-
Will a 1.8 mod work in 1.8.9?
Some 1.8 mods may work in 1.8.9, but there's no guarantee that every mod will. 1.8.8/1.8.9 didn't change a lot of things, but there were a few minor changes that will break some 1.8 mods.
-
[1.8 and 1.9] Having a few issues on 1.9 and 1.8
Although I agree that the imports should be cleaned up, imported classes aren't actually loaded at runtime unless they're referenced in the code itself. Importing a client-only class won't crash the server, using it outside of client-only code will. In IDEA (which I believe the OP is using), Ctrl-Alt-O optimises imports. I also make heavy use of Ctrl-Alt-L to reformat the current class, which also optimises imports.
-
[1.8 and 1.9] Having a few issues on 1.9 and 1.8
It's trying to load the client-only interface IStateMapper on the server when you call Registers.addItem because another method of Registers references IStateMapper . This is exactly the same error as diesieben07 was talking about earlier in the thread: you need to separate your client-only code from your common code (the proper solution) or mark client-only methods with @SideOnly(Side.CLIENT) (a quick fix).
-
1.9 Changes to Forge?
It used to, but it now returns a ResourceLocation under the new registry system. Edit: I can't spell.
-
[1.7.10] onItemRightClick Spawn based on ray trace
Raytracing doesn't have to happen on the client side, you've just picked a client-only method. Look at ItemMonsterPlacer#onItemRightClick to see how it raytraces on the server side.
-
[1.8 and 1.9] Having a few issues on 1.9 and 1.8
Have you updated your models to use the new override system? You can see my bow's new model here.
-
[1.8 and 1.9] Having a few issues on 1.9 and 1.8
Update your MCP mappings by setting the minecraft.mappings property in build.gradle, re-run setupDecompWorkspace and refresh your IDE project. The MCPBot website shows the mappings available for each version of Minecraft.
-
[1.8 and 1.9] Having a few issues on 1.9 and 1.8
Method references were introduced in Java 8, so setting the language level to 8 should allow them. There is no isAmmo method in ItemBow , though; only isArrow .
-
[SOLVED][1.9] Mod doesn't work in SMP
I briefly skimmed through your code and couldn't see any obvious errors. I suggest you post the FML log from the server and client using Gist. I did notice a few things that could be improved: Instead of checking the event's side in your @EventHandler methods to do client-only things, use the @SidedProxy system. Instead of using the deprecated GameRegistry.registerItem method, use the new GameRegistry.register method. It's recommended that you use the single-argument overload of this method and set the registry name of the object you're registering (e.g. an Item ) with IForgeRegistryEntry#setRegistryName (or one of the overloads from IForgeRegistryEntry.Impl ) before registering it. Instead of registering models with ItemModelMesher#register in init, use ModelLoader.setCustomModelResourceLocation / setCustomMeshDefinition in preInit. The default model loaded for every Item is the one with its registry name ( IForgeRegistryEntry#getRegistryName ), so you should use this rather than creating your own name field and getName methods.
-
[1.9] SharedMonsterAttributes RANGE
Look for the getBlockReachDistance / setBlockReachDistance methods of ItemInWorldManager (1.8.9 and earlier) or PlayerInteractionManager (1.9+).
-
[1.9] How to create & register a sound using the new registry system? [Solved]
To give a sound event a subtitle, set the "subtitle" key of the sound event in sounds.json to a string containing the translation key. An example from the vanilla sounds.json file: "item.shovel.flatten": { "sounds": [ "item/shovel/flatten1", "item/shovel/flatten2", "item/shovel/flatten3", "item/shovel/flatten4" ], "subtitle": "subtitles.item.shovel.flatten" },
IPS spam blocked by CleanTalk.