Jump to content
View in the app

A better way to browse. Learn more.

Forge Forums

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

Egietje

Forge Modder
  • Joined

  • Last visited

Everything posted by Egietje

  1. So it would be like this: for(List<EntityLivingBase> entityInAABB = entitiesInAABB;entityInAABB.listIterator().hasNext();entityInAABB.listIterator().next()) { }
  2. is it like for(entityInAABB.Iterator.hasNext()) ?
  3. How would I make a for loop?
  4. But how do I get a entity from the list?
  5. The if statements are to check if the player is wearing all of the armor pieces of the set How should I otherwise do that? How can I hurt an entity?
  6. So I would do something like: @Override public void onArmorTick(World world, EntityPlayer player, ItemStack itemStack) { if(player.getItemStackFromSlot(EntityEquipmentSlot.HEAD) != null && player.getItemStackFromSlot(EntityEquipmentSlot.HEAD).getItem().equals(KokkieItems.EGEL_HELMET)) { if(player.getItemStackFromSlot(EntityEquipmentSlot.CHEST) != null && player.getItemStackFromSlot(EntityEquipmentSlot.CHEST).getItem().equals(KokkieItems.EGEL_CHESTPLATE)) { if(player.getItemStackFromSlot(EntityEquipmentSlot.LEGS) != null && player.getItemStackFromSlot(EntityEquipmentSlot.LEGS).getItem().equals(KokkieItems.EGEL_LEGGINGS)) { if(player.getItemStackFromSlot(EntityEquipmentSlot.FEET) != null && player.getItemStackFromSlot(EntityEquipmentSlot.FEET).getItem().equals(KokkieItems.EGEL_BOOTS)) { Entity entityInAABB = (Entity) world.getEntitiesWithinAABB(player.getClass(), player.getEntityBoundingBox()); //Hurt entityInAABB } } } } }
  7. So how would I do that?
  8. How do I make a pull request
  9. Hello I want to make armor that if you wear the whole set you 'become' a hedgehog With that I mean if you collide with another entity it will damage the other entity and damages the armor sort of like thorns But how do I detect of the player that wears the set is collided with another entity and how do I damage the other entity and the armor?
  10. Oh wait, I named 1 item wrong... Thanks
  11. If I kill it it doesn't drop any items
  12. Hello, I have 5 mobs but the loot tables aren't working, the code etc. Entity class: package com.Egietje.KokkieMod.mobs.boom; import java.util.UUID; import javax.annotation.Nullable; import com.Egietje.KokkieMod.init.KokkieItems; import com.Egietje.KokkieMod.init.KokkieSounds; import com.Egietje.KokkieMod.mobs.KokkieLoot; import com.google.common.base.Predicate; import net.minecraft.block.Block; import net.minecraft.entity.Entity; import net.minecraft.entity.EntityAgeable; import net.minecraft.entity.EntityLiving; import net.minecraft.entity.EntityLivingBase; import net.minecraft.entity.SharedMonsterAttributes; import net.minecraft.entity.ai.EntityAIAttackMelee; import net.minecraft.entity.ai.EntityAIBeg; import net.minecraft.entity.ai.EntityAIFollowOwner; import net.minecraft.entity.ai.EntityAIFollowParent; import net.minecraft.entity.ai.EntityAIHurtByTarget; import net.minecraft.entity.ai.EntityAILeapAtTarget; import net.minecraft.entity.ai.EntityAILookIdle; import net.minecraft.entity.ai.EntityAIMate; import net.minecraft.entity.ai.EntityAINearestAttackableTarget; import net.minecraft.entity.ai.EntityAIOwnerHurtByTarget; import net.minecraft.entity.ai.EntityAIOwnerHurtTarget; import net.minecraft.entity.ai.EntityAIPanic; import net.minecraft.entity.ai.EntityAISit; import net.minecraft.entity.ai.EntityAISwimming; import net.minecraft.entity.ai.EntityAITargetNonTamed; import net.minecraft.entity.ai.EntityAITempt; import net.minecraft.entity.ai.EntityAIWander; import net.minecraft.entity.ai.EntityAIWatchClosest; import net.minecraft.entity.monster.EntityCreeper; import net.minecraft.entity.monster.EntityGhast; import net.minecraft.entity.monster.EntitySkeleton; import net.minecraft.entity.monster.EntitySpider; import net.minecraft.entity.passive.EntityAnimal; import net.minecraft.entity.passive.EntityHorse; import net.minecraft.entity.passive.EntityRabbit; import net.minecraft.entity.passive.EntitySheep; import net.minecraft.entity.passive.EntityTameable; import net.minecraft.entity.passive.EntityWolf; import net.minecraft.entity.player.EntityPlayer; import net.minecraft.entity.projectile.EntityArrow; import net.minecraft.init.Items; import net.minecraft.init.SoundEvents; import net.minecraft.item.EnumDyeColor; import net.minecraft.item.ItemFood; import net.minecraft.item.ItemStack; import net.minecraft.nbt.NBTTagCompound; import net.minecraft.network.datasync.DataParameter; import net.minecraft.network.datasync.DataSerializers; import net.minecraft.network.datasync.EntityDataManager; import net.minecraft.util.DamageSource; import net.minecraft.util.EnumHand; import net.minecraft.util.EnumParticleTypes; import net.minecraft.util.ResourceLocation; import net.minecraft.util.SoundEvent; import net.minecraft.util.datafix.DataFixer; import net.minecraft.util.math.BlockPos; import net.minecraft.util.math.MathHelper; import net.minecraft.world.World; import net.minecraft.world.storage.loot.LootTableList; import net.minecraftforge.fml.relauncher.Side; import net.minecraftforge.fml.relauncher.SideOnly; public class EntityBoomKokkie extends EntityTameable { private static final DataParameter<Float> DATA_HEALTH_ID = EntityDataManager .<Float>createKey(EntityBoomKokkie.class, DataSerializers.FLOAT); private static final DataParameter<Byte> CLIMBING = EntityDataManager.<Byte>createKey(EntityBoomKokkie.class, DataSerializers.BYTE); private float headRotationCourse; private float headRotationCourseOld; public EntityBoomKokkie(World worldIn) { super(worldIn); this.setSize(0.4F, 0.54F); this.setTamed(false); } @Override protected ResourceLocation getLootTable() { return KokkieLoot.ENTITIES_BOOM; } protected void initEntityAI() { this.tasks.addTask(1, new EntityAISwimming(this)); this.tasks.addTask(2, new EntityAIFollowOwner(this, 1.0D, 10.0F, 2.0F)); this.tasks.addTask(3, new EntityAIMate(this, 1.0D)); this.tasks.addTask(4, new EntityAIWander(this, 1.0D)); this.tasks.addTask(5, new EntityAIWatchClosest(this, EntityPlayer.class, 8.0F)); this.tasks.addTask(6, new EntityAILookIdle(this)); this.tasks.addTask(7, new EntityAIAttackMelee(this, 1.0D, true)); this.tasks.addTask(8, new EntityAIFollowParent(this, 1.1D)); this.tasks.addTask(9, new EntityAITempt(this, 0.9D, KokkieItems.BESJE, false)); this.tasks.addTask(10, new EntityAILeapAtTarget(this, 0.4F)); this.targetTasks.addTask(1, new EntityAIOwnerHurtByTarget(this)); this.targetTasks.addTask(2, new EntityAIOwnerHurtTarget(this)); this.targetTasks.addTask(3, new EntityAIHurtByTarget(this, true, new Class[0])); } @Override public boolean isBreedingItem(@Nullable ItemStack stack) { return stack == null ? false : stack.getItem() == KokkieItems.BESJE; } protected void applyEntityAttributes() { super.applyEntityAttributes(); this.getEntityAttribute(SharedMonsterAttributes.MOVEMENT_SPEED).setBaseValue(0.30000001192092896D); if (this.isTamed()) { this.getEntityAttribute(SharedMonsterAttributes.MAX_HEALTH).setBaseValue(5.0D); } else { this.getEntityAttribute(SharedMonsterAttributes.MAX_HEALTH).setBaseValue(2.0D); } this.getAttributeMap().registerAttribute(SharedMonsterAttributes.ATTACK_DAMAGE).setBaseValue(0.5D); } protected void updateAITasks() { this.dataManager.set(DATA_HEALTH_ID, Float.valueOf(this.getHealth())); } protected void entityInit() { super.entityInit(); this.dataManager.register(DATA_HEALTH_ID, Float.valueOf(this.getHealth())); this.dataManager.register(CLIMBING, Byte.valueOf((byte) 0)); } protected void playStepSound(BlockPos pos, Block blockIn) { this.playSound(SoundEvents.ENTITY_ITEMFRAME_REMOVE_ITEM, 0.15F, 1.0F); } public static void func_189788_b(DataFixer p_189788_0_) { EntityLiving.func_189752_a(p_189788_0_, "BoomKokkie"); } protected SoundEvent getAmbientSound() { return this.isAngry() ? KokkieSounds.BOOM_KOKKIE_ANGRY : (this.rand.nextInt(3) == 0 ? (this.isTamed() && ((Float) this.dataManager.get(DATA_HEALTH_ID)).floatValue() < 10.0F ? KokkieSounds.BOOM_KOKKIE_AMBIENCE : KokkieSounds.BOOM_KOKKIE_AMBIENCE) : KokkieSounds.BOOM_KOKKIE_AMBIENCE); } protected SoundEvent getHurtSound() { return KokkieSounds.BOOM_KOKKIE_HURT; } protected SoundEvent getDeathSound() { return KokkieSounds.BOOM_KOKKIE_DEATH; } /** * Returns the volume for the sounds this mob makes. */ protected float getSoundVolume() { return 0.4F; } /** * Called to update the entity's position/logic. */ public void onUpdate() { super.onUpdate(); this.headRotationCourseOld = this.headRotationCourse; this.headRotationCourse += (0.0F - this.headRotationCourse) * 0.4F; if (!this.onGround && this.motionY < 0.0D) { this.motionY *= 0.6D; } if (!this.worldObj.isRemote) { this.setBesideClimbableBlock(this.isCollidedHorizontally); } } public boolean isOnLadder() { return this.isBesideClimbableBlock(); } public boolean isBesideClimbableBlock() { return (((Byte) this.dataManager.get(CLIMBING)).byteValue() & 1) != 0; } /** * Updates the WatchableObject (Byte) created in entityInit(), setting it to * 0x01 if par1 is true or 0x00 if it is false. */ public void setBesideClimbableBlock(boolean climbing) { byte b0 = ((Byte) this.dataManager.get(CLIMBING)).byteValue(); if (climbing) { b0 = (byte) (b0 | 1); } else { b0 = (byte) (b0 & -2); } this.dataManager.set(CLIMBING, Byte.valueOf(b0)); } public void fall(float distance, float damageMultiplier) { } @SideOnly(Side.CLIENT) public float getInterestedAngle(float p_70917_1_) { return (this.headRotationCourseOld + (this.headRotationCourse - this.headRotationCourseOld) * p_70917_1_) * 0.15F * (float) Math.PI; } public float getEyeHeight() { return this.height; } public int getVerticalFaceSpeed() { return this.isSitting() ? 20 : super.getVerticalFaceSpeed(); } public boolean attackEntityAsMob(Entity entityIn) { boolean flag = entityIn.attackEntityFrom(DamageSource.causeMobDamage(this), (float) ((int) this.getEntityAttribute(SharedMonsterAttributes.ATTACK_DAMAGE).getAttributeValue())); if (flag) { this.applyEnchantments(this, entityIn); } return flag; } public void setTamed(boolean tamed) { super.setTamed(tamed); if (tamed) { this.getEntityAttribute(SharedMonsterAttributes.MAX_HEALTH).setBaseValue(20.0D); } else { this.getEntityAttribute(SharedMonsterAttributes.MAX_HEALTH).setBaseValue(8.0D); } this.getEntityAttribute(SharedMonsterAttributes.ATTACK_DAMAGE).setBaseValue(4.0D); } public boolean processInteract(EntityPlayer player, EnumHand hand, @Nullable ItemStack stack) { if (this.isTamed()) { if (this.isOwner(player) && !this.worldObj.isRemote && !this.isBreedingItem(stack)) { this.isJumping = false; this.navigator.clearPathEntity(); this.setAttackTarget((EntityLivingBase) null); } } else if (stack != null && stack.getItem() == KokkieItems.BESJE) { if (!player.capabilities.isCreativeMode) { --stack.stackSize; } if (!this.worldObj.isRemote) { if (this.rand.nextInt(2) == 0) { this.setTamed(true); this.navigator.clearPathEntity(); this.setAttackTarget((EntityLivingBase) null); this.setHealth(5.0F); this.setOwnerId(player.getUniqueID()); this.playTameEffect(true); this.worldObj.setEntityState(this, (byte) 7); } else { this.playTameEffect(false); this.worldObj.setEntityState(this, (byte) 6); } } return true; } return super.processInteract(player, hand, stack); } public EntityBoomKokkie createChild(EntityAgeable ageable) { EntityBoomKokkie kokkie = new EntityBoomKokkie(this.worldObj); UUID uuid = this.getOwnerId(); if (uuid != null) { kokkie.setOwnerId(uuid); kokkie.setTamed(true); } return kokkie; } public boolean canMateWith(EntityAnimal otherAnimal) { if (otherAnimal == this) { return false; } else if (!this.isTamed()) { return false; } else if (!(otherAnimal instanceof EntityBoomKokkie)) { return false; } else { EntityBoomKokkie entitywolf = (EntityBoomKokkie) otherAnimal; return !entitywolf.isTamed() ? false : (entitywolf.isSitting() ? false : this.isInLove() && entitywolf.isInLove()); } } public boolean isAngry() { return (((Byte) this.dataManager.get(TAMED)).byteValue() & 2) != 0; } public void setAngry(boolean angry) { byte b0 = ((Byte) this.dataManager.get(TAMED)).byteValue(); if (angry) { this.dataManager.set(TAMED, Byte.valueOf((byte) (b0 | 2))); } else { this.dataManager.set(TAMED, Byte.valueOf((byte) (b0 & -3))); } } public boolean shouldAttackEntity(EntityLivingBase p_142018_1_, EntityLivingBase p_142018_2_) { if (!(p_142018_1_ instanceof EntityCreeper) && !(p_142018_1_ instanceof EntityGhast)) { if (p_142018_1_ instanceof EntityBoomKokkie) { EntityBoomKokkie entitywolf = (EntityBoomKokkie) p_142018_1_; if (entitywolf.isTamed() && entitywolf.getOwner() == p_142018_2_) { return false; } } return p_142018_1_ instanceof EntityPlayer && p_142018_2_ instanceof EntityPlayer && !((EntityPlayer) p_142018_2_).canAttackPlayer((EntityPlayer) p_142018_1_) ? false : !(p_142018_1_ instanceof EntityHorse) || !((EntityHorse) p_142018_1_).isTame(); } else { return false; } } public void setAttackTarget(@Nullable EntityLivingBase entitylivingbaseIn) { super.setAttackTarget(entitylivingbaseIn); if (entitylivingbaseIn == null) { this.setAngry(false); } else if (!this.isTamed()) { this.setAngry(true); } } public void writeEntityToNBT(NBTTagCompound compound) { super.writeEntityToNBT(compound); compound.setBoolean("Angry", this.isAngry()); } /** * (abstract) Protected helper method to read subclass entity data from NBT. */ public void readEntityFromNBT(NBTTagCompound compound) { super.readEntityFromNBT(compound); this.setAngry(compound.getBoolean("Angry")); } public void onLivingUpdate() { super.onLivingUpdate(); if (!this.worldObj.isRemote && this.getAttackTarget() == null && this.isAngry()) { this.setAngry(false); } } } Loot table class: package com.Egietje.KokkieMod.mobs; import com.Egietje.KokkieMod.Reference; import net.minecraft.util.ResourceLocation; import net.minecraft.world.storage.loot.LootTableList; public class KokkieLoot extends LootTableList { public static final ResourceLocation ENTITIES_BOOM = register("boom"); public static final ResourceLocation ENTITIES_GROND = register("grond"); public static final ResourceLocation ENTITIES_GROT = register("grot"); public static final ResourceLocation ENTITIES_ROTS = register("rots"); public static final ResourceLocation ENTITIES_EGEL = register("egel"); private static ResourceLocation register(String id) { return register(new ResourceLocation(Reference.ID, id)); } } Loot table json: { "pools": [ { "name": "boom", "rolls": 1, "entries": [ { "type": "item", "name": "km:boom_stof", "weight": 1, "functions": [ { "function": "set_count", "count": { "min": 1, "max": 2 } }, { "function": "looting_enchant", "count": { "min": 0, "max": 1 } } ] } ] }, { "name": "boom", "rolls": 1, "entries": [ { "type": "item", "name": "km:rauw_kokkie_stof", "weight": 1, "functions": [ { "function": "set_count", "count": { "min": 1, "max": 3 } }, { "function": "furnace_smelt", "conditions": [ { "condition": "entity_properties", "entity": "this", "properties": { "on_fire": true } } ] }, { "function": "looting_enchant", "count": { "min": 0, "max": 1 } } ] } ] } ] }
  13. Oh wait, just figured it out, still thanks!
  14. Then how should I do it?
  15. Thats it, but it doesn't detect it, I have this: @Override public void onArmorTick(World world, EntityPlayer player, ItemStack itemStack) { if(player.getItemStackFromSlot(EntityEquipmentSlot.HEAD) != null && player.getItemStackFromSlot(EntityEquipmentSlot.HEAD) == new ItemStack(KokkieItems.BOOM_HELMET)) { if(player.getItemStackFromSlot(EntityEquipmentSlot.CHEST) != null && player.getItemStackFromSlot(EntityEquipmentSlot.CHEST) == new ItemStack(KokkieItems.BOOM_CHESTPLATE)) { if(player.getItemStackFromSlot(EntityEquipmentSlot.LEGS) != null && player.getItemStackFromSlot(EntityEquipmentSlot.LEGS) == new ItemStack(KokkieItems.BOOM_LEGGINGS)) { if(player.getItemStackFromSlot(EntityEquipmentSlot.FEET) != null && player.getItemStackFromSlot(EntityEquipmentSlot.FEET) == new ItemStack(KokkieItems.BOOM_BOOTS)) { System.out.println("Works"); } } } } }
  16. Hello, I want to know how to check if a player has a full armor set worn, how would I do that because now I have this: @Override public void onArmorTick(World world, EntityPlayer player, ItemStack itemStack) { if(player.inventory.armorItemInSlot(103) != null && player.inventory.armorItemInSlot(103) == new ItemStack(KokkieItems.BOOM_HELMET)) { if(player.inventory.armorItemInSlot(102) != null && player.inventory.armorItemInSlot(102) == new ItemStack(KokkieItems.BOOM_CHESTPLATE)) { if(player.inventory.armorItemInSlot(101) != null && player.inventory.armorItemInSlot(101) == new ItemStack(KokkieItems.BOOM_LEGGINGS)) { if(player.inventory.armorItemInSlot(100) != null && player.inventory.armorItemInSlot(100) == new ItemStack(KokkieItems.BOOM_BOOTS)) { } } } } } But that crashes the game
  17. I mean the slider itself, what is shows in it
  18. So, I have a slider that you can slide to say how many cookies you want but now it is like I want 1.0, 1.1, 1.2 etc. cookies but how do I make it so it only uses 1, 2 etc.?
  19. Do you have a blockstate model for it?
  20. I have this and this works fine: public WorldGenerator BUSH= new WorldGenBush((BlockBush) BlockClass.BLOCK); @Override public void generate(Random random, int chunkX, int chunkZ, World world, IChunkGenerator chunkGenerator, IChunkProvider chunkProvider) { switch (world.provider.getDimension()) { case -1: break; case 0: runGenerator(BUSH, world, random, chunkX, chunkZ, 7, 50, 120); break; case 1: break; } } private void runGenerator(WorldGenerator generator, World world, Random random, int chunk_X, int chunk_Z, int chancesToSpawn, int minHeight, int maxHeight){ if (minHeight < 0 || maxHeight > 256 || minHeight > maxHeight){ throw new IllegalArgumentException("Illegal Height Arguments for WorldGenerator"); } int heightDiff = maxHeight - minHeight + 1; for (int i = 0; i < chancesToSpawn; i++); { int x = chunk_X * 16 + random.nextInt(16); int y = minHeight + random.nextInt(heightDiff); int z = chunk_Z * 16 + random.nextInt(16); generator.generate(world, random, new BlockPos(x, y, z)); } } }
  21. So, now I have this: public class CheeseCookieGui extends GuiScreen { public GuiSlider cookies = new GuiSlider(0, width / 2 - 100, height / 4 + 42 + -16, 200, 20, "Ik wil ", " koekjes", 1, 10, 5, true, true); public boolean slider = false; @Override public void initGui() { slider = false; buttonList.add(new GuiButtonExt(1, width / 2 - 100, height / 4 + 42 + -16, 200, 20, "Goed geopend!")); } @Override protected void actionPerformed(GuiButton button) throws IOException { switch(button.id) { case 1 : buttonList.removeAll(buttonList); buttonList.add(new GuiButtonExt(2, width / 2 - 100, height / 4 + 42 + -16, 200, 20, "Stop!")); break; case 2 : buttonList.removeAll(buttonList); buttonList.add(new GuiButtonExt(3, width / 2 - 100, height / 4 + 42 + -16, 200, 20, "Ik zei STOP!")); break; case 3 : buttonList.removeAll(buttonList); buttonList.add(new GuiButtonExt(4, width / 2 - 100, height / 4 + 42 + -16, 200, 20, "Nooit luisteren he")); break; case 4 : buttonList.removeAll(buttonList); buttonList.add(new GuiButtonExt(5, width / 2 - 100, height / 4 + 42 + -16, 200, 20, "Wil je een koekje?")); buttonList.add(new GuiButtonExt(6, width / 2 - 100, height / 4 + 72 + -16, 75, 20, "Ja")); buttonList.add(new GuiButtonExt(7, width / 2 + 25, height / 4 + 72 + -16, 75, 20, "Nee")); break; case 5 : buttonList.removeAll(buttonList); buttonList.add(new GuiButtonExt(8, width / 2 - 100, height / 4 + 42 + -16, 200, 20, "Mahn, niet op klikken")); buttonList.add(new GuiButtonExt(9, width / 2 - 100, height / 4 + 72 + -16, 200, 20, "Terug naar koekjes")); break; case 6 : buttonList.removeAll(buttonList); buttonList.add(cookies); buttonList.add(new GuiButtonExt(10, width / 2 - 100, height / 4 + 72 + -16, 200, 20, "Ok")); slider = true; break; case 7 : buttonList.removeAll(buttonList); this.mc.displayGuiScreen((GuiScreen)null); break; case 8 : break; case 9 : buttonList.removeAll(buttonList); buttonList.add(new GuiButtonExt(5, width / 2 - 100, height / 4 + 42 + -16, 200, 20, "Wil je een koekje?")); buttonList.add(new GuiButtonExt(6, width / 2 - 100, height / 4 + 72 + -16, 75, 20, "Ja")); buttonList.add(new GuiButtonExt(7, width / 2 + 25, height / 4 + 72 + -16, 75, 20, "Nee")); break; case 10 : buttonList.removeAll(buttonList); slider = false; if(!Minecraft.getMinecraft().thePlayer.isCreative()) { if(Minecraft.getMinecraft().thePlayer.experienceLevel > 3 * cookies.getValueInt()) { Minecraft.getMinecraft().thePlayer.inventory.addItemStackToInventory(new ItemStack(Items.COOKIE, cookies.getValueInt())); Minecraft.getMinecraft().thePlayer.removeExperienceLevel(3 * cookies.getValueInt()); this.mc.displayGuiScreen((GuiScreen)null); } else { buttonList.add(new GuiButtonExt(7, width / 2 - 100, height / 4 + 42 + -16, 200, 20, "Je hebt niet genoeg xp")); } } else { Minecraft.getMinecraft().thePlayer.inventory.addItemStackToInventory(new ItemStack(Items.COOKIE, cookies.getValueInt())); this.mc.displayGuiScreen((GuiScreen)null); } break; } } @Override public void drawScreen(int mouseX, int mouseY, float partialTicks) { if(slider) { drawCenteredString(fontRendererObj, "Je krijgt " + String.valueOf(cookies.getValueInt()) + " koekjes, dat is " + String.valueOf(cookies.getValueInt() * 3) + " XP levels" , width / 2 - 100, height / 4 + 102 + -16, 0xFFFFFF); } super.drawScreen(mouseX, mouseY, partialTicks); } } But the slider and text appear in weird places
  22. But the string isn't showing up
  23. I now do buttonList.add(cookies = new GuiSlider(8, width / 2 - 100, height / 4 + 42 + -16, 200, 20, "Ik wil ", " koekjes", 1, 10, 5, true, true)); drawCenteredString(fontRendererObj, String.valueOf(cookies.getValueInt()) + "koekjes, dat is " + String.valueOf(cookies.getValueInt() * 3) + " XP levels" , width / 2 - 100, height / 4 + 102 + -16, 0xFFFFFF);
  24. Well, now I just do this: drawCenteredString(fontRendererObj, String.valueOf(cookies.getValueInt()) + "koekjes, dat is " + String.valueOf(cookies.getValueInt() * 3) + " XP levels" , width / 2 - 100, height / 4 + 102 + -16, 0x8B4513);

Important Information

By using this site, you agree to our Terms of Use.

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.