-
Notifications
You must be signed in to change notification settings - Fork 8
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
bbd8cc1
commit b6df448
Showing
6 changed files
with
43 additions
and
98 deletions.
There are no files selected for viewing
33 changes: 33 additions & 0 deletions
33
src/main/java/github/kasuminova/stellarcore/client/integration/railcraft/RCModelBaker.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
package github.kasuminova.stellarcore.client.integration.railcraft; | ||
|
||
import net.minecraft.client.renderer.block.model.IBakedModel; | ||
import net.minecraft.client.renderer.block.model.ModelResourceLocation; | ||
import net.minecraft.client.renderer.texture.TextureAtlasSprite; | ||
import net.minecraft.client.renderer.vertex.DefaultVertexFormats; | ||
import net.minecraft.util.ResourceLocation; | ||
import net.minecraftforge.client.model.IModel; | ||
|
||
import javax.annotation.Nullable; | ||
import java.util.Set; | ||
import java.util.function.Function; | ||
|
||
public class RCModelBaker { | ||
|
||
@Nullable | ||
public static IBakedModel load(final Set<ModelResourceLocation> modelRL, final IModel model, Function<ResourceLocation, TextureAtlasSprite> textureGetter) { | ||
boolean detected = false; | ||
for (final ModelResourceLocation rl : modelRL) { | ||
if (rl.getNamespace().startsWith("railcraft")) { | ||
detected = true; | ||
break; | ||
} | ||
} | ||
if (detected) { | ||
synchronized (RCModelBaker.class) { | ||
return model.bake(model.getDefaultState(), DefaultVertexFormats.ITEM, textureGetter); | ||
} | ||
} | ||
return null; | ||
} | ||
|
||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
42 changes: 0 additions & 42 deletions
42
src/main/java/github/kasuminova/stellarcore/mixin/railcraft/MixinActuatorModel.java
This file was deleted.
Oops, something went wrong.
42 changes: 0 additions & 42 deletions
42
src/main/java/github/kasuminova/stellarcore/mixin/railcraft/MixinOutfittedTrackModel.java
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.