mirror of
https://github.com/GTNewHorizons/ForestryMC.git
synced 2026-11-24 05:44:24 +00:00
Update for 1.11. Missing assets, unstable.
This commit is contained in:
1 parent
30d7365518
commit
9611ae08ae
1145 files changed
+15561
-18107
No files matched your search
@@ -1,16 +1,8 @@
|
||||
package forestry.arboriculture;
|
||||
|
||||
import javax.annotation.Nonnull;
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
import net.minecraft.client.renderer.block.model.ModelResourceLocation;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.util.ResourceLocation;
|
||||
|
||||
import net.minecraftforge.fml.relauncher.Side;
|
||||
import net.minecraftforge.fml.relauncher.SideOnly;
|
||||
|
||||
import forestry.api.arboriculture.EnumForestryWoodType;
|
||||
import forestry.api.arboriculture.EnumVanillaWoodType;
|
||||
import forestry.api.arboriculture.IWoodItemMeshDefinition;
|
||||
@@ -21,9 +13,14 @@ import forestry.api.core.ForestryAPI;
|
||||
import forestry.arboriculture.models.WoodModelLoader;
|
||||
import forestry.core.config.Constants;
|
||||
import forestry.core.utils.Translator;
|
||||
import net.minecraft.client.renderer.block.model.ModelResourceLocation;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.util.ResourceLocation;
|
||||
import net.minecraftforge.fml.relauncher.Side;
|
||||
import net.minecraftforge.fml.relauncher.SideOnly;
|
||||
|
||||
public class WoodHelper {
|
||||
@Nonnull
|
||||
|
||||
public static String getDisplayName(IWoodTyped wood, IWoodType woodType) {
|
||||
WoodBlockKind blockKind = wood.getBlockKind();
|
||||
|
||||
@@ -51,7 +48,7 @@ public class WoodHelper {
|
||||
|
||||
return displayName;
|
||||
}
|
||||
|
||||
|
||||
public static ResourceLocation getDefaultResourceLocations(IWoodTyped typed) {
|
||||
return new ResourceLocation(Constants.MOD_ID, typed.getBlockKind().toString());
|
||||
}
|
||||
@@ -71,16 +68,16 @@ public class WoodHelper {
|
||||
|
||||
@SideOnly(Side.CLIENT)
|
||||
public static class WoodMeshDefinition implements IWoodItemMeshDefinition {
|
||||
@Nonnull
|
||||
public IWoodTyped wood;
|
||||
|
||||
public WoodMeshDefinition(@Nonnull IWoodTyped wood) {
|
||||
public final IWoodTyped wood;
|
||||
|
||||
public WoodMeshDefinition(IWoodTyped wood) {
|
||||
this.wood = wood;
|
||||
}
|
||||
|
||||
@Override
|
||||
public ModelResourceLocation getModelLocation(ItemStack stack) {
|
||||
if(!WoodModelLoader.INSTANCE.isRegistered){
|
||||
if (!WoodModelLoader.INSTANCE.isRegistered) {
|
||||
return new ModelResourceLocation(getDefaultModelLocation(stack), "inventory");
|
||||
}
|
||||
int meta = stack.getMetadata();
|
||||
@@ -94,7 +91,7 @@ public class WoodHelper {
|
||||
throw new IllegalArgumentException("Unknown wood type: " + woodType);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public ResourceLocation getDefaultModelLocation(ItemStack stack) {
|
||||
WoodBlockKind blockKind = wood.getBlockKind();
|
||||
|
||||
Reference in new issue
Block a user