Complete removal of /info entity, it's correspondent carpet and two small changes (#1047)
* Remove no longer needed language packet mixin * Make StringArgument properly return a StringArgument supplier, so `string` isn't `term` Fixes gnembon/fabric-carpet#1044 * Complete removal of `/info entity` and it's correspondent carpet Resolves gnembon/fabric-carpet#1033 * Remove yet another no longer needed mixin
This commit is contained in:
1 parent
4d9c5eb391
commit
d8c10c6e4a
9 files changed
+10
-231
No files matched your search
@@ -1,101 +0,0 @@
|
||||
package carpet.utils;
|
||||
|
||||
import net.minecraft.enchantment.Enchantment;
|
||||
import net.minecraft.enchantment.EnchantmentHelper;
|
||||
import net.minecraft.entity.Entity;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.text.BaseText;
|
||||
import net.minecraft.world.World;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
// not really needed anymore
|
||||
public class EntityInfo
|
||||
{
|
||||
private static String makeTime(long ticks)
|
||||
{
|
||||
long secs = ticks/20;
|
||||
if (secs < 60)
|
||||
{
|
||||
return String.format("%d\"", secs);
|
||||
}
|
||||
if (secs < 60*60)
|
||||
{
|
||||
return String.format("%d'%d\"", secs/60, secs%60);
|
||||
}
|
||||
|
||||
return String.format("%dh%d'%d\"", secs/60/60, (secs % (60*60))/60,(secs % (60*60))%60 );
|
||||
}
|
||||
|
||||
private static String display_item(ItemStack item)
|
||||
{
|
||||
if (item == null)
|
||||
{
|
||||
return null;
|
||||
}
|
||||
if (item.isEmpty()) // func_190926_b()
|
||||
{
|
||||
return null;
|
||||
} // func_190916_E()
|
||||
String stackname = item.getCount()>1?String.format("%dx%s",item.getCount(), item.getName().getString()):item.getName().getString();
|
||||
if (item.isDamaged())
|
||||
{
|
||||
stackname += String.format(" %d/%d", item.getMaxUseTime()-item.getDamage(), item.getMaxUseTime());
|
||||
}
|
||||
if (item.hasEnchantments())
|
||||
{
|
||||
stackname += " ( ";
|
||||
Map<Enchantment, Integer> enchants = EnchantmentHelper.get(item);
|
||||
for (Enchantment e: enchants.keySet())
|
||||
{
|
||||
int level = enchants.get(e);
|
||||
String enstring = e.getName(level).getString();
|
||||
stackname += enstring+" ";
|
||||
}
|
||||
stackname += ")";
|
||||
}
|
||||
return stackname;
|
||||
}
|
||||
|
||||
public static String entity_short_string(Entity e)
|
||||
{
|
||||
if (e == null)
|
||||
{
|
||||
return "None";
|
||||
}
|
||||
return String.format("%s at [%.1f, %.1f, %.1f]",e.getDisplayName().getString(), e.getX(), e.getY(), e.getZ());
|
||||
}
|
||||
|
||||
private static double get_speed(double internal)
|
||||
{
|
||||
return 43.1*internal;
|
||||
}
|
||||
|
||||
private static double get_horse_speed_percent(double internal)
|
||||
{
|
||||
double min = 0.45*0.25;
|
||||
double max = (0.45+0.9)*0.25;
|
||||
return 100*(internal-min)/(max-min);
|
||||
}
|
||||
|
||||
private static double get_horse_jump(double x)
|
||||
{
|
||||
return -0.1817584952 * x*x*x + 3.689713992 * x*x + 2.128599134 * x - 0.343930367;
|
||||
}
|
||||
|
||||
private static double get_horse_jump_percent(double internal)
|
||||
{
|
||||
double min = 0.4;
|
||||
double max = 1.0;
|
||||
return 100*(internal-min)/(max-min);
|
||||
}
|
||||
|
||||
public static List<BaseText> entityInfo(Entity e, World source_world)
|
||||
{
|
||||
List<BaseText> lst = new ArrayList<>();
|
||||
lst.add(Messenger.c("r Use /data get entity command"));
|
||||
return lst;
|
||||
}
|
||||
}
|
||||
@@ -100,11 +100,6 @@ public class WoolTool
|
||||
case GRAY:
|
||||
if (!"false".equals(CarpetSettings.commandInfo))
|
||||
Messenger.send(placer, BlockInfo.blockInfo(pos.down(), worldIn));
|
||||
break;
|
||||
case YELLOW:
|
||||
if (!"false".equals(CarpetSettings.commandInfo))
|
||||
Messenger.m(placer, "r This used to show entity info around the player. Use data get entity command, sorry");
|
||||
//EntityInfo.issue_entity_info(placer);
|
||||
break;
|
||||
case GREEN:
|
||||
if (CarpetSettings.hopperCounters)
|
||||
|
||||
Reference in new issue
Block a user