Everything posted by Draco18s
-
Chunks, Saving Data to, And So on
Clunky, but it should work.
-
[1.7.10]No OpenGL context found in current thread?
You don't say.
-
Chunks, Saving Data to, And So on
Ok, so how do I fix it?
-
Chunks, Saving Data to, And So on
Ok, this fixed it for SSP, but not SMP. Now what?
-
Can't get forge 1.7.10 server public
Likely a firewall issue.
-
[1.8 - Solved] Help in making custom ItemSeeds drop in specific biomes
Yes there is. public HarvestDropsEvent(int x, int y, int z, World world, Block block, int blockMetadata, int fortuneLevel, float dropChance, ArrayList<ItemStack> drops, EntityPlayer harvester, boolean isSilkTouching)
-
Creating an instance of a class freezes up Minecraft?
I know. I'm just saying that you started with GitHub today and I've been using it for months and I still don't understand most of it.
-
Creating an instance of a class freezes up Minecraft?
Pfft. Until you can figure out how to manage branches and pull requests, I'd say you've gotten up to "what does GitHub do?"
-
[1.8 - Solved] Help in making custom ItemSeeds drop in specific biomes
1) Don't use addGrassSeed , you want your seeds to ONLY drop in the swamp, so there's no point in adding them to the global drop list. 2) You do not need your biomeSwamp variable. If it's a swamp, do-the-thing, if it's not do-the-other-thing. There's no point in setting the result of a boolean check and then if-checking that boolean again. 3) if(is == Items.seeds) { drps.add(new ItemStack(riceSeeds)); } 4) Move the event.drops.clear(); and event.drops.addAll(drps); lines outside of the loop.
-
[1.7.10] Add a chat message when it's night time?
int timeOfDay = world.getWorldTime() % 24000 That will tell you what time of day it is, from there you just have to figure out when the bed lets people sleep and compare.
-
Problem with Building Mod
I knew there was something with Java 6 there, but I didn't catch the diamond operator usage. OTOH, a google search turned up someone completely unrelated that simplified my own work. (I use long-hand, rather than the diamond operator, as I do a lot of cross-language work and AS3 doesn't have it).
-
how to add a drop to a vanilla mob [1.7.10]
Subscribe to the LivingDropsEvent event
-
[1.8 - Solved] Help in making custom ItemSeeds drop in specific biomes
Good stab at the problem. But you're doing a few things wrong. drops is an array and it will never equal, or contain, your item. You're going to want to loop through looking to see if any of the array items are Items.seeds and then remove that item and add yours. Here's what I did: @SubscribeEvent public void harvestGrass(BlockEvent.HarvestDropsEvent event) { if(event.block instanceof BlockTallGrass) { //cuts down on checking when the block destroyed was stone, logs, leaves, etc. BiomeGenBase bio = event.world.getBiomeGenForCoords(event.x, event.z); if(biomeTemps.get(bio.biomeID).temp <= 0.3) { //the condition you are interested in ArrayList<ItemStack> drps = new ArrayList<ItemStack>(); for(ItemStack is:event.drops) { if(is.getItem() == Items.wheat_seeds) { drps.add(new ItemStack(WildlifeBase.winterWheatSeeds, is.stackSize)); //add the new item } else { drps.add(is); //add any other items that dropped, but which we're not replacing } } event.drops.clear(); //remove the old event.drops.addAll(drps); } } } The second array is for avoiding modifying the array during the loop, but there are other ways to do that as well, such as using an iterator.
-
[1.8 - Solved] Help in making custom ItemSeeds drop in specific biomes
Instead wait for the item drop event, and if seeds drop and its the right biome, replace the seed with your seed. addGrassSeed will permanently add it to the list of dropable seeds.
-
[1.7.2] Deobfuscating mod code help
boolean debug = cfg.getBoolean("genera","debug",false);
-
How to publish a forge based library?
Yeah, I could probably do that at this point.
-
[1.7.2] Deobfuscating mod code help
Why are you trying to store "1" or "false" into a boolean? Booleans can't store "1".
-
[1.7.10] Custom Tree
You go shopping and bring the shopping list. Milk Bread Eggs Peanut butter Your wife calls and asks, "What's the fifth thing on the shopping list?" How do you reply?
-
How to publish a forge based library?
I was looking at this and couldn't get it to work, as I want to have a deobfuscated package that is only one of my packages. I've got various sub-mods all using the same build script, and while I did get a deobf version, it was everything, not just my lib. So I'm not sure how to combine that build entry with something like from zipTree(jar.outputs.getFiles().getSingleFile()).matching { exclude 'com/draco18s/ores/**', 'com/draco18s/hazards/**', 'com/draco18s/wildlife/**', 'mcmod.info' }
-
[1.7.10] Custom Tree
Or give your sapling a name... You never call setUnlocalizedName for it, so when you call getUnlocalizedName , it returns null.
-
[1.7.10] Custom Tree
Show CherrieSapling.java
-
[1.8] Metadata subblocks in 1.8
While you're still limited to 16-from-metadata, you can supply additional states that are stored in TileEntity data. Look at the flower pot.
-
Chunks, Saving Data to, And So on
...that's odd, I thought I made sure to account for that. But on that specific event, its missing. Lets try this again. Ah yes, that did it. Thanks Diesieben.
-
Chunks, Saving Data to, And So on
Forge v1291 1.7.10
-
Chunks, Saving Data to, And So on
So, I seem to have a strange problem saving data to the chunk its associated with when the chunk is saved and unloaded. Basically: The data is saved (22:23:02). Then the data is unloaded (22:23:23) as the player moved out of range. Then the data (which is now been removed from memory) is saved again (22:23:48), resulting in data loss. WTH. Why is an unloaded chunk receiving a ChunkSave event? Why does if(event.getChunk().isChunkLoaded) still return true for this actually-unloaded chunk? How the hell do I fix this?
IPS spam blocked by CleanTalk.