Replace passenger with custom nbt field, Add submenu for custom name formatting

This commit is contained in:
Marcel Konrad
2020-11-06 20:08:10 +01:00
parent 3daf607656
commit fd95baf5f7
12 changed files with 656 additions and 565 deletions

View File

@@ -8,6 +8,8 @@ import java.util.Set;
import javax.annotation.Nonnull; import javax.annotation.Nonnull;
import javax.annotation.Nullable; import javax.annotation.Nullable;
import com.mojang.brigadier.exceptions.CommandSyntaxException;
import exopandora.worldhandler.builder.component.IBuilderComponent; import exopandora.worldhandler.builder.component.IBuilderComponent;
import exopandora.worldhandler.util.MutableStringTextComponent; import exopandora.worldhandler.util.MutableStringTextComponent;
import exopandora.worldhandler.util.NBTHelper; import exopandora.worldhandler.util.NBTHelper;
@@ -21,6 +23,7 @@ import net.minecraft.nbt.ByteNBT;
import net.minecraft.nbt.CompoundNBT; import net.minecraft.nbt.CompoundNBT;
import net.minecraft.nbt.INBT; import net.minecraft.nbt.INBT;
import net.minecraft.nbt.IntNBT; import net.minecraft.nbt.IntNBT;
import net.minecraft.nbt.JsonToNBT;
import net.minecraft.nbt.StringNBT; import net.minecraft.nbt.StringNBT;
import net.minecraft.potion.Effect; import net.minecraft.potion.Effect;
import net.minecraft.util.ResourceLocation; import net.minecraft.util.ResourceLocation;
@@ -43,6 +46,7 @@ public class EntityNBT implements IBuilderComponent
private ResourceLocation[] armorItems = {Items.AIR.getRegistryName(), Items.AIR.getRegistryName(), Items.AIR.getRegistryName(), Items.AIR.getRegistryName()}; private ResourceLocation[] armorItems = {Items.AIR.getRegistryName(), Items.AIR.getRegistryName(), Items.AIR.getRegistryName(), Items.AIR.getRegistryName()};
private ResourceLocation[] handItems = {Items.AIR.getRegistryName(), Items.AIR.getRegistryName()}; private ResourceLocation[] handItems = {Items.AIR.getRegistryName(), Items.AIR.getRegistryName()};
private ComponentPotionMob potion = new ComponentPotionMob(); private ComponentPotionMob potion = new ComponentPotionMob();
private CompoundNBT nbt;
public EntityNBT() public EntityNBT()
{ {
@@ -381,6 +385,28 @@ public class EntityNBT implements IBuilderComponent
return this.command; return this.command;
} }
public void setNBT(CompoundNBT nbt)
{
this.nbt = nbt;
}
public CompoundNBT getNBT()
{
return this.nbt;
}
public void setNBT(String nbt)
{
try
{
this.nbt = JsonToNBT.getTagFromJson("{" + nbt + "}");
}
catch(CommandSyntaxException e)
{
this.nbt = null;
}
}
@Override @Override
public CompoundNBT serialize() public CompoundNBT serialize()
{ {
@@ -414,6 +440,11 @@ public class EntityNBT implements IBuilderComponent
NBTHelper.append(nbt, this.potion); NBTHelper.append(nbt, this.potion);
NBTHelper.append(nbt, this.attribute); NBTHelper.append(nbt, this.attribute);
if(this.nbt != null)
{
nbt.merge(this.nbt);
}
if(nbt.isEmpty()) if(nbt.isEmpty())
{ {
return null; return null;

View File

@@ -0,0 +1,509 @@
package exopandora.worldhandler.builder.impl;
import java.util.List;
import java.util.Random;
import java.util.Set;
import javax.annotation.Nullable;
import org.apache.commons.lang3.StringUtils;
import exopandora.worldhandler.builder.CommandBuilderNBT;
import exopandora.worldhandler.builder.component.impl.EntityNBT;
import exopandora.worldhandler.util.MutableStringTextComponent;
import exopandora.worldhandler.util.ResourceHelper;
import net.minecraft.block.Block;
import net.minecraft.block.BlockState;
import net.minecraft.client.resources.I18n;
import net.minecraft.entity.EntityType;
import net.minecraft.entity.ai.attributes.Attribute;
import net.minecraft.entity.merchant.villager.VillagerProfession;
import net.minecraft.item.Item;
import net.minecraft.item.Items;
import net.minecraft.nbt.ByteNBT;
import net.minecraft.nbt.CompoundNBT;
import net.minecraft.nbt.IntNBT;
import net.minecraft.nbt.ListNBT;
import net.minecraft.potion.Effect;
import net.minecraft.util.ResourceLocation;
import net.minecraftforge.api.distmarker.Dist;
import net.minecraftforge.api.distmarker.OnlyIn;
import net.minecraftforge.registries.ForgeRegistries;
@OnlyIn(Dist.CLIENT)
public abstract class BuilderEntity extends CommandBuilderNBT
{
private final EntityNBT nbt = new EntityNBT();
public abstract void setEntity(ResourceLocation entity);
public abstract ResourceLocation getEntity();
public void setName(String name)
{
this.setEntity(BuilderEntity.parseEntityName(name));
this.updateCustomComponent(name);
}
public void setNameAndId(String name)
{
this.setName(name);
this.nbt.setId(this.getEntity());
}
public void setId(ResourceLocation resource)
{
this.nbt.setId(resource);
}
public ResourceLocation getId()
{
return this.nbt.getId();
}
public void setAttribute(Attribute attribute, double ammount)
{
this.nbt.setAttribute(attribute, ammount);
}
public void removeAttribute(Attribute attribute)
{
this.nbt.removeAttribute(attribute);
}
public double getAttributeAmmount(Attribute attribute)
{
return this.nbt.getAttributeAmmount(attribute);
}
public Set<Attribute> getAttributes()
{
return this.nbt.getAttributes();
}
public void setCustomName(String name)
{
this.nbt.setCustomName(name);
}
@Nullable
public MutableStringTextComponent getCustomName()
{
return this.nbt.getCustomName();
}
public void setPassenger(int index, String name)
{
this.nbt.setPassenger(index, BuilderEntity.parseEntityName(name));
}
public void setPassenger(int index, EntityNBT entity)
{
this.nbt.setPassenger(index, entity);
}
public void setPassenger(int index, ResourceLocation id)
{
this.setPassenger(index, new EntityNBT(id));
}
public void addPassenger(EntityNBT entity)
{
this.nbt.addPassenger(entity);
}
public void addPassenger(int index, EntityNBT entity)
{
this.nbt.addPassenger(index, entity);
}
public void removePassenger(int index)
{
this.nbt.removePassenger(index);
}
public int getPassengerCount()
{
return this.nbt.getPassengerCount();
}
public List<EntityNBT> getPassengers()
{
return this.nbt.getPassengers();
}
@Nullable
public EntityNBT getPassenger(int index)
{
return this.nbt.getPassenger(index);
}
public boolean hasPassengers()
{
return this.nbt.hasPassengers();
}
public void setArmorItem(int index, Block block)
{
this.nbt.setArmorItem(index, block);
}
public void setArmorItem(int index, Item item)
{
this.nbt.setArmorItem(index, item);
}
public void setArmorItem(int index, ResourceLocation location)
{
this.nbt.setArmorItem(index, location);
}
public void setArmorItems(ResourceLocation[] armor)
{
this.nbt.setArmorItems(armor);
}
public ResourceLocation getArmorItem(int slot)
{
return this.nbt.getArmorItem(slot);
}
public void setHandItem(int index, Block block)
{
this.nbt.setHandItem(index, block);
}
public void setHandItem(int index, Item item)
{
this.nbt.setHandItem(index, item);
}
public void setHandItem(int index, ResourceLocation location)
{
this.nbt.setHandItem(index, location);
}
public ResourceLocation getHandItem(int slot)
{
return this.nbt.getHandItem(slot);
}
public double[] getMotion()
{
return this.nbt.getMotion();
}
public void setMotion(double x, double y, double z)
{
this.nbt.setMotion(x, y, z);
}
public double getMotionX()
{
return this.nbt.getMotionX();
}
public double getMotionY()
{
return this.nbt.getMotionY();
}
public double getMotionZ()
{
return this.nbt.getMotionZ();
}
public void setMotionX(double x)
{
this.nbt.setMotionX(x);
}
public void setMotionY(double y)
{
this.nbt.setMotionY(y);
}
public void setMotionZ(double z)
{
this.nbt.setMotionZ(z);
}
public void setAmplifier(Effect potion, byte amplifier)
{
this.nbt.setAmplifier(potion, amplifier);
}
public void setSeconds(Effect potion, int seconds)
{
this.nbt.setSeconds(potion, seconds);
}
public void setMinutes(Effect potion, int minutes)
{
this.nbt.setMinutes(potion, minutes);
}
public void setHours(Effect potion, int hours)
{
this.nbt.setHours(potion, hours);
}
public void setShowParticles(Effect potion, boolean showParticles)
{
this.nbt.setShowParticles(potion, showParticles);
}
public void setAmbient(Effect potion, boolean ambient)
{
this.nbt.setAmbient(potion, ambient);
}
public byte getAmplifier(Effect potion)
{
return this.nbt.getAmplifier(potion);
}
public int getSeconds(Effect potion)
{
return this.nbt.getSeconds(potion);
}
public int getMinutes(Effect potion)
{
return this.nbt.getMinutes(potion);
}
public int getHours(Effect potion)
{
return this.nbt.getHours(potion);
}
public boolean getShowParticles(Effect potion)
{
return this.nbt.getShowParticles(potion);
}
public boolean getAmbient(Effect potion)
{
return this.nbt.getAmbient(potion);
}
public Set<Effect> getEffects()
{
return this.nbt.getEffects();
}
public void setBlockState(BlockState blockState)
{
this.nbt.setBlockState(blockState);
}
public BlockState getBlockState()
{
return this.nbt.getBlockState();
}
public void setTime(int time)
{
this.nbt.setTime(time);
}
public int getTime()
{
return this.nbt.getTime();
}
public void setCommand(String command)
{
this.nbt.setCommand(command);
}
public String getCommand()
{
return this.nbt.getCommand();
}
public void setEntityNBT(String nbt)
{
this.nbt.setNBT(nbt);
}
public void setEntityNBT(CompoundNBT nbt)
{
this.nbt.setNBT(nbt);
}
public CompoundNBT getEntityNBT()
{
return this.nbt.getNBT();
}
@Override
protected CompoundNBT buildNBT()
{
return this.nbt.serialize();
}
private void updateCustomComponent(String name)
{
ResourceLocation entity = this.getEntity();
if(name != null && entity != null)
{
if(entity.equals(EntityType.CAT.getRegistryName()))
{
this.nbt.setCustomComponent("CatType", IntNBT.valueOf(new Random().nextInt(11)));
}
else if(entity.equals(EntityType.VILLAGER.getRegistryName()))
{
for(VillagerProfession profession : ForgeRegistries.PROFESSIONS)
{
if(StringUtils.equalsIgnoreCase(name, profession.toString()))
{
CompoundNBT villagerData = new CompoundNBT();
villagerData.putString("profession", profession.getRegistryName().toString());
this.nbt.setCustomComponent("VillagerData", villagerData);
break;
}
}
}
else if(entity.equals(EntityType.ZOMBIE.getRegistryName()))
{
if(StringUtils.containsIgnoreCase(name, "Baby"))
{
this.nbt.setCustomComponent("IsBaby", ByteNBT.valueOf((byte) 1));
}
}
else if(entity.equals(EntityType.CHICKEN.getRegistryName()))
{
if(StringUtils.containsIgnoreCase(name, "Jockey") && !this.nbt.hasPassengers())
{
ListNBT list = new ListNBT();
EntityNBT zombie = new EntityNBT(EntityType.ZOMBIE.getRegistryName());
zombie.setIsBaby(true);
list.add(zombie.serialize());
this.nbt.setCustomComponent("Passengers", list);
}
}
else if(entity.equals(EntityType.SPIDER.getRegistryName()))
{
if(StringUtils.containsIgnoreCase(name, "Jockey") && !this.nbt.hasPassengers())
{
ListNBT list = new ListNBT();
EntityNBT skeleton = new EntityNBT(EntityType.SKELETON.getRegistryName());
skeleton.setHandItem(0, Items.BOW);
list.add(skeleton.serialize());
this.nbt.setCustomComponent("Passengers", list);
}
}
else
{
this.nbt.resetCustomComponent();
}
}
else
{
this.nbt.resetCustomComponent();
}
}
@Nullable
public static ResourceLocation parseEntityName(String entityName)
{
String name = ResourceHelper.stripToResourceLocation(entityName);
if(name == null || name.isEmpty())
{
return null;
}
for(EntityType<?> type : ForgeRegistries.ENTITIES.getValues())
{
if(type.isSummonable() && entityName.equalsIgnoreCase(I18n.format(type.getTranslationKey())))
{
return type.getRegistryName();
}
}
String entity = name.replaceAll("_", "");
if("RedCow".equalsIgnoreCase(entity))
{
return EntityType.MOOSHROOM.getRegistryName();
}
else if("ChickenJockey".equalsIgnoreCase(entity))
{
return EntityType.CHICKEN.getRegistryName();
}
else if("Pigman".equalsIgnoreCase(entity) || "ZombiePig".equalsIgnoreCase(entity) || "ZombiePigman".equalsIgnoreCase(entity))
{
return EntityType.PIGLIN.getRegistryName();
}
else if("Dog".equalsIgnoreCase(entity))
{
return EntityType.WOLF.getRegistryName();
}
else if("Dragon".equalsIgnoreCase(entity))
{
return EntityType.ENDER_DRAGON.getRegistryName();
}
else if("SnowMan".equalsIgnoreCase(entity))
{
return EntityType.SNOW_GOLEM.getRegistryName();
}
else if("LavaCube".equalsIgnoreCase(entity)|| "MagmaSlime".equalsIgnoreCase(entity) || "LavaSlime".equalsIgnoreCase(entity))
{
return EntityType.MAGMA_CUBE.getRegistryName();
}
else if("SpiderJockey".equalsIgnoreCase(entity))
{
return EntityType.SPIDER.getRegistryName();
}
else if("VillagerGolem".equalsIgnoreCase(entity))
{
return EntityType.IRON_GOLEM.getRegistryName();
}
else if("Ozelot".equalsIgnoreCase(entity))
{
return EntityType.OCELOT.getRegistryName();
}
else if("Kitty".equalsIgnoreCase(entity) || "Kitten".equalsIgnoreCase(entity))
{
return EntityType.CAT.getRegistryName();
}
else if("TESTIFICATE".equalsIgnoreCase(entity) || ForgeRegistries.PROFESSIONS.getKeys().stream().anyMatch(profession -> profession.getPath().equalsIgnoreCase(entity)))
{
return EntityType.VILLAGER.getRegistryName();
}
else if("Octopus".equalsIgnoreCase(entity) || "Kraken".equalsIgnoreCase(entity))
{
return EntityType.SQUID.getRegistryName();
}
else if("Exwife".equalsIgnoreCase(entity))
{
return EntityType.GHAST.getRegistryName();
}
else if("CommandMinecart".equalsIgnoreCase(entity))
{
return EntityType.COMMAND_BLOCK_MINECART.getRegistryName();
}
else if("Wizard".equalsIgnoreCase(entity))
{
return EntityType.EVOKER.getRegistryName();
}
else if("Johnny".equalsIgnoreCase(entity))
{
return EntityType.VINDICATOR.getRegistryName();
}
else if("BabyZombie".equalsIgnoreCase(entity))
{
return EntityType.ZOMBIE.getRegistryName();
}
return ResourceHelper.stringToResourceLocation(name);
}
}

View File

@@ -1,44 +1,17 @@
package exopandora.worldhandler.builder.impl; package exopandora.worldhandler.builder.impl;
import java.util.List;
import java.util.Random;
import java.util.Set;
import javax.annotation.Nullable;
import org.apache.commons.lang3.StringUtils;
import exopandora.worldhandler.builder.CommandBuilderNBT;
import exopandora.worldhandler.builder.CommandSyntax; import exopandora.worldhandler.builder.CommandSyntax;
import exopandora.worldhandler.builder.component.impl.EntityNBT;
import exopandora.worldhandler.builder.types.ArgumentType; import exopandora.worldhandler.builder.types.ArgumentType;
import exopandora.worldhandler.builder.types.Coordinate.EnumType; import exopandora.worldhandler.builder.types.Coordinate.EnumType;
import exopandora.worldhandler.builder.types.CoordinateDouble; import exopandora.worldhandler.builder.types.CoordinateDouble;
import exopandora.worldhandler.util.MutableStringTextComponent;
import exopandora.worldhandler.util.ResourceHelper;
import net.minecraft.block.Block;
import net.minecraft.block.BlockState;
import net.minecraft.client.resources.I18n;
import net.minecraft.entity.EntityType;
import net.minecraft.entity.ai.attributes.Attribute;
import net.minecraft.entity.merchant.villager.VillagerProfession;
import net.minecraft.item.Item;
import net.minecraft.item.Items;
import net.minecraft.nbt.ByteNBT;
import net.minecraft.nbt.CompoundNBT; import net.minecraft.nbt.CompoundNBT;
import net.minecraft.nbt.IntNBT;
import net.minecraft.nbt.ListNBT;
import net.minecraft.potion.Effect;
import net.minecraft.util.ResourceLocation; import net.minecraft.util.ResourceLocation;
import net.minecraftforge.api.distmarker.Dist; import net.minecraftforge.api.distmarker.Dist;
import net.minecraftforge.api.distmarker.OnlyIn; import net.minecraftforge.api.distmarker.OnlyIn;
import net.minecraftforge.registries.ForgeRegistries;
@OnlyIn(Dist.CLIENT) @OnlyIn(Dist.CLIENT)
public class BuilderSummon extends CommandBuilderNBT public class BuilderSummon extends BuilderEntity
{ {
private final EntityNBT nbt = new EntityNBT();
public BuilderSummon() public BuilderSummon()
{ {
this.setX(new CoordinateDouble(0.0, EnumType.LOCAL)); this.setX(new CoordinateDouble(0.0, EnumType.LOCAL));
@@ -46,18 +19,6 @@ public class BuilderSummon extends CommandBuilderNBT
this.setZ(new CoordinateDouble(2.0, EnumType.LOCAL)); this.setZ(new CoordinateDouble(2.0, EnumType.LOCAL));
} }
public void setName(String name)
{
this.setEntity(BuilderSummon.parseEntityName(name));
this.updateCustomComponent(name);
}
public void setNameAndId(String name)
{
this.setName(name);
this.nbt.setId(this.getEntity());
}
public void setEntity(ResourceLocation entity) public void setEntity(ResourceLocation entity)
{ {
this.setNode(0, entity); this.setNode(0, entity);
@@ -98,284 +59,6 @@ public class BuilderSummon extends CommandBuilderNBT
return this.getNodeAsCoordinateDouble(3); return this.getNodeAsCoordinateDouble(3);
} }
public void setId(ResourceLocation resource)
{
this.nbt.setId(resource);
}
public ResourceLocation getId()
{
return this.nbt.getId();
}
public void setAttribute(Attribute attribute, double ammount)
{
this.nbt.setAttribute(attribute, ammount);
}
public void removeAttribute(Attribute attribute)
{
this.nbt.removeAttribute(attribute);
}
public double getAttributeAmmount(Attribute attribute)
{
return this.nbt.getAttributeAmmount(attribute);
}
public Set<Attribute> getAttributes()
{
return this.nbt.getAttributes();
}
public void setCustomName(String name)
{
this.nbt.setCustomName(name);
}
@Nullable
public MutableStringTextComponent getCustomName()
{
return this.nbt.getCustomName();
}
public void setPassenger(int index, String name)
{
this.nbt.setPassenger(index, BuilderSummon.parseEntityName(name));
}
public void setPassenger(int index, EntityNBT entity)
{
this.nbt.setPassenger(index, entity);
}
public void setPassenger(int index, ResourceLocation id)
{
this.setPassenger(index, new EntityNBT(id));
}
public void addPassenger(EntityNBT entity)
{
this.nbt.addPassenger(entity);
}
public void addPassenger(int index, EntityNBT entity)
{
this.nbt.addPassenger(index, entity);
}
public void removePassenger(int index)
{
this.nbt.removePassenger(index);
}
public int getPassengerCount()
{
return this.nbt.getPassengerCount();
}
public List<EntityNBT> getPassengers()
{
return this.nbt.getPassengers();
}
@Nullable
public EntityNBT getPassenger(int index)
{
return this.nbt.getPassenger(index);
}
public boolean hasPassengers()
{
return this.nbt.hasPassengers();
}
public void setArmorItem(int index, Block block)
{
this.nbt.setArmorItem(index, block);
}
public void setArmorItem(int index, Item item)
{
this.nbt.setArmorItem(index, item);
}
public void setArmorItem(int index, ResourceLocation location)
{
this.nbt.setArmorItem(index, location);
}
public void setArmorItems(ResourceLocation[] armor)
{
this.nbt.setArmorItems(armor);
}
public ResourceLocation getArmorItem(int slot)
{
return this.nbt.getArmorItem(slot);
}
public void setHandItem(int index, Block block)
{
this.nbt.setHandItem(index, block);
}
public void setHandItem(int index, Item item)
{
this.nbt.setHandItem(index, item);
}
public void setHandItem(int index, ResourceLocation location)
{
this.nbt.setHandItem(index, location);
}
public ResourceLocation getHandItem(int slot)
{
return this.nbt.getHandItem(slot);
}
public double[] getMotion()
{
return this.nbt.getMotion();
}
public void setMotion(double x, double y, double z)
{
this.nbt.setMotion(x, y, z);
}
public double getMotionX()
{
return this.nbt.getMotionX();
}
public double getMotionY()
{
return this.nbt.getMotionY();
}
public double getMotionZ()
{
return this.nbt.getMotionZ();
}
public void setMotionX(double x)
{
this.nbt.setMotionX(x);
}
public void setMotionY(double y)
{
this.nbt.setMotionY(y);
}
public void setMotionZ(double z)
{
this.nbt.setMotionZ(z);
}
public void setAmplifier(Effect potion, byte amplifier)
{
this.nbt.setAmplifier(potion, amplifier);
}
public void setSeconds(Effect potion, int seconds)
{
this.nbt.setSeconds(potion, seconds);
}
public void setMinutes(Effect potion, int minutes)
{
this.nbt.setMinutes(potion, minutes);
}
public void setHours(Effect potion, int hours)
{
this.nbt.setHours(potion, hours);
}
public void setShowParticles(Effect potion, boolean showParticles)
{
this.nbt.setShowParticles(potion, showParticles);
}
public void setAmbient(Effect potion, boolean ambient)
{
this.nbt.setAmbient(potion, ambient);
}
public byte getAmplifier(Effect potion)
{
return this.nbt.getAmplifier(potion);
}
public int getSeconds(Effect potion)
{
return this.nbt.getSeconds(potion);
}
public int getMinutes(Effect potion)
{
return this.nbt.getMinutes(potion);
}
public int getHours(Effect potion)
{
return this.nbt.getHours(potion);
}
public boolean getShowParticles(Effect potion)
{
return this.nbt.getShowParticles(potion);
}
public boolean getAmbient(Effect potion)
{
return this.nbt.getAmbient(potion);
}
public Set<Effect> getEffects()
{
return this.nbt.getEffects();
}
public void setBlockState(BlockState blockState)
{
this.nbt.setBlockState(blockState);
}
public BlockState getBlockState()
{
return this.nbt.getBlockState();
}
public void setTime(int time)
{
this.nbt.setTime(time);
}
public int getTime()
{
return this.nbt.getTime();
}
public void setCommand(String command)
{
this.nbt.setCommand(command);
}
public String getCommand()
{
return this.nbt.getCommand();
}
@Override
protected CompoundNBT buildNBT()
{
return this.nbt.serialize();
}
@Override @Override
public void setNBT(CompoundNBT nbt) public void setNBT(CompoundNBT nbt)
{ {
@@ -401,167 +84,4 @@ public class BuilderSummon extends CommandBuilderNBT
return syntax; return syntax;
} }
private void updateCustomComponent(String name)
{
ResourceLocation entity = this.getEntity();
if(name != null && entity != null)
{
if(entity.equals(EntityType.CAT.getRegistryName()))
{
this.nbt.setCustomComponent("CatType", IntNBT.valueOf(new Random().nextInt(11)));
}
else if(entity.equals(EntityType.VILLAGER.getRegistryName()))
{
for(VillagerProfession profession : ForgeRegistries.PROFESSIONS)
{
if(StringUtils.equalsIgnoreCase(name, profession.toString()))
{
CompoundNBT villagerData = new CompoundNBT();
villagerData.putString("profession", profession.getRegistryName().toString());
this.nbt.setCustomComponent("VillagerData", villagerData);
break;
}
}
}
else if(entity.equals(EntityType.ZOMBIE.getRegistryName()))
{
if(StringUtils.containsIgnoreCase(name, "Baby"))
{
this.nbt.setCustomComponent("IsBaby", ByteNBT.valueOf((byte) 1));
}
}
else if(entity.equals(EntityType.CHICKEN.getRegistryName()))
{
if(StringUtils.containsIgnoreCase(name, "Jockey") && !this.nbt.hasPassengers())
{
ListNBT list = new ListNBT();
EntityNBT zombie = new EntityNBT(EntityType.ZOMBIE.getRegistryName());
zombie.setIsBaby(true);
list.add(zombie.serialize());
this.nbt.setCustomComponent("Passengers", list);
}
}
else if(entity.equals(EntityType.SPIDER.getRegistryName()))
{
if(StringUtils.containsIgnoreCase(name, "Jockey") && !this.nbt.hasPassengers())
{
ListNBT list = new ListNBT();
EntityNBT skeleton = new EntityNBT(EntityType.SKELETON.getRegistryName());
skeleton.setHandItem(0, Items.BOW);
list.add(skeleton.serialize());
this.nbt.setCustomComponent("Passengers", list);
}
}
else
{
this.nbt.resetCustomComponent();
}
}
else
{
this.nbt.resetCustomComponent();
}
}
@Nullable
public static ResourceLocation parseEntityName(String entityName)
{
String name = ResourceHelper.stripToResourceLocation(entityName);
if(name == null || name.isEmpty())
{
return null;
}
for(EntityType<?> type : ForgeRegistries.ENTITIES.getValues())
{
if(type.isSummonable() && entityName.equalsIgnoreCase(I18n.format(type.getTranslationKey())))
{
return type.getRegistryName();
}
}
String entity = name.replaceAll("_", "");
if("RedCow".equalsIgnoreCase(entity))
{
return EntityType.MOOSHROOM.getRegistryName();
}
else if("ChickenJockey".equalsIgnoreCase(entity))
{
return EntityType.CHICKEN.getRegistryName();
}
else if("Pigman".equalsIgnoreCase(entity) || "ZombiePig".equalsIgnoreCase(entity) || "ZombiePigman".equalsIgnoreCase(entity))
{
return EntityType.PIGLIN.getRegistryName();
}
else if("Dog".equalsIgnoreCase(entity))
{
return EntityType.WOLF.getRegistryName();
}
else if("Dragon".equalsIgnoreCase(entity))
{
return EntityType.ENDER_DRAGON.getRegistryName();
}
else if("SnowMan".equalsIgnoreCase(entity))
{
return EntityType.SNOW_GOLEM.getRegistryName();
}
else if("LavaCube".equalsIgnoreCase(entity)|| "MagmaSlime".equalsIgnoreCase(entity) || "LavaSlime".equalsIgnoreCase(entity))
{
return EntityType.MAGMA_CUBE.getRegistryName();
}
else if("SpiderJockey".equalsIgnoreCase(entity))
{
return EntityType.SPIDER.getRegistryName();
}
else if("VillagerGolem".equalsIgnoreCase(entity))
{
return EntityType.IRON_GOLEM.getRegistryName();
}
else if("Ozelot".equalsIgnoreCase(entity))
{
return EntityType.OCELOT.getRegistryName();
}
else if("Kitty".equalsIgnoreCase(entity) || "Kitten".equalsIgnoreCase(entity))
{
return EntityType.CAT.getRegistryName();
}
else if("TESTIFICATE".equalsIgnoreCase(entity) || ForgeRegistries.PROFESSIONS.getKeys().stream().anyMatch(profession -> profession.getPath().equalsIgnoreCase(entity)))
{
return EntityType.VILLAGER.getRegistryName();
}
else if("Octopus".equalsIgnoreCase(entity) || "Kraken".equalsIgnoreCase(entity))
{
return EntityType.SQUID.getRegistryName();
}
else if("Exwife".equalsIgnoreCase(entity))
{
return EntityType.GHAST.getRegistryName();
}
else if("CommandMinecart".equalsIgnoreCase(entity))
{
return EntityType.COMMAND_BLOCK_MINECART.getRegistryName();
}
else if("Wizard".equalsIgnoreCase(entity))
{
return EntityType.EVOKER.getRegistryName();
}
else if("Johnny".equalsIgnoreCase(entity))
{
return EntityType.VINDICATOR.getRegistryName();
}
else if("BabyZombie".equalsIgnoreCase(entity))
{
return EntityType.ZOMBIE.getRegistryName();
}
return ResourceHelper.stringToResourceLocation(name);
}
} }

View File

@@ -132,7 +132,7 @@ public class ContentSignEditor extends Content
if(this.editColor) if(this.editColor)
{ {
container.add(new GuiButtonBase(x + 118, y + 72, 114, 20, new TranslationTextComponent("gui.worldhandler.blocks.sign_editor.done"), () -> this.toggleEditColor(container))); container.add(new GuiButtonBase(x + 118, y + 72, 114, 20, new TranslationTextComponent("gui.worldhandler.generic.done"), () -> this.toggleEditColor(container)));
} }
else else
{ {

View File

@@ -17,7 +17,9 @@ import exopandora.worldhandler.gui.category.Category;
import exopandora.worldhandler.gui.container.Container; import exopandora.worldhandler.gui.container.Container;
import exopandora.worldhandler.gui.content.Content; import exopandora.worldhandler.gui.content.Content;
import exopandora.worldhandler.gui.content.Contents; import exopandora.worldhandler.gui.content.Contents;
import exopandora.worldhandler.gui.menu.impl.ILogicColorMenu;
import exopandora.worldhandler.gui.menu.impl.ILogicPageList; import exopandora.worldhandler.gui.menu.impl.ILogicPageList;
import exopandora.worldhandler.gui.menu.impl.MenuColorField;
import exopandora.worldhandler.gui.menu.impl.MenuPageList; import exopandora.worldhandler.gui.menu.impl.MenuPageList;
import exopandora.worldhandler.gui.widget.button.EnumIcon; import exopandora.worldhandler.gui.widget.button.EnumIcon;
import exopandora.worldhandler.gui.widget.button.GuiButtonBase; import exopandora.worldhandler.gui.widget.button.GuiButtonBase;
@@ -51,16 +53,14 @@ import net.minecraftforge.registries.ForgeRegistries;
public class ContentSummon extends Content public class ContentSummon extends Content
{ {
private GuiTextFieldTooltip mobField; private GuiTextFieldTooltip mobField;
private GuiTextFieldTooltip customNameField; private GuiTextFieldTooltip nbtField;
private GuiTextFieldTooltip passengerField;
private int potionPage = 0; private int potionPage = 0;
private boolean editColor;
private Page page = Page.START; private Page page = Page.START;
private String mob; private String mob;
private String name; private String nbt;
private String passenger;
private final BuilderSummon builderSummon = new BuilderSummon(); private final BuilderSummon builderSummon = new BuilderSummon();
@@ -157,7 +157,7 @@ public class ContentSummon extends Content
@Override @Override
public void initGui(Container container, int x, int y) public void initGui(Container container, int x, int y)
{ {
this.mobField = new GuiTextFieldTooltip(x + 118, y, 114, 20, new StringTextComponent(I18n.format("gui.worldhandler.entities.summon.start.mob_id") + " (" + I18n.format("gui.worldhandler.generic.name") + ")")); this.mobField = new GuiTextFieldTooltip(x + 118, y, 114, 20, new TranslationTextComponent("gui.worldhandler.entities.summon.start.mob_id"));
this.mobField.setValidator(Predicates.notNull()); this.mobField.setValidator(Predicates.notNull());
this.mobField.setText(this.mob); this.mobField.setText(this.mob);
this.mobField.setResponder(text -> this.mobField.setResponder(text ->
@@ -167,27 +167,42 @@ public class ContentSummon extends Content
container.initButtons(); container.initButtons();
}); });
this.customNameField = new GuiTextFieldTooltip(x + 118, y + 24, 114, 20, new TranslationTextComponent("gui.worldhandler.entities.summon.start.custom_name")); this.nbtField = new GuiTextFieldTooltip(x + 118, y + 48, 114, 20, new TranslationTextComponent("gui.worldhandler.entities.summon.start.custom_nbt"));
this.customNameField.setValidator(Predicates.notNull()); this.nbtField.setValidator(Predicates.notNull());
this.customNameField.setText(this.name); this.nbtField.setText(this.nbt);
this.customNameField.setResponder(text -> this.nbtField.setResponder(text ->
{ {
this.name = text; this.nbt = text;
this.builderSummon.setCustomName(this.name); this.builderSummon.setEntityNBT(this.nbt);
container.initButtons(); container.initButtons();
}); });
this.passengerField = new GuiTextFieldTooltip(x + 118, y + 48, 114, 20, new TranslationTextComponent("gui.worldhandler.entities.summon.start.passenger_mob_id")); if(Page.START.equals(this.page))
this.passengerField.setValidator(Predicates.notNull());
this.passengerField.setText(this.passenger);
this.passengerField.setResponder(text ->
{ {
this.passenger = this.passengerField.getText(); MenuColorField customName = new MenuColorField(x, y, "gui.worldhandler.entities.summon.start.custom_name", this.builderSummon.getCustomName(), new ILogicColorMenu()
this.builderSummon.setPassenger(0, this.passenger); {
container.initButtons(); @Override
public boolean doDrawButtons()
{
return ContentSummon.this.editColor;
}
@Override
public boolean doDrawTextField()
{
return ContentSummon.this.editColor;
}
@Override
public String getId()
{
return "custom_name";
}
}); });
if(Page.ATTRIBUTES.equals(this.page)) container.add(customName);
}
else if(Page.ATTRIBUTES.equals(this.page))
{ {
MenuPageList<Attribute> attributes = new MenuPageList<Attribute>(x + 118, y, ComponentAttribute.ATTRIBUTES, 114, 20, 3, container, new ILogicPageList<Attribute>() MenuPageList<Attribute> attributes = new MenuPageList<Attribute>(x + 118, y, ComponentAttribute.ATTRIBUTES, 114, 20, 3, container, new ILogicPageList<Attribute>()
{ {
@@ -246,49 +261,40 @@ public class ContentSummon extends Content
GuiButtonBase button6; GuiButtonBase button6;
GuiButtonBase button7; GuiButtonBase button7;
container.add(new GuiButtonBase(x, y + 96, 114, 20, new TranslationTextComponent("gui.worldhandler.generic.back"), () -> ActionHelper.back(this))); container.add(new GuiButtonBase(x, y + 96, 114, 20, "gui.worldhandler.generic.back", () -> ActionHelper.back(this)));
container.add(new GuiButtonBase(x + 118, y + 96, 114, 20, new TranslationTextComponent("gui.worldhandler.generic.backToGame"), ActionHelper::backToGame)); container.add(new GuiButtonBase(x + 118, y + 96, 114, 20, "gui.worldhandler.generic.backToGame", ActionHelper::backToGame));
container.add(button4 = new GuiButtonBase(x, y, 114, 20, new TranslationTextComponent("gui.worldhandler.entities.summon.start"), () -> container.add(button4 = new GuiButtonBase(x, y, 114, 20, "gui.worldhandler.entities.summon.start", () -> this.changePage(container, Page.START)));
{ container.add(button5 = new GuiButtonBase(x, y + 24, 114, 20, "gui.worldhandler.entities.summon.potion_effects", () -> this.changePage(container, Page.POTIONS)));
this.page = Page.START; container.add(button6 = new GuiButtonBase(x, y + 48, 114, 20, "gui.worldhandler.entities.summon.attributes", () -> this.changePage(container, Page.ATTRIBUTES)));
container.init(); container.add(button7 = new GuiButtonBase(x, y + 72, 114, 20, "gui.worldhandler.entities.summon.equipment", () -> this.changePage(container, Page.EQUIPMENT)));
}));
container.add(button5 = new GuiButtonBase(x, y + 24, 114, 20, new TranslationTextComponent("gui.worldhandler.entities.summon.potion_effects"), () ->
{
this.page = Page.POTIONS;
container.init();
}));
container.add(button6 = new GuiButtonBase(x, y + 48, 114, 20, new TranslationTextComponent("gui.worldhandler.entities.summon.attributes"), () ->
{
this.page = Page.ATTRIBUTES;
container.init();
}));
container.add(button7 = new GuiButtonBase(x, y + 72, 114, 20, new TranslationTextComponent("gui.worldhandler.entities.summon.equipment"), () ->
{
this.page = Page.EQUIPMENT;
container.init();
}));
if(Page.START.equals(this.page)) if(Page.START.equals(this.page))
{ {
button4.active = false; button4.active = false;
container.add(this.mobField); if(this.editColor)
container.add(this.customNameField);
container.add(this.passengerField);
if(!this.builderSummon.needsCommandBlock() && !this.builderSummon.getCustomName().isSpecial())
{ {
container.add(button3 = new GuiButtonBase(x + 118, y + 72, 114, 20, new TranslationTextComponent("gui.worldhandler.title.entities.summon"), () -> this.send(container.getPlayer()))); container.add(new GuiButtonBase(x + 118, y + 72, 114, 20, "gui.worldhandler.generic.done", () -> this.toggleEditColor(container)));
} }
else else
{ {
container.add(button3 = new GuiButtonBase(x + 118, y + 72, 114, 20, new TranslationTextComponent("gui.worldhandler.actions.place_command_block"), () -> this.send(container.getPlayer()))); container.add(this.mobField);
container.add(new GuiButtonBase(x + 118, y + 24, 114, 20, "gui.worldhandler.entities.summon.start.custom_name", () -> this.toggleEditColor(container)));
container.add(this.nbtField);
if(!this.builderSummon.needsCommandBlock() && !this.builderSummon.getCustomName().isSpecial())
{
container.add(button3 = new GuiButtonBase(x + 118, y + 72, 114, 20, "gui.worldhandler.title.entities.summon", () -> this.send(container.getPlayer())));
}
else
{
container.add(button3 = new GuiButtonBase(x + 118, y + 72, 114, 20, "gui.worldhandler.actions.place_command_block", () -> this.send(container.getPlayer())));
} }
button3.active = ForgeRegistries.ENTITIES.containsKey(this.builderSummon.getEntity()); button3.active = ForgeRegistries.ENTITIES.containsKey(this.builderSummon.getEntity());
} }
}
else if(Page.POTIONS.equals(this.page)) else if(Page.POTIONS.equals(this.page))
{ {
button5.active = false; button5.active = false;
@@ -306,7 +312,7 @@ public class ContentSummon extends Content
int count = 0; int count = 0;
for(ResourceLocation location : this.getSortedPotionList()) for(ResourceLocation location : this.sortedPotions())
{ {
Effect potion = ForgeRegistries.POTIONS.getValue(location); Effect potion = ForgeRegistries.POTIONS.getValue(location);
@@ -401,10 +407,12 @@ public class ContentSummon extends Content
public void tick(Container container) public void tick(Container container)
{ {
if(Page.START.equals(this.page)) if(Page.START.equals(this.page))
{
if(!this.editColor)
{ {
this.mobField.tick(); this.mobField.tick();
this.customNameField.tick(); this.nbtField.tick();
this.passengerField.tick(); }
} }
} }
@@ -412,10 +420,12 @@ public class ContentSummon extends Content
public void drawScreen(MatrixStack matrix, Container container, int x, int y, int mouseX, int mouseY, float partialTicks) public void drawScreen(MatrixStack matrix, Container container, int x, int y, int mouseX, int mouseY, float partialTicks)
{ {
if(Page.START.equals(this.page)) if(Page.START.equals(this.page))
{
if(!this.editColor)
{ {
this.mobField.renderButton(matrix, mouseX, mouseY, partialTicks); this.mobField.renderButton(matrix, mouseX, mouseY, partialTicks);
this.customNameField.renderButton(matrix, mouseX, mouseY, partialTicks); this.nbtField.renderButton(matrix, mouseX, mouseY, partialTicks);
this.passengerField.renderButton(matrix, mouseX, mouseY, partialTicks); }
} }
else if(Page.POTIONS.equals(this.page)) else if(Page.POTIONS.equals(this.page))
{ {
@@ -445,13 +455,25 @@ public class ContentSummon extends Content
} }
} }
private List<ResourceLocation> getSortedPotionList() private List<ResourceLocation> sortedPotions()
{ {
return ForgeRegistries.POTIONS.getKeys().stream() return ForgeRegistries.POTIONS.getKeys().stream()
.sorted((a, b) -> I18n.format(ForgeRegistries.POTIONS.getValue(a).getName()).compareTo(I18n.format(ForgeRegistries.POTIONS.getValue(b).getName()))) .sorted((a, b) -> I18n.format(ForgeRegistries.POTIONS.getValue(a).getName()).compareTo(I18n.format(ForgeRegistries.POTIONS.getValue(b).getName())))
.collect(Collectors.toList()); .collect(Collectors.toList());
} }
private void toggleEditColor(Container container)
{
this.editColor = !this.editColor;
container.init();
}
private void changePage(Container container, Page page)
{
this.page = page;
container.init();
}
@Override @Override
public Category getCategory() public Category getCategory()
{ {

View File

@@ -17,6 +17,11 @@ public interface ILogicColorMenu extends ILogic
return true; return true;
} }
default boolean doDrawTextField()
{
return true;
}
@Override @Override
default String getId() default String getId()
{ {

View File

@@ -78,8 +78,11 @@ public class MenuColorField extends Menu
@Override @Override
public void initButtons(Container container) public void initButtons(Container container)
{
if(this.logic.doDrawTextField())
{ {
container.add(this.textField); container.add(this.textField);
}
if(this.logic.doDrawButtons()) if(this.logic.doDrawButtons())
{ {
@@ -146,13 +149,19 @@ public class MenuColorField extends Menu
@Override @Override
public void tick() public void tick()
{
if(this.logic.doDrawTextField())
{ {
this.textField.tick(); this.textField.tick();
} }
}
@Override @Override
public void draw(MatrixStack matrix, int mouseX, int mouseY, float partialTicks) public void draw(MatrixStack matrix, int mouseX, int mouseY, float partialTicks)
{
if(this.logic.doDrawTextField())
{ {
this.textField.renderButton(matrix, mouseX, mouseY, partialTicks); this.textField.renderButton(matrix, mouseX, mouseY, partialTicks);
} }
} }
}

View File

@@ -198,7 +198,6 @@
"gui.worldhandler.blocks.sign_editor.text_line_3": "Textzeile III", "gui.worldhandler.blocks.sign_editor.text_line_3": "Textzeile III",
"gui.worldhandler.blocks.sign_editor.text_line_4": "Textzeile IV", "gui.worldhandler.blocks.sign_editor.text_line_4": "Textzeile IV",
"gui.worldhandler.blocks.sign_editor.commmand": "Befehl", "gui.worldhandler.blocks.sign_editor.commmand": "Befehl",
"gui.worldhandler.blocks.sign_editor.done": "Fertig",
"gui.worldhandler.blocks.sign_editor.format_text_line": "Textzeile formatieren", "gui.worldhandler.blocks.sign_editor.format_text_line": "Textzeile formatieren",
"gui.worldhandler.blocks.note_block_editor.look_at_note_block": "Gucke auf einen Notenblock und drücke '%s'", "gui.worldhandler.blocks.note_block_editor.look_at_note_block": "Gucke auf einen Notenblock und drücke '%s'",
@@ -323,9 +322,9 @@
"gui.worldhandler.entities.summon.attributes": "Attribute", "gui.worldhandler.entities.summon.attributes": "Attribute",
"gui.worldhandler.entities.summon.equipment": "Ausrüstung", "gui.worldhandler.entities.summon.equipment": "Ausrüstung",
"gui.worldhandler.entities.summon.start.mob_id": "Tier ID", "gui.worldhandler.entities.summon.start.mob_id": "Name oder ID des Wesens",
"gui.worldhandler.entities.summon.start.custom_name": "Eigener Name", "gui.worldhandler.entities.summon.start.custom_name": "Name des Wesens",
"gui.worldhandler.entities.summon.start.passenger_mob_id": "Passagier Tier ID", "gui.worldhandler.entities.summon.start.custom_nbt": "NBT des Wesens",
"gui.worldhandler.potion.time.hours": "Stunden", "gui.worldhandler.potion.time.hours": "Stunden",
"gui.worldhandler.potion.time.minutes": "Minuten", "gui.worldhandler.potion.time.minutes": "Minuten",
@@ -366,10 +365,10 @@
"gui.worldhandler.generic.yes": "Ja", "gui.worldhandler.generic.yes": "Ja",
"gui.worldhandler.generic.no": "Nein", "gui.worldhandler.generic.no": "Nein",
"gui.worldhandler.generic.value": "Wert", "gui.worldhandler.generic.value": "Wert",
"gui.worldhandler.generic.name": "Name",
"gui.worldhandler.generic.enable": "Ein", "gui.worldhandler.generic.enable": "Ein",
"gui.worldhandler.generic.disable": "Aus", "gui.worldhandler.generic.disable": "Aus",
"gui.worldhandler.generic.edit_username": "Benutzername", "gui.worldhandler.generic.edit_username": "Benutzername",
"gui.worldhandler.generic.done": "Fertig",
"gui.worldhandler.actions.add": "Hinzufügen", "gui.worldhandler.actions.add": "Hinzufügen",
"gui.worldhandler.actions.remove": "Entfernen", "gui.worldhandler.actions.remove": "Entfernen",

View File

@@ -198,7 +198,6 @@
"gui.worldhandler.blocks.sign_editor.text_line_3": "Text Line III", "gui.worldhandler.blocks.sign_editor.text_line_3": "Text Line III",
"gui.worldhandler.blocks.sign_editor.text_line_4": "Text Line IV", "gui.worldhandler.blocks.sign_editor.text_line_4": "Text Line IV",
"gui.worldhandler.blocks.sign_editor.commmand": "Command", "gui.worldhandler.blocks.sign_editor.commmand": "Command",
"gui.worldhandler.blocks.sign_editor.done": "Done",
"gui.worldhandler.blocks.sign_editor.format_text_line": "Format Text Line", "gui.worldhandler.blocks.sign_editor.format_text_line": "Format Text Line",
"gui.worldhandler.blocks.note_block_editor.look_at_note_block": "Look at a Note Block and press '%s'", "gui.worldhandler.blocks.note_block_editor.look_at_note_block": "Look at a Note Block and press '%s'",
@@ -323,9 +322,9 @@
"gui.worldhandler.entities.summon.attributes": "Attributes", "gui.worldhandler.entities.summon.attributes": "Attributes",
"gui.worldhandler.entities.summon.equipment": "Equipment", "gui.worldhandler.entities.summon.equipment": "Equipment",
"gui.worldhandler.entities.summon.start.mob_id": "Mob ID", "gui.worldhandler.entities.summon.start.mob_id": "Mob ID or Name",
"gui.worldhandler.entities.summon.start.custom_name": "Custom Name", "gui.worldhandler.entities.summon.start.custom_name": "Custom Name",
"gui.worldhandler.entities.summon.start.passenger_mob_id": "Passenger Mob ID", "gui.worldhandler.entities.summon.start.custom_nbt": "Custom NBT",
"gui.worldhandler.potion.time.hours": "Hours", "gui.worldhandler.potion.time.hours": "Hours",
"gui.worldhandler.potion.time.minutes": "Minutes", "gui.worldhandler.potion.time.minutes": "Minutes",
@@ -366,10 +365,10 @@
"gui.worldhandler.generic.yes": "Yes", "gui.worldhandler.generic.yes": "Yes",
"gui.worldhandler.generic.no": "No", "gui.worldhandler.generic.no": "No",
"gui.worldhandler.generic.value": "Value", "gui.worldhandler.generic.value": "Value",
"gui.worldhandler.generic.name": "Name",
"gui.worldhandler.generic.enable": "Enable", "gui.worldhandler.generic.enable": "Enable",
"gui.worldhandler.generic.disable": "Disable", "gui.worldhandler.generic.disable": "Disable",
"gui.worldhandler.generic.edit_username": "Edit Username", "gui.worldhandler.generic.edit_username": "Edit Username",
"gui.worldhandler.generic.done": "Done",
"gui.worldhandler.actions.add": "Add", "gui.worldhandler.actions.add": "Add",
"gui.worldhandler.actions.remove": "Remove", "gui.worldhandler.actions.remove": "Remove",

View File

@@ -198,7 +198,6 @@
"gui.worldhandler.blocks.sign_editor.text_line_3": "Ligne de texte III", "gui.worldhandler.blocks.sign_editor.text_line_3": "Ligne de texte III",
"gui.worldhandler.blocks.sign_editor.text_line_4": "Ligne de texte IV", "gui.worldhandler.blocks.sign_editor.text_line_4": "Ligne de texte IV",
"gui.worldhandler.blocks.sign_editor.commmand": "Commande", "gui.worldhandler.blocks.sign_editor.commmand": "Commande",
"gui.worldhandler.blocks.sign_editor.done": "Terminé",
"gui.worldhandler.blocks.sign_editor.format_text_line": "Format ligne de texte", "gui.worldhandler.blocks.sign_editor.format_text_line": "Format ligne de texte",
"gui.worldhandler.blocks.note_block_editor.look_at_note_block": "Regardez un bloc musical et appuyez sur '%s'", "gui.worldhandler.blocks.note_block_editor.look_at_note_block": "Regardez un bloc musical et appuyez sur '%s'",
@@ -326,7 +325,7 @@
"gui.worldhandler.entities.summon.start.mob_id": "ID de créature", "gui.worldhandler.entities.summon.start.mob_id": "ID de créature",
"gui.worldhandler.entities.summon.start.custom_name": "Nom personnalisé", "gui.worldhandler.entities.summon.start.custom_name": "Nom personnalisé",
"gui.worldhandler.entities.summon.start.passenger_mob_id": "ID créature passager", "gui.worldhandler.entities.summon.start.custom_nbt": "Custom NBT",
"gui.worldhandler.potion.time.hours": "Heures ", "gui.worldhandler.potion.time.hours": "Heures ",
"gui.worldhandler.potion.time.minutes": "Minutes ", "gui.worldhandler.potion.time.minutes": "Minutes ",
@@ -367,10 +366,10 @@
"gui.worldhandler.generic.yes": "Oui", "gui.worldhandler.generic.yes": "Oui",
"gui.worldhandler.generic.no": "Non", "gui.worldhandler.generic.no": "Non",
"gui.worldhandler.generic.value": "Valeur", "gui.worldhandler.generic.value": "Valeur",
"gui.worldhandler.generic.name": "Nom",
"gui.worldhandler.generic.enable": "Activer", "gui.worldhandler.generic.enable": "Activer",
"gui.worldhandler.generic.disable": "Désactiver", "gui.worldhandler.generic.disable": "Désactiver",
"gui.worldhandler.generic.edit_username": "Modifier le nom d'utilisateur", "gui.worldhandler.generic.edit_username": "Modifier le nom d'utilisateur",
"gui.worldhandler.generic.done": "Terminé",
"gui.worldhandler.actions.add": "Ajouter", "gui.worldhandler.actions.add": "Ajouter",
"gui.worldhandler.actions.remove": "Supprimer", "gui.worldhandler.actions.remove": "Supprimer",

View File

@@ -198,7 +198,6 @@
"gui.worldhandler.blocks.sign_editor.text_line_3": "Текстовая строка III", "gui.worldhandler.blocks.sign_editor.text_line_3": "Текстовая строка III",
"gui.worldhandler.blocks.sign_editor.text_line_4": "Текстовая строка IV", "gui.worldhandler.blocks.sign_editor.text_line_4": "Текстовая строка IV",
"gui.worldhandler.blocks.sign_editor.commmand": "Команда", "gui.worldhandler.blocks.sign_editor.commmand": "Команда",
"gui.worldhandler.blocks.sign_editor.done": "Готово",
"gui.worldhandler.blocks.sign_editor.format_text_line": "Формат текстовой строки", "gui.worldhandler.blocks.sign_editor.format_text_line": "Формат текстовой строки",
"gui.worldhandler.blocks.note_block_editor.look_at_note_block": "Посмотрите на заметки блоков и нажмите '%s'", "gui.worldhandler.blocks.note_block_editor.look_at_note_block": "Посмотрите на заметки блоков и нажмите '%s'",
@@ -325,7 +324,7 @@
"gui.worldhandler.entities.summon.start.mob_id": "ID моба", "gui.worldhandler.entities.summon.start.mob_id": "ID моба",
"gui.worldhandler.entities.summon.start.custom_name": "Пользовательское имя", "gui.worldhandler.entities.summon.start.custom_name": "Пользовательское имя",
"gui.worldhandler.entities.summon.start.passenger_mob_id": "ID пассажирского моба", "gui.worldhandler.entities.summon.start.custom_nbt": "Custom NBT",
"gui.worldhandler.potion.time.hours": "Часов", "gui.worldhandler.potion.time.hours": "Часов",
"gui.worldhandler.potion.time.minutes": "Минут", "gui.worldhandler.potion.time.minutes": "Минут",
@@ -366,10 +365,10 @@
"gui.worldhandler.generic.yes": "Да", "gui.worldhandler.generic.yes": "Да",
"gui.worldhandler.generic.no": "Нет", "gui.worldhandler.generic.no": "Нет",
"gui.worldhandler.generic.value": "Значение", "gui.worldhandler.generic.value": "Значение",
"gui.worldhandler.generic.name": "Имя",
"gui.worldhandler.generic.enable": "Включить", "gui.worldhandler.generic.enable": "Включить",
"gui.worldhandler.generic.disable": "Выключить", "gui.worldhandler.generic.disable": "Выключить",
"gui.worldhandler.generic.edit_username": "Изменить имя пользователя", "gui.worldhandler.generic.edit_username": "Изменить имя пользователя",
"gui.worldhandler.generic.done": "Готово",
"gui.worldhandler.actions.add": "Добавить", "gui.worldhandler.actions.add": "Добавить",
"gui.worldhandler.actions.remove": "Удалить", "gui.worldhandler.actions.remove": "Удалить",

View File

@@ -199,7 +199,6 @@
"gui.worldhandler.blocks.sign_editor.text_line_3": "文字行 III", "gui.worldhandler.blocks.sign_editor.text_line_3": "文字行 III",
"gui.worldhandler.blocks.sign_editor.text_line_4": "文字行 IV", "gui.worldhandler.blocks.sign_editor.text_line_4": "文字行 IV",
"gui.worldhandler.blocks.sign_editor.commmand": "命令", "gui.worldhandler.blocks.sign_editor.commmand": "命令",
"gui.worldhandler.blocks.sign_editor.done": "完成",
"gui.worldhandler.blocks.sign_editor.format_text_line": "文本行格式", "gui.worldhandler.blocks.sign_editor.format_text_line": "文本行格式",
"gui.worldhandler.blocks.note_block_editor.look_at_note_block": "看着一个音符盒并按 '%s'", "gui.worldhandler.blocks.note_block_editor.look_at_note_block": "看着一个音符盒并按 '%s'",
@@ -326,7 +325,7 @@
"gui.worldhandler.entities.summon.start.mob_id": "生物 ID", "gui.worldhandler.entities.summon.start.mob_id": "生物 ID",
"gui.worldhandler.entities.summon.start.custom_name": "自定义名称", "gui.worldhandler.entities.summon.start.custom_name": "自定义名称",
"gui.worldhandler.entities.summon.start.passenger_mob_id": "骑乘生物 ID", "gui.worldhandler.entities.summon.start.custom_nbt": "Custom NBT",
"gui.worldhandler.potion.time.hours": "小时", "gui.worldhandler.potion.time.hours": "小时",
"gui.worldhandler.potion.time.minutes": "分钟", "gui.worldhandler.potion.time.minutes": "分钟",
@@ -367,10 +366,10 @@
"gui.worldhandler.generic.yes": "是", "gui.worldhandler.generic.yes": "是",
"gui.worldhandler.generic.no": "否", "gui.worldhandler.generic.no": "否",
"gui.worldhandler.generic.value": "值", "gui.worldhandler.generic.value": "值",
"gui.worldhandler.generic.name": "名称",
"gui.worldhandler.generic.enable": "开启", "gui.worldhandler.generic.enable": "开启",
"gui.worldhandler.generic.disable": "关闭", "gui.worldhandler.generic.disable": "关闭",
"gui.worldhandler.generic.edit_username": "编辑用户名", "gui.worldhandler.generic.edit_username": "编辑用户名",
"gui.worldhandler.generic.done": "完成",
"gui.worldhandler.actions.add": "添加", "gui.worldhandler.actions.add": "添加",
"gui.worldhandler.actions.remove": "删除", "gui.worldhandler.actions.remove": "删除",