Everything posted by GotoLink
-
Forge Inventory Problem
Why not FMLPreInitializationEvent ? Also you could check InventoryPlayer for other methods to check item in slots and such.
-
[UnSolved] [1.7.2+] Porting mod to 1.7.2
Usually 1.2.5 means you have client source and server source. Updating would need merging the two, then use packets to send appropriate data. I already worked on Rise of the Automatons but never finished. You can see the progress on my github (Zetgeist repo).
-
[SOLVED][1.7.2] Clarification on details of event cancellation
Basically every situations. In most cases, if a mod cancel an event instance, it does so for a reason, and thus not every time. Unless you are writing a mod for statistics (number of time something tried to do stuff), you don't need the cancelled event. It can hurt performance and it can produce weird effects when two mods trigger under the same event.
-
[1.7.2] NBT List
The last one of your list is the method you seek.
-
Empty armor slot turns black (solved)
That @Override is actually good coding practice. Look it up. What you saw is a vanilla bug when wearing any damaged armor in 1.7.2.
-
Tree vanilla
There is no "simple" way of doing this. If you want a process without hard-coded values, i see two options: -make it configurable by the user, with just vanilla items for default values -create a "fake" world instance where you set then break the leaves, and catch the drops to eventually get a sapling item
-
Is there a better way? [Solved]
Some more OOC ? public class Group{ private final List<Class> members; public Group(Class...classes){ this.members = Arrays.asList(classes); } public boolean hasMember(Class<?> test){ for(Class<?> member:members){ if(member.isAssignableFrom(test)) return true; } return false; } } public Group meanVanillaBiped = new Group(EntityZombie.class, EntitySkeleton.class, EntityCreeper.class);
-
[1.7.2] Custom Music Disc Sounds [SOLVED]
I suggest you post the MusicRecords with the minimal amount of code you want to change from it. Remove everything that you copied from the parent class ItemRecord. Not sure why you would need to change the ResourceLocation. It should work as-is.
-
[1.7.2]NBT data not being created when shift clicking out of Crafting Bench
The addInformation is only supposed to read the info from the ItemStack. If packets are needed, send them from the onCreated method.
-
[1.7.2] Custom Music Disc Sounds [SOLVED]
When you define new sounds, you typically use modid:soundname format, resulting in the sound being placed in assets/modid/sounds/soundname.ogg and the corresponding sounds.json would be: { "soundname": {"category": "record","sounds": [{"name": "soundname","stream": true}]} }
-
EntityLivingBase does not take damage
You are casting the damage value to int then to float. Why ?
-
Entity is not saved
PlayerTickEvent should help do that.
-
[1.7.2] Creating a custom Village
You can use the village related events, and IVillageCreationHandler.
-
[1.7.2]NBT data not being created when shift clicking out of Crafting Bench
Well onCreated is server side and addInformation is client side. Make sure the tags are shared. @delpi You could override Item#getSubItems to add the NBT data to your items in creative menu. Stacking can depend on a lot of stuff, including NBT. It is also worth remembering that the same instance of ItemStack can't stack with itself, so ItemStack#copy() is useful when making a custom crafting process.
-
Implementing a mod as a dependency
No, you also have to set it as a dependency in your workspace, with gradle, you change the build.gradle file with a dependency body.
-
[SOLVED] [1.6.4] ASM transformer for skins
targetMethod1Name ="getSkinUrl"; targetMethod2Name = "getCapeUrl"; You are targeting unobfuscated methods, so obviously, this isn't going to work in any other environment.
-
Potion Effect on Armor with custom enchantment
ItemStack boots = event.player.getCurrentArmor(3); That isn't the boots slot content.
-
[1.7.2] Spawning Animals In The Dark
Can't work with EntityAnimal. Use EntityCreature.
-
Improvements To BiomeDictionary Specificity
I'd rather keep the water tag. It describes the main aspect of oceans and rivers perfectly. Maybe some "LARGE" or "DEEP" tag ?
-
[1.7.2]World.createExplosion
Your entity is missing the constructor with World as only argument. It is needed.
-
[1.7.2][Block properties?] return different block when broken?
1) Override Block#getItemDropped(int, Random, int) 2) Change your block Material to one that requires a tool. (Material#setRequiresTool())
-
using different durability for different items
Assuming you use 1.7.2, you should register a listener for ItemCraftedEvent. See wiki for tutorial.
-
Tree generation help?
WorldGenTrees, WorldGenAbstractTree...
-
Blocks with metadata
Icon in 1.6 -> IIcon in 1.7.2. Such change. Wow. Metadata didn't change at all from 1.6. Thus the tutorial is still valid.
-
[1.7.2] Suggest command
Didn't you answer yourself with the /tellraw command ? It is called CommandMessageRaw in MCP.
IPS spam blocked by CleanTalk.