Everything posted by HoBoS_TaCo
-
Game Type Refactoring
How's the PR going?
-
Custom Annotation Trouble
I can't figure out how to check the item variable in the main class for an annotation rather than the item's actual class. //Main mod class @Loot(9) public static final Item beans = new ItemMod(2998) @Loot(5) public static final Item cake = new ItemMod(2999) //ItemMod class @Override public ItemStack onItemRightClick(ItemStack itemstack, World world, EntityPlayer entityplayer) { if (getClass().isAnnotationPresent(Loot.class)) { entityplayer.sendChatToPlayer("Loot = " + getClass().getAnnotation(Loot.class).value()); // This isn't sent to the player because it checks the ItemDayZ class for an annotation // and wont see the annotation where the item/variable is declared, i'm not sure how to // get it to check that for annotations. It only checks the ItemDayZ class for annotations. // I can't figure out how to check the item variable in the main class for an annotation // rather then this. } } //Loot.class @Retention(RetentionPolicy.RUNTIME) @Target(ElementType.FIELD) public @interface Loot { public int value(); } Any help would be appreciated
-
(solved)How to change Vanilla Mob Drops
Use LivingDeathEvent if you want vanilla sheep to drop your item. @ForgeSubscribe public void playerKilledSheep(LivingDeathEvent event) { if(event.entityLiving instanceof EntitySheep) { event.entityLiving.dropItem(Item.porkCooked.shiftedIndex, 1); } }
-
Event vs Interface
Is there a reason why Forge uses interfaces for some features and events for others?
-
1.4.6 update, I am not sure where to put things?
TheRaider explained it correctly, the package goes in mcp/src/minecraft and 1.4.6 will require you to fix up your imports using Ctrl-Shift-O. You can update nearly all imports by highlighting all packages and doing Ctrl-Shift-O.
-
MCForge is missing a class?
The problem is with NEI, there's either a problem with the mod or most likely you mucked something up on your end.
-
Enum Tool Material Editing Base Classes
See the EnumHelper class.
-
BiomeDecorator fields are protected again in 1.4.6
The BiomeDecorator fields are protected again in 1.4.6. The AT needs to be updated.
-
how to make plants that are 2 blocks high?
Zedicus explained how do it, when the crop's at a specific height (using metadata or another system) set the above block to the crop block. No one is going to code it for you and the hard part has been explained. Have a look at Minecraft's existing crops and code it.
-
[Solved!] Getting a player instance in ServerTickHandler
I use this, I hope it helps. @Override public void tickEnd(EnumSet<TickType> type, Object... tickData) { if (type.equals(EnumSet.of(TickType.PLAYER))) { onPlayerTick((EntityPlayer)tickData[0]); } } private void onPlayerTick(EntityPlayer player) { }
-
Game Type Refactoring
A better way to add an EnumGameType would be great, I need it for my mod. About custom HUD's, it's pretty easy to add on the render tick but it is however difficult to hide specific parts or it entirely without hiding the held item. It looks like a player's PlayerController is set when a player logs in and can be set with IPlayerTracker's onPlayerLogin. A custom EntityPlayer isn't really needed since you can save to the player's nbt and do things using ticks already. Rendering to the world can be done with the render tick or the RenderWorldLast event. I also don't see the point of declaring the GameType in the @Mod annotation, it would most likely be registered with GameRegistry.registerGameType(EnumGameType)
-
Server Forge Commands.
I know, it's in ForgeEssentials. I just thought it would be a great addition to vanilla forge.
-
There is any "EntityLeaveWorldEvent" or similar?
You're going to want to look at the IPlayerTracker class
-
Server Forge Commands.
I'd love a /mods command that acted like bukkit's /plugins command. Sometimes it's nice to know what mods are installed on the server you're on.
-
GenLayerHills and GenLayerShores with custom biomes?
I had to redo the GenLayer for my mod .
-
How to add a custom EnumGameType
I've been trying to get a custom EnumGameType for my mod and I can't seem to get it to work. I know it has something to do with EnumHelper.addEnum() but I don't know where to put it. If anyone could help me out it would be appreciated
-
Tons of Errors with Forge 1.4.5-6.4.1.436
Try deleting the eclipse folder in mcp and copy the one from forge/fml/ over.
-
cpw.mods.fml.common Missing
Delete the eclipse folder from your mcp folder
-
Online Mod Manager - Forge Redistribution Request
I can't seem to get the link to work? http//dl.dropbox.com/u/5780473/Mine%20%26%20Blade%20Commander/Online%20Mod%20Installer%20Test/EasyModInstaller.html
-
[Fixed]Mac MCP setup error - NameError: global name 'eclipse_dir' is not defined
This thread got updated with the same problem: http://www.minecraftforge.net/forum/index.php/topic,3994.0.html
-
[Fixed]Mac MCP setup error - NameError: global name 'eclipse_dir' is not defined
I tried installing the Forge src the same way i've done successfully numerous times before and I hit a weird error. Anyone know what's causing it? Forge 6.4.2.443. MCP 723, the same mcp I have used before without problem. Clean Minecraft 1.4.5 client and server jars which i've used before without problem. Terminal log: EDIT: legend5140 helped me with this, I deleted the eclipse folder from my mcp folder and i'm good
-
I got a problem
Read this first.
-
May be a stupid question...but please help
See this thread.
-
[Solved] Using MCP and Forge with GitHub
I made the repo online, cloned it into my mcp/src/common folder and renamed it to my package. I then put the code in the package which I could sync when ready. That probably made no cents, I hope it helped
-
Online Mod Manager - Forge Redistribution Request
This is really nice. Does it work with coremods as well?
IPS spam blocked by CleanTalk.