Jump to content

forge scala-lang xml error


Recommended Posts


I tried installing minecraft forge 1.7.10 yesterday, but it didn't work, the installer window wouldn't even show up. After some research online, a saw a lot of people saying that i should try other versions, which didn't work either.
Finally i saw a comment that actually seemed to work, it told me to instal using the cmd [java -jar forge-1.7.10-], which did work, but after a few seconds the installation stopped and a window showed up saying that there was an error saying that some libraries failed to download, more specifically, org.scala-lang, and there were multiple libraries like that one missing. Someone told me that i should download directly the libraries and place them in the correspondent files inside of  "C:\Users\Utilizador\AppData\Roaming\.minecraft\libraries\org\scala-lang", amazingly these seemed to work, but there is one library that even though i have it in the correct place, and it's on the correct version, it doesn't work, i've tried to download it multiple times, and even tried different versions, but nothing seems to work.

584433298_xmlerror.png.2bce31054b063229c4732fea48aa871c.png- this is the version i have in C:\Users\Utilizador\AppData\Roaming\.minecraft\libraries\org\scala-lang\scala-xml_2.11\1.0.2

And now i can't even use any of my other minecraft versions, Is there a solution that anyone knows of?

I'll also leave this here, in case it helps at all...


C:\Users\Utilizador\Desktop\Minecraft\runtime\jre-x64\bin>java -jar forge-1.7.10-
Setting up logger: C:\Users\Utilizador\Desktop\Minecraft\runtime\jre-x64\bin\forge-1.7.10-
Considering library net.minecraftforge:forge:1.7.10- Not Downloading {Wrong Side}
Considering library net.minecraft:launchwrapper:1.12: Not Downloading {Wrong Side}
Considering library org.ow2.asm:asm-all:5.0.3: Not Downloading {Wrong Side}
Considering library com.typesafe.akka:akka-actor_2.11:2.3.3
Considering library com.typesafe:config:1.2.1
Considering library org.scala-lang:scala-actors-migration_2.11:1.1.0
Considering library org.scala-lang:scala-compiler:2.11.1
Considering library org.scala-lang.plugins:scala-continuations-library_2.11:1.0.2
Considering library org.scala-lang.plugins:scala-continuations-plugin_2.11.1:1.0.2
Considering library org.scala-lang:scala-library:2.11.1
Considering library org.scala-lang:scala-parser-combinators_2.11:1.0.1
Considering library org.scala-lang:scala-reflect:2.11.1
Considering library org.scala-lang:scala-swing_2.11:1.0.1
Considering library org.scala-lang:scala-xml_2.11:1.0.2
  Checksum Failed:
    Found:    820fbca7e524b530fdadc594c39d49a21ea0337e
    Expected: 7a80ec00aec122fba7cd4e0d4cdd87ff7e4cb6d0
    Expected: 62736b01689d56b6d09a0164b7ef9da2b0b9633d
Downloading library org.scala-lang:scala-xml_2.11:1.0.2
  Trying unpacked library org.scala-lang:scala-xml_2.11:1.0.2
javax.net.ssl.SSLHandshakeException: sun.security.validator.ValidatorException: PKIX path building failed: sun.security.provider.certpath.SunCertPathBuilderException: unable to find valid certification path to requested target
        at sun.security.ssl.Alerts.getSSLException(Alerts.java:192)
        at sun.security.ssl.SSLSocketImpl.fatal(SSLSocketImpl.java:1949)
        at sun.security.ssl.Handshaker.fatalSE(Handshaker.java:302)
        at sun.security.ssl.Handshaker.fatalSE(Handshaker.java:296)
        at sun.security.ssl.ClientHandshaker.serverCertificate(ClientHandshaker.java:1497)
        at sun.security.ssl.ClientHandshaker.processMessage(ClientHandshaker.java:212)
        at sun.security.ssl.Handshaker.processLoop(Handshaker.java:979)
        at sun.security.ssl.Handshaker.process_record(Handshaker.java:914)
        at sun.security.ssl.SSLSocketImpl.readRecord(SSLSocketImpl.java:1062)
        at sun.security.ssl.SSLSocketImpl.performInitialHandshake(SSLSocketImpl.java:1375)
        at sun.security.ssl.SSLSocketImpl.startHandshake(SSLSocketImpl.java:1403)
        at sun.security.ssl.SSLSocketImpl.startHandshake(SSLSocketImpl.java:1387)
        at sun.net.www.protocol.https.HttpsClient.afterConnect(HttpsClient.java:563)
        at sun.net.www.protocol.https.AbstractDelegateHttpsURLConnection.connect(AbstractDelegateHttpsURLConnection.java:185)
        at sun.net.www.protocol.http.HttpURLConnection.getInputStream0(HttpURLConnection.java:1512)
        at sun.net.www.protocol.http.HttpURLConnection.getInputStream(HttpURLConnection.java:1440)
        at sun.net.www.protocol.https.HttpsURLConnectionImpl.getInputStream(HttpsURLConnectionImpl.java:254)
        at net.minecraftforge.installer.DownloadUtils$URLISSupplier.getInput(DownloadUtils.java:276)
        at net.minecraftforge.installer.DownloadUtils$URLISSupplier.getInput(DownloadUtils.java:264)
        at com.google.common.io.ByteStreams$6.openStream(ByteStreams.java:989)
        at com.google.common.io.ByteSource.copyTo(ByteSource.java:202)
        at com.google.common.io.Files.copy(Files.java:382)
        at net.minecraftforge.installer.DownloadUtils.downloadFile(DownloadUtils.java:198)
        at net.minecraftforge.installer.DownloadUtils.downloadInstalledLibraries(DownloadUtils.java:50)
        at net.minecraftforge.installer.ClientInstall.run(ClientInstall.java:131)
        at net.minecraftforge.installer.InstallerAction.run(InstallerAction.java:43)
        at net.minecraftforge.installer.InstallerPanel.run(InstallerPanel.java:406)
        at net.minecraftforge.installer.SimpleInstaller.launchGui(SimpleInstaller.java:168)
        at net.minecraftforge.installer.SimpleInstaller.main(SimpleInstaller.java:54)
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
        at java.lang.reflect.Method.invoke(Method.java:497)
        at net.minecraftforge.installer.Java6Gate.main(Java6Gate.java:48)
Caused by: sun.security.validator.ValidatorException: PKIX path building failed: sun.security.provider.certpath.SunCertPathBuilderException: unable to find valid certification path to requested target
        at sun.security.validator.PKIXValidator.doBuild(PKIXValidator.java:387)
        at sun.security.validator.PKIXValidator.engineValidate(PKIXValidator.java:292)
        at sun.security.validator.Validator.validate(Validator.java:260)
        at sun.security.ssl.X509TrustManagerImpl.validate(X509TrustManagerImpl.java:324)
        at sun.security.ssl.X509TrustManagerImpl.checkTrusted(X509TrustManagerImpl.java:229)
        at sun.security.ssl.X509TrustManagerImpl.checkServerTrusted(X509TrustManagerImpl.java:124)
        at sun.security.ssl.ClientHandshaker.serverCertificate(ClientHandshaker.java:1479)
        ... 29 more
Caused by: sun.security.provider.certpath.SunCertPathBuilderException: unable to find valid certification path to requested target
        at sun.security.provider.certpath.SunCertPathBuilder.build(SunCertPathBuilder.java:145)
        at sun.security.provider.certpath.SunCertPathBuilder.engineBuild(SunCertPathBuilder.java:131)
        at java.security.cert.CertPathBuilder.build(CertPathBuilder.java:280)
        at sun.security.validator.PKIXValidator.doBuild(PKIXValidator.java:382)
        ... 35 more
  File not found in installer archive: /maven/org/scala-lang/scala-xml_2.11/1.0.2/scala-xml_2.11-1.0.2.jar
Considering library lzma:lzma:0.0.1: Not Downloading {Wrong Side}
Considering library net.sf.jopt-simple:jopt-simple:4.5: Not Downloading {Wrong Side}
Considering library com.google.guava:guava:17.0: Not Downloading {Wrong Side}
Considering library org.apache.commons:commons-lang3:3.3.2: Not Downloading {Wrong Side}


Edited by Icarus_00_
Link to comment
Share on other sites

  • Icarus_00_ changed the title to forge scala-lang xml error
This topic is now closed to further replies.


  • Recently Browsing

    • No registered users viewing this page.
  • Posts

    • 마에바시 이발소 카카오톡 〓BCGAME88·COM♤ 마에바시 이발소 새주소 월드컵 마에바시 이발소 위치 야구 이발소 추천 수구 이발소 오픈채팅[본사문의 텔레 @JBOX7] 마에바시 이발소 시스템 사이클 마에바시 이발소 업소모집 멀리뛰기 이발소 모임 정보 쇼트트랙 이발소 틱톡[총판문의 카톡 JBOX7] 마에바시 이발소 리조트 창던지기 마에바시 이발소 야동 펜싱 이발소 총판 럭비 이발소 오픈채팅[각종 오피 커뮤니티 제작] 마에바시 이발소 동영상 스키 마에바시 이발소 동영상 멀리뛰기 이발소 동영상 역도 이발소 방송[마케팅문의] 마에바시 이발소 동호회 택견 마에바시 이발소 트위터 멀리뛰기 이발소 구인광고 창던지기 이발소 구인광고 [카지노본사] 마에바시 이발소 인스타그램 스키 마에바시 이발소 인스타그램 보트경기 이발소 모임 정보 농구 이발소 총판 [스포츠본사] 마에바시 이발소 틱톡 배구 마에바시 이발소 위치 택견 이발소 방송 유도 이발소 추천[토토본사 문의] 마에바시 이발소 최신주소 하키 마에바시 이발소 이야기 테니스 이발소 여행 스키 이발소 링크 [토토총판 구매] 마에바시 이발소 오픈채팅 철봉 마에바시 이발소 접속 농구 이발소 위치 럭비 이발소 최신주소[카지노총판] 마에바시 이발소 오픈채팅 유도 마에바시 이발소 최신주소 씨름 이발소 주소 킥복싱 이발소 틱톡[야마토본사] 마에바시 이발소 이야기 펜싱 마에바시 이발소 동호회 피겨 이발소 영상 골프 이발소 동영상[바카라총판] 마에바시 이발소 방송 테니스 마에바시 이발소 하는곳 쇼트트랙 이발소 트위터 보치아 이발소 이야기[경마총판] 마에바시 이발소 총판 창던지기 마에바시 이발소 야동 라켓볼 이발소 트위터 창던지기 이발소 최신주소[BCGAME 비씨게임 총판문의]알림 설정 추천 구독 좋아요
    • 2023(2024 Remidial Admission Form for Ritman University, Ikot Ekpene, Pre degree/Direct-Entry form ☎️08039816237 OR {2348039816237} JUPEB Form, Postgraduate Form,Pre-Degree Form (08039816237, Jupeb form IJMB Form, masters form,Ph.D Form,Sandwich Form,Diploma Form,Change of institution form,Part-Time call (08039816237 OR {08039816237} Change of course Form,POST UTME Form.
    • I don't know why my entity can attack any entity but players This is the entity's code package mymod.entities.chicken; import com.google.common.collect.ImmutableList; import com.google.errorprone.annotations.Immutable; import net.minecraft.advancements.CriteriaTriggers; import net.minecraft.nbt.CompoundTag; import net.minecraft.nbt.Tag; import net.minecraft.network.syncher.EntityDataAccessor; import net.minecraft.network.syncher.EntityDataSerializers; import net.minecraft.network.syncher.SynchedEntityData; import net.minecraft.server.level.ServerLevel; import net.minecraft.server.level.ServerPlayer; import net.minecraft.sounds.SoundEvent; import net.minecraft.sounds.SoundEvents; import net.minecraft.stats.Stats; import net.minecraft.util.RandomSource; import net.minecraft.util.TimeUtil; import net.minecraft.util.valueproviders.UniformInt; import net.minecraft.world.InteractionHand; import net.minecraft.world.InteractionResult; import net.minecraft.world.damagesource.DamageSource; import net.minecraft.world.entity.*; import net.minecraft.world.entity.ai.attributes.AttributeSupplier; import net.minecraft.world.entity.ai.attributes.Attributes; import net.minecraft.world.entity.ai.goal.*; import net.minecraft.world.entity.ai.goal.target.HurtByTargetGoal; import net.minecraft.world.entity.ai.goal.target.NearestAttackableTargetGoal; import net.minecraft.world.entity.ai.goal.target.ResetUniversalAngerTargetGoal; import net.minecraft.world.entity.animal.*; import net.minecraft.world.entity.monster.Zombie; import net.minecraft.world.entity.player.Player; import net.minecraft.world.item.Item; import net.minecraft.world.item.ItemStack; import net.minecraft.world.item.Items; import net.minecraft.world.level.GameRules; import net.minecraft.world.level.ItemLike; import net.minecraft.world.level.Level; import net.minecraft.world.level.block.Block; import net.minecraft.world.level.block.Blocks; import net.minecraft.world.phys.Vec3; import org.jetbrains.annotations.NotNull; import org.jetbrains.annotations.Nullable; import oshi.util.tuples.Pair; import mymod._Entities; import mymod._EntityDataSerializers; import mymod._Items; import mymod._Sounds; import mymod.ai.ZombieAttackChickenEggGoal; import mymod.entities.BredWithMobStorable; import mymod.util.delayedtask.DelayedTask; import mymod.util.delayedtask.DelayedTasksHolder; import java.util.EnumSet; import java.util.Optional; import java.util.UUID; import java.util.function.Supplier; public class Rooster extends AbstractChicken implements NeutralMob, BredWithMobStorable, DelayedTasksHolder<Rooster> { private static final UniformInt PERSISTENT_ANGER_TIME = TimeUtil.rangeOfSeconds(60, 1800); private int remainingPersistentAngerTime; private UUID persistentAngerTarget; private boolean crowing; private int crowTicks; private int diggingAnimTicks; private int featherDropCoolDown; private static final EntityDataAccessor<FourFeathers> DATA_FEATHERS = SynchedEntityData.defineId(Rooster.class, _EntityDataSerializers.ROOSTER_FEATHERS.get()); private static final EntityDataAccessor<Optional<UUID>> DATA_MOB_BRED_WITH = SynchedEntityData.defineId(Rooster.class, EntityDataSerializers.OPTIONAL_UUID); public Rooster(EntityType<? extends Rooster> entityType, Level world) { super(entityType, world); } @Override public int getRemainingPersistentAngerTime() { return remainingPersistentAngerTime; } @Override public void setRemainingPersistentAngerTime(int remainingPersistentAngerTime) { this.remainingPersistentAngerTime = remainingPersistentAngerTime; } @Nullable @Override public UUID getPersistentAngerTarget() { return persistentAngerTarget; } @Override public void setPersistentAngerTarget(@Nullable UUID persistentAngerTarget) { this.persistentAngerTarget = persistentAngerTarget; } @Override public void startPersistentAngerTimer() { setRemainingPersistentAngerTime(PERSISTENT_ANGER_TIME.sample(random)); } @Override protected void defineSynchedData() { super.defineSynchedData(); entityData.define(DATA_FEATHERS, new FourFeathers((byte) random.nextInt(3), (byte) random.nextInt(3), (byte) random.nextInt(3), (byte) random.nextInt(3))); entityData.define(DATA_MOB_BRED_WITH, Optional.empty()); } public FourFeathers getFeatherData() { return entityData.get(DATA_FEATHERS); } public void setFeatherData(FourFeathers featherData) { entityData.set(DATA_FEATHERS, featherData); } @Override public void addAdditionalSaveData(@NotNull CompoundTag nbt) { super.addAdditionalSaveData(nbt); addPersistentAngerSaveData(nbt); nbt.put("FeatherData", getFeatherData().writeTag()); nbt.putBoolean("isCrowing", crowing); } @Override public void readAdditionalSaveData(@NotNull CompoundTag nbt) { super.readAdditionalSaveData(nbt); readPersistentAngerSaveData(level(), nbt); if (nbt.contains("FeatherData", Tag.TAG_COMPOUND)) setFeatherData(FourFeathers.readTag(nbt.getCompound("FeatherData"))); else setFeatherData(FourFeathers.NONE); crowing = nbt.contains("isCrowing", Tag.TAG_BYTE) && nbt.getBoolean("isCrowing"); } @Override protected void registerGoals() { goalSelector.addGoal(0, new FloatGoal(this)); goalSelector.addGoal(1, new MeleeAttackGoal(this, 1.4, true)); // I even have a MeleeAttackGoal, rooster just runs to player but not hurting him goalSelector.addGoal(1, new RoosterRandomTryFindFoodGoal()); goalSelector.addGoal(2, new RoosterBreedGoal()); goalSelector.addGoal(3, new TemptGoal(this, 1, FOOD_ITEMS, false)); goalSelector.addGoal(5, new WaterAvoidingRandomStrollGoal(this, 1)); goalSelector.addGoal(6, new LookAtPlayerGoal(this, Player.class, 6)); goalSelector.addGoal(7, new RandomLookAroundGoal(this)); targetSelector.addGoal(4, new RoosterRandomAttackNearbyRoosterGoal()); targetSelector.addGoal(1, new NearestAttackableTargetGoal<>(this, LivingEntity.class, true, entity -> entity instanceof Fox || (entity instanceof Ocelot ocelot && !ocelot.isBaby()) || (entity instanceof Cat cat && !cat.isBaby() && !cat.isTame()) || (entity instanceof Zombie zombie && zombie.goalSelector .getRunningGoals().anyMatch(wrappedGoal -> wrappedGoal.getGoal() instanceof ZombieAttackChickenEggGoal)) || isAngryAt(entity))); targetSelector.addGoal(2, new HurtByTargetGoal(this)); targetSelector.addGoal(3, new ResetUniversalAngerTargetGoal<>(this, false)); } @Override public void setMobBredWith(@Nullable UUID uuid) { entityData.set(DATA_MOB_BRED_WITH, Optional.ofNullable(uuid)); } @Override @Nullable public UUID getMobBredWith() { return entityData.get(DATA_MOB_BRED_WITH).orElse(null); } // Goals class RoosterRandomAttackNearbyRoosterGoal extends NearestAttackableTargetGoal<Rooster> { RoosterRandomAttackNearbyRoosterGoal() { super(Rooster.this, Rooster.class, true); } @Override public boolean canUse() { return super.canUse() && random.nextInt(300) == 0; } @Override public boolean canContinueToUse() { return super.canContinueToUse() && mob.getLastHurtMob() != targetMob; } } class RoosterBreedGoal extends BreedGoal { RoosterBreedGoal() { super(Rooster.this, 1, Chicken.class); } @Override protected void breed() { ServerPlayer serverplayer = animal.getLoveCause(); if (serverplayer == null && this.partner.getLoveCause() != null) { serverplayer = this.partner.getLoveCause(); } if (serverplayer != null) { serverplayer.awardStat(Stats.ANIMALS_BRED); CriteriaTriggers.BRED_ANIMALS.trigger(serverplayer, this.animal, this.partner, null); } ((BredWithMobStorable) partner).setMobBredWith(animal.getUUID()); ((BredWithMobStorable) animal).setMobBredWith(partner.getUUID()); animal.setAge(6000); partner.setAge(6000); animal.resetLove(); partner.resetLove(); RandomSource randomsource = animal.getRandom(); if (this.level.getGameRules().getBoolean(GameRules.RULE_DOMOBLOOT)) { this.level.addFreshEntity(new ExperienceOrb(this.level, this.animal.getX(), this.animal.getY(), this.animal.getZ(), randomsource.nextInt(7) + 1)); } } } private static final DelayedTask<Rooster> CROW_LATER = new DelayedTask<>(30) { @Override protected void execute() { entity.crow(); } }; private static final DelayedTask<Rooster> ANGRY_CLUCK_LATER = new DelayedTask<>(30) { @Override protected void execute() { entity.playSound(_Sounds.ROOSTER_ANGRY_CLUCK.get()); } }; @Override public ImmutableList<DelayedTask<Rooster>> getTasks() { return ImmutableList.of(CROW_LATER, ANGRY_CLUCK_LATER); } class RoosterRandomTryFindFoodGoal extends Goal { private final Rooster rooster; private int tickCount; private int maxTickCount; private int lastDugTicks; private int roosterLastHurtByMobTimestamp; private double lookAtXOld, lookAtYOld, lookAtZOld; private Vec3 pos; private boolean didEndSuccessfully; private Vec3 lookingAtPos; private static final UniformInt POSSIBLE_MAX_TICK_COUNT = TimeUtil.rangeOfSeconds(4, 10); RoosterRandomTryFindFoodGoal() { super(); this.rooster = Rooster.this; setFlags(EnumSet.of(Flag.LOOK)); } @Override public boolean canUse() { return (isStandingOn(Blocks.GRASS_BLOCK) || isStandingOn(Blocks.DIRT) || isStandingOn(Blocks.PODZOL)) && rooster.random.nextInt(3000) == 20; } @Override public boolean canContinueToUse() { if (rooster.getLastHurtByMobTimestamp() != roosterLastHurtByMobTimestamp) { didEndSuccessfully = false; return false; } else if (tickCount >= maxTickCount) { didEndSuccessfully = true; return false; } return true; } @Override public boolean requiresUpdateEveryTick() { return true; } @Override public void start() { lastDugTicks = 20; roosterLastHurtByMobTimestamp = rooster.getLastHurtByMobTimestamp(); lookAtXOld = rooster.getLookControl().getWantedX(); lookAtYOld = rooster.getLookControl().getWantedY(); lookAtZOld = rooster.getLookControl().getWantedZ(); pos = new Vec3(rooster.position().toVector3f()); lookingAtPos = rooster.position().subtract(0, 1, 0); rooster.getLookControl().setLookAt(lookingAtPos); maxTickCount = POSSIBLE_MAX_TICK_COUNT.sample(rooster.random); } @Override public void stop() { rooster.getLookControl().setLookAt(lookAtXOld, lookAtYOld, lookAtZOld); if (didEndSuccessfully) { int resultItemPercentage = rooster.random.nextInt(100); if (resultItemPercentage <= 1) { rooster.spawnAtLocation(Items.DIAMOND, -1); Rooster.ANGRY_CLUCK_LATER.startExecution(rooster); } else if (resultItemPercentage <= 5) { rooster.spawnAtLocation(Items.GOLD_NUGGET, -1); Rooster.ANGRY_CLUCK_LATER.startExecution(rooster); } else if (resultItemPercentage <= 20) { Rooster.ANGRY_CLUCK_LATER.startExecution(rooster); } else { rooster.spawnAtLocation(FOOD_ITEMS.getItems()[rooster.random.nextInt( FOOD_ITEMS.getItems().length)], -1); Rooster.CROW_LATER.startExecution(rooster); } } } @Override public void tick() { ++tickCount; rooster.getLookControl().setLookAt(lookingAtPos); rooster.getMoveControl().setWantedPosition(pos.x, pos.y, pos.z, rooster.getMoveControl().getSpeedModifier()); if (lastDugTicks <= 0) { lastDugTicks = 20; rooster.diggingAnimTicks = 10; rooster.playSound(rooster.level().getBlockState(rooster.blockPosition().below()) .getSoundType(rooster.level(), rooster.blockPosition().below(), rooster) .getHitSound()); } else lastDugTicks--; } private boolean isStandingOn(Block block) { return rooster.level().getBlockState(rooster.blockPosition().below()).is(block); } } // Feather data storage @Immutable public record FourFeathers(@NotNull FeatherType first, @NotNull FeatherType second, @NotNull FeatherType third, @NotNull FeatherType forth) { public static final FourFeathers NONE = new FourFeathers(FeatherType.NONE, FeatherType.NONE, FeatherType.NONE, FeatherType.NONE); public FourFeathers(byte first, byte second, byte third, byte forth) { this(FeatherType.fromByte(first), FeatherType.fromByte(second), FeatherType.fromByte(third), FeatherType.fromByte(forth)); } public @NotNull Pair<ItemStack, FourFeathers> removeRandom(RandomSource randomSource) { if (NONE.equals(this)) return new Pair<>(ItemStack.EMPTY, this); int randomNum = randomSource.nextInt(4); while (get(randomNum) == null) randomNum = randomSource.nextInt(4); ItemStack retVal0 = get(randomNum).getDefaultInstance(); FourFeathers retVal1 = switch (randomNum) { case 0 -> new FourFeathers(FeatherType.NONE, second, third, forth); case 1 -> new FourFeathers(first, FeatherType.NONE, third, forth); case 2 -> new FourFeathers(first, second, FeatherType.NONE, forth); case 3 -> new FourFeathers(first, second, third, FeatherType.NONE); default -> null; // unreachable }; return new Pair<>(retVal0, retVal1); } @Nullable public Item get(int i) { return (switch (i) { case 0 -> first; case 1 -> second; case 2 -> third; case 3 -> forth; default -> throw new IllegalStateException("Unexpected value: " + i); }).asItem(); } // NBT Utils @NotNull public CompoundTag writeTag() { CompoundTag nbt = new CompoundTag(); nbt.putString("first", first.name().toLowerCase()); nbt.putString("second", second.name().toLowerCase()); nbt.putString("third", third.name().toLowerCase()); nbt.putString("forth", forth.name().toLowerCase()); return nbt; } @NotNull public static FourFeathers readTag(@NotNull CompoundTag nbt) { return new FourFeathers(tryRead(nbt, "first"), tryRead(nbt, "second"), tryRead(nbt, "third"), tryRead(nbt, "forth")); } private static FeatherType tryRead(CompoundTag tag, String toRead) { if (tag.contains(toRead, Tag.TAG_STRING)) { try { return FeatherType.valueOf(tag.getString(toRead).toUpperCase()); } catch (IllegalArgumentException e) { return FeatherType.NONE; } } return FeatherType.NONE; } } public enum FeatherType implements ItemLike { RED(_Items.RED_FEATHER, (byte) 0), YELLOW(_Items.YELLOW_FEATHER, (byte) 1), GREEN(_Items.GREEN_FEATHER, (byte) 2), BLUE(_Items.BLUE_FEATHER, (byte) 3), NONE(() -> null, (byte) -1); private final Supplier<Item> itemSup; private final byte byteVal; FeatherType(Supplier<Item> itemSup, byte byteVal) { this.itemSup = itemSup; this.byteVal = byteVal; } public static FeatherType fromByte(byte item) { return switch (item) { case -1 -> NONE; case 0 -> RED; case 1 -> YELLOW; case 2 -> GREEN; case 3 -> BLUE; default -> throw new IllegalArgumentException("item: " + item); }; } @Override public @Nullable Item asItem() { return itemSup.get(); } public byte asByte() { return byteVal; } } // Sounds @Override protected SoundEvent getAmbientSound() { return _Sounds.ROOSTER_AMBIENT.get(); } @Override protected SoundEvent getHurtSound(@NotNull DamageSource damageSource) { return _Sounds.ROOSTER_HURT.get(); } @Override protected SoundEvent getDeathSound() { return _Sounds.ROOSTER_DEATH.get(); } public static AttributeSupplier.Builder createAttributes() { // Maybe something's missing here? return createMobAttributes() .add(Attributes.ATTACK_DAMAGE, 2) .add(Attributes.MAX_HEALTH, 8) .add(Attributes.MOVEMENT_SPEED, .3); } @Override public boolean isBaby() { return false; } @Override public boolean canMate(@NotNull Animal other) { if (this == other) return false; else if (!(other instanceof Chicken)) return false; else return isInLove() && other.isInLove(); } @Override protected void doAIStep() { if (!level().isClientSide) { updatePersistentAnger((ServerLevel) level(), true); } } @Override public void setBaby(boolean baby) { if (baby) { Chick me = convertTo(_Entities.CHICK.get(), false); if (me != null) { me.setBoy(true); } } } @Override public @NotNull InteractionResult mobInteract(@NotNull Player player, @NotNull InteractionHand hand) { if (isFood(player.getItemInHand(hand))) { return super.mobInteract(player, hand); } else if (player.getItemInHand(hand) == ItemStack.EMPTY) { dropFeather(player); return InteractionResult.CONSUME; } return InteractionResult.PASS; } private void dropFeather(LivingEntity target) { Pair<ItemStack, FourFeathers> resFeathers = getFeatherData().removeRandom(random); setFeatherData(resFeathers.getB()); if (resFeathers.getA() != null && featherDropCoolDown == 0) { spawnAtLocation(resFeathers.getA()); playSound(SoundEvents.ITEM_PICKUP); setTarget(target); featherDropCoolDown = random.nextIntBetweenInclusive(20, 30); } } @Override public void setTarget(@Nullable LivingEntity target) { super.setTarget(target); if (target != null) { setPersistentAngerTarget(target.getUUID()); startPersistentAngerTimer(); } } public void crow() { if (!crowing) { crowing = true; crowTicks = 70; var lookControl = getLookControl(); lookControl.setLookAt(lookControl.getWantedX(), position().y + .2, lookControl.getWantedZ()); playSound(_Sounds.ROOSTER_CROW.get()); level().getEntitiesOfClass(Chicken.class, getBoundingBox().inflate(20)) .forEach(chicken -> chicken.setTarget(this)); } } public boolean isCrowing() { return crowing; } @Override public void tick() { super.tick(); if (!level().isClientSide) { if (level().getDayTime() == 0L || level().getDayTime() % 24000L == 13000L) crow(); } if (crowing && --crowTicks <= 0) { crowing = false; } if (diggingAnimTicks > 0) --diggingAnimTicks; if (featherDropCoolDown > 0) --featherDropCoolDown; tickTasks(); } public int getDiggingAnimTicks() { return diggingAnimTicks; } @Override public boolean isBoy() { return true; } }  
    • 동남아 홀덤 단톡방☜BCGAME88·COM▩ 세네갈 홀덤 방송 동남아 크라운카지노 홀덤 전략 [본사문의 텔레 JBOX7]동남아 홀덤 ◑ª 본사 남아프리카 홀덤 동영상 동남아 영국 동남아 홀덤 영상 [총판문의 카톡 JBOX7]동남아 홀덤 ㈜▼ 총판 코소보 홀덤 업체 동남아 포르투갈 동남아 홀덤 투어 [각종 오피 커뮤니티 제작]동남아 홀덤 †♡ 놀이터 모나코 홀덤 전략 동남아 마셜제도 동남아 홀덤 중계 [마케팅문의]동남아 홀덤 ↘△ 전략 샌즈카지노 홀덤 쿠푼 동남아 사모아 동남아 홀덤 게임 [카지노본사]동남아 홀덤 ↔㈜ 리그 카타르 홀덤 바카라펍 동남아 우루과이 동남아 홀덤 바카라펍 [스포츠본사]동남아 홀덤 ※& 캐쉬게임 차드 홀덤 업체 동남아 볼리비아 동남아 홀덤 놀이터 [토토본사 문의]동남아 홀덤 ▒♭ 업체 바하마 홀덤 영상 동남아 수리남 동남아 홀덤 검증 [토토총판 구매]동남아 홀덤 ♧↕ 쿠푼 시리아 홀덤 싸이트 동남아 MGM카지노 동남아 홀덤 방법 [카지노총판]동남아 홀덤 #↕ 중계 북아프리카 홀덤 여행 동남아 캄보디아 동남아 홀덤 중계 [야마토본사]동남아 홀덤 ★▽ 여행 마다가스카르 홀덤 쿠푼 동남아 독일 동남아 홀덤 방송 [바카라총판]동남아 홀덤 ◈№ 유투브 포르투갈 홀덤 본사 동남아 파라과이 동남아 홀덤 바카라펍 [경마총판]알제리 홀덤 쿠푼 동남아 홀덤 쿠푼 [BCGAME 비씨게임 총판문의]알림 설정 추천 구독 좋아요
    • 의성음식점 №BCGAME88·COM◈ 주성음식점 체부음식점 고척음식점 내자음식점 qbo45 홍지음식점 마천음식점 숭인음식점 여의도음식점 pfi88 의왕음식점 의정부음식점 화방음식점 고창음식점 ymd27 홍지음식점 군산음식점 남현음식점 사근음식점 pjh82 길동음식점 광양음식점 대전음식점 서계음식점 vxp19 가산음식점 원지음식점 도림음식점 영천음식점 cal37 순천음식점 정읍음식점 통인음식점 목포음식점 vmb22 수송음식점 하중음식점 아현음식점 이촌음식점 dox61 도선음식점 김포음식점 망우음식점 보령음식점 por02 홍천음식점 창성음식점 흥인음식점 청담음식점 lpl92 남학음식점 용강음식점 가리봉음식점 평동음식점 ajf18 용문음식점 외발산음식점 압구정음식점 주성음식점 doi37 포항음식점 신월음식점 회현음식점 용강음식점 duc88 풍납음식점 송파음식점 적선음식점 청운음식점 avc96 창녕음식점 인천음식점 영암음식점 내자음식점 ury62 역삼음식점 창성음식점 논현음식점 면목음식점 jqe31 압구정음식점 칠곡음식점 충무음식점 천안음식점 eba07 은평음식점 홍익음식점 불광음식점 견지음식점 wek24 안산음식점 입정음식점 목포음식점 신월음식점 yhm77 신설음식점 통영음식점 거여음식점 상봉음식점 bfl31 염곡음식점 상왕십리음식점 흥인음식점 장충음식점 mfp02 주교음식점 이화음식점 무학음식점 천호음식점 ydm02 갈월음식점 체부음식점 대흥음식점 강북음식점 hfg19
  • Topics

  • Create New...

Important Information

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