2020-08-14 08:29:22 +02:00
|
|
|
package com.gildedgames.the_aether.api.moa;
|
2016-12-17 16:28:16 +01:00
|
|
|
|
2020-08-14 08:29:22 +02:00
|
|
|
import com.gildedgames.the_aether.api.RegistryEntry;
|
2017-08-12 07:25:54 +02:00
|
|
|
import net.minecraft.creativetab.CreativeTabs;
|
2016-12-17 16:28:16 +01:00
|
|
|
import net.minecraft.util.ResourceLocation;
|
|
|
|
|
2018-12-07 06:32:48 +01:00
|
|
|
public class AetherMoaType extends RegistryEntry {
|
2023-03-13 19:53:26 +01:00
|
|
|
private MoaProperties properties;
|
2016-12-17 16:28:16 +01:00
|
|
|
|
2023-03-13 19:53:26 +01:00
|
|
|
public int hexColor;
|
2016-12-17 16:28:16 +01:00
|
|
|
|
2023-03-13 19:53:26 +01:00
|
|
|
public CreativeTabs creativeTab;
|
2017-08-12 07:25:54 +02:00
|
|
|
|
2023-03-13 19:53:26 +01:00
|
|
|
public AetherMoaType(int hexColor, MoaProperties properties) {
|
|
|
|
this.hexColor = hexColor;
|
|
|
|
this.properties = properties;
|
2016-12-17 16:28:16 +01:00
|
|
|
|
2023-03-13 19:53:26 +01:00
|
|
|
this.creativeTab = CreativeTabs.tabMisc;
|
|
|
|
}
|
2016-12-17 16:28:16 +01:00
|
|
|
|
2023-03-13 19:53:26 +01:00
|
|
|
public AetherMoaType(
|
|
|
|
int hexColor, MoaProperties properties, CreativeTabs creativeTab
|
|
|
|
) {
|
|
|
|
this(hexColor, properties);
|
2016-12-17 16:28:16 +01:00
|
|
|
|
2023-03-13 19:53:26 +01:00
|
|
|
this.creativeTab = creativeTab;
|
|
|
|
}
|
2017-08-12 07:25:54 +02:00
|
|
|
|
2023-03-13 19:53:26 +01:00
|
|
|
public ResourceLocation getTexture(boolean saddled, boolean isBeingRidden) {
|
|
|
|
if (this.properties.hasCustomTexture()) {
|
|
|
|
return this.properties.getCustomTexture(saddled, isBeingRidden);
|
|
|
|
}
|
2016-12-17 16:28:16 +01:00
|
|
|
|
2023-03-13 19:53:26 +01:00
|
|
|
return new ResourceLocation(
|
|
|
|
"aether_legacy",
|
|
|
|
"textures/entities/moa/" + ("moa_")
|
|
|
|
+ this.getRegistryName().getResourcePath().toLowerCase() + ".png"
|
|
|
|
);
|
|
|
|
}
|
2017-08-12 07:25:54 +02:00
|
|
|
|
2023-03-13 19:53:26 +01:00
|
|
|
public MoaProperties getMoaProperties() {
|
|
|
|
return this.properties;
|
|
|
|
}
|
2017-08-12 07:25:54 +02:00
|
|
|
|
2023-03-13 19:53:26 +01:00
|
|
|
public CreativeTabs getCreativeTab() {
|
|
|
|
return this.creativeTab;
|
|
|
|
}
|
2016-12-17 16:28:16 +01:00
|
|
|
|
2023-03-13 19:53:26 +01:00
|
|
|
public int getMoaEggColor() {
|
|
|
|
return this.hexColor;
|
|
|
|
}
|
2016-12-17 16:28:16 +01:00
|
|
|
}
|