
opssemnik
Members-
Posts
269 -
Joined
-
Last visited
Everything posted by opssemnik
-
and where is the chunk provider?
-
air blocks are inifnity, they still generate even if the world stop generating
-
Also he can use the populate event, the good its because it will gen the block even if the chunk is already created (good for old worlds) EDIT1: SORRY DOUBLE POST, I THINK MY TABLET DOSENT LIKE THIS FORUM
-
hmm, so they fixed, because when i tried, it cancelled all the minables.
-
because if the player drops the block from inventory, the first metadata will be dropped, also damage dropped its for items too .
-
@PreInit public void LEARNMOREJAVA(FMLPreInitializationEvent e){ MinecraftForge.EVENT_BUS.register(this) } public void DONTBEANOOB(LivingDeathEvent e){ if(e.entity instanceof EntityPig){ e.entity.dropItem(MOD.ITEM.itemID, quantity); } } OR @PreInit public void LEARNMOREJAVA(FMLPreInitializationEvent e){ MinecraftForge.EVENT_BUS.register(this) } public void DONTBEANOOB(LivingDropsEvent e){ if(e.entity instanceof EntityPig){ e.entity.dropItem(MOD.ITEM.itemID, quantity); } }
-
why cancel??/ u will cancel all minables. the best way its getting the block in the event, check if is coal ore, if yes u check if has spawned other in the chunk, if yes and is more than you want, you set the block to stone, or other.
-
u can check the motion, the position, create a key handler, there are a lot of methods...
-
just check to see if hasNoSky is false. minecraft use this boolean to create a random spawn point in surface (u can take a look how minecraft create this spawn point, because it only creates at surface, but the better way it just see, if hasNoSky returned false, u do the temperature things, the most real way, its getting the biome temperature and checking if is raining or not.
-
one more guy that try to make a mod, but dont know anything about java, the folder nokiamod from the reobf needs to go into the zip, its the package(package its the first thing u need to know),
-
post your chunk provider, chunk manager (if u have) and the portal block.
-
take a look at ItemSaddle, it has itemInteractionForEntity
-
if u post the chunk provider it wold be great
-
[1.4.4] Help with ISimpleBlockRenderingHandler
opssemnik replied to Narrakan's topic in Modder Support
u called two times, the tesselator to draw the same thing. -
or just, Block.blocksList[world.getBlockID(x,y,z)].setLightLevel(...)
-
you need to save the meta to nbt, then u do public int damageDropped(int par1){ do stuff }
-
OLD CODE public IChunkProvider getChunkProvider() { return new ChunkProviderTheVoid(worldObj, worldObj.getSeed(), false); } ITS NOW public IChunkProvider createChunkGenerator() { return new ChunkProviderTheVoid(worldObj, worldObj.getSeed(), false); } ...
-
also, how he can use Scheduladed ticks, if scheduladed ticks just start at the definied tick counts, not when a player wear a armor...
-
then just check if hasNoSky is false (its a boolean that tells when the player its on surface or not, i think its in world or world provider).
-
How to replace a method/ add a method in a minecraft base class?
opssemnik replied to uyjulian's topic in Modder Support
in client proxy KeyBindingRegistry.registerKeyBinding(new MyKeys()); then package RPGCraft.central; import java.util.EnumSet; import org.lwjgl.input.Keyboard; import net.minecraft.client.Minecraft; import net.minecraft.client.settings.KeyBinding; import net.minecraft.src.ModLoader; import cpw.mods.fml.client.registry.KeyBindingRegistry.KeyHandler; import cpw.mods.fml.common.TickType; public class MyKeys extends KeyHandler { public QuestKeys(KeyBinding[] keyBindings, boolean[] repeatings) { super(keyBindings, repeatings); // TODO Auto-generated constructor stub } @Override public String getLabel() { return "Quests"; } @Override public void keyDown(EnumSet<TickType> types, KeyBinding kb, boolean tickEnd, boolean isRepeat) { if(!tickEnd ){ //do other things the kb.keyCode its the pressed key System.out.println(kb.keyCode); } } @Override public void keyUp(EnumSet<TickType> types, KeyBinding kb, boolean tickEnd) { // TODO Auto-generated method stub } @Override public EnumSet<TickType> ticks() { // TODO Auto-generated method stub return EnumSet.of(TickType.CLIENT); } } -
hope this helps @PreInit public void myEventsForBiomes(FMLPreInitializationEvent e){ MinecraftForge.TERRAIN_GEN_BUS.register(this); } @ForgeSubscribe public void my_biomes(BiomeEvent.BlockReplacement e){ if(e.biome.topBlock == Block.grass.blockID){ e.biome.topBlock = (byte)Block.bed.blockID; } } this will change the grass to bed, but u can do other things
-
[Solved]How many ticks is a Minecraft day?
opssemnik replied to Ynscription's topic in Modder Support
the Part of IScheduladedTickHandler its right, but for the tick time, you can just calculate by the lighting valule like the mobs do. -
[N Help/Advice Modding] Detection Player->specificBlock [solved]
opssemnik replied to Ghoul159's topic in Modder Support
instead of creating strings and stuff, just create an object of the list, and then you check if the obj instanceof Block.torchWood like //player coordinates int plX = (int)Minecraft.getMinecraft().thePlayer.posX; int plY = (int)Minecraft.getMinecraft().thePlayer.posY; int plZ = (int)Minecraft.getMinecraft().thePlayer.posZ; //the radius of your player->Block detection double boundingBoxRadius = 3; //that it'll work only if the player is there if(Minecraft.getMinecraft().thePlayer != null) { //set the box for collision detection with other boxes AxisAlignedBB var4 = AxisAlignedBB.getBoundingBox(plX, plY, plZ, plX + 1.0D, plY + 1.0D, plZ + 1.0D).expand(boundingBoxRadius , boundingBoxRadius , boundingBoxRadius); //get all colliding boundingBoxes with our var4 box List list = Minecraft.getMinecraft().theWorld.getAllCollidingBoundingBoxes(var4); //only work if theres something in the list if(list != null) { Object obj = list;//or list.iterator; or list.iterator.hasNext(); if(obj instanceof BlockTorch){ System.out.println("FOUND TORCH!"); } }