generated from neoforged/MDK
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix(shaft): fixed wrong block item for transmission shaft
- Loading branch information
Showing
17 changed files
with
153 additions
and
84 deletions.
There are no files selected for viewing
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
7 changes: 2 additions & 5 deletions
7
src/generated/resources/.cache/fbf9d452c21740c3571315e0cdc4a0c2a56d2ed0
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 |
---|---|---|
@@ -1,5 +1,2 @@ | ||
// 1.21 2024-06-23T16:53:27.3530409 Block States: cog_works | ||
166ddf49766b244c9f0800b336c33207b43ac59d assets/cog_works/blockstates/transmission_shaft.json | ||
c7635b13750120d159bbca9312cb7decc8fdd531 assets/cog_works/models/block/iron_transmission_shaft.json | ||
737664283c3a8aa4143cafe3a7bb356f9444609c assets/cog_works/models/block/stone_transmission_shaft.json | ||
bdc61a1eb5805eaa8a85f82b07712d2d551f5382 assets/cog_works/models/block/wood_transmission_shaft.json | ||
// 1.21 2024-06-23T19:30:04.8733538 Block States: cog_works | ||
9b8930b24122053f57f866fa2f5862634eb44da7 assets/cog_works/blockstates/transmission_shaft.json |
72 changes: 36 additions & 36 deletions
72
src/generated/resources/assets/cog_works/blockstates/transmission_shaft.json
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 |
---|---|---|
@@ -1,58 +1,58 @@ | ||
{ | ||
"variants": { | ||
"build_material=iron,facing=down": { | ||
"model": "cog_works:block/iron_transmission_shaft" | ||
"facing=down,shaft_material=iron": { | ||
"model": "minecraft:block/cube" | ||
}, | ||
"build_material=iron,facing=east": { | ||
"model": "cog_works:block/iron_transmission_shaft" | ||
"facing=down,shaft_material=stone": { | ||
"model": "minecraft:block/cube" | ||
}, | ||
"build_material=iron,facing=north": { | ||
"model": "cog_works:block/iron_transmission_shaft" | ||
"facing=down,shaft_material=wood": { | ||
"model": "minecraft:block/cube" | ||
}, | ||
"build_material=iron,facing=south": { | ||
"model": "cog_works:block/iron_transmission_shaft" | ||
"facing=east,shaft_material=iron": { | ||
"model": "minecraft:block/cube" | ||
}, | ||
"build_material=iron,facing=up": { | ||
"model": "cog_works:block/iron_transmission_shaft" | ||
"facing=east,shaft_material=stone": { | ||
"model": "minecraft:block/cube" | ||
}, | ||
"build_material=iron,facing=west": { | ||
"model": "cog_works:block/iron_transmission_shaft" | ||
"facing=east,shaft_material=wood": { | ||
"model": "minecraft:block/cube" | ||
}, | ||
"build_material=stone,facing=down": { | ||
"model": "cog_works:block/stone_transmission_shaft" | ||
"facing=north,shaft_material=iron": { | ||
"model": "minecraft:block/cube" | ||
}, | ||
"build_material=stone,facing=east": { | ||
"model": "cog_works:block/stone_transmission_shaft" | ||
"facing=north,shaft_material=stone": { | ||
"model": "minecraft:block/cube" | ||
}, | ||
"build_material=stone,facing=north": { | ||
"model": "cog_works:block/stone_transmission_shaft" | ||
"facing=north,shaft_material=wood": { | ||
"model": "minecraft:block/cube" | ||
}, | ||
"build_material=stone,facing=south": { | ||
"model": "cog_works:block/stone_transmission_shaft" | ||
"facing=south,shaft_material=iron": { | ||
"model": "minecraft:block/cube" | ||
}, | ||
"build_material=stone,facing=up": { | ||
"model": "cog_works:block/stone_transmission_shaft" | ||
"facing=south,shaft_material=stone": { | ||
"model": "minecraft:block/cube" | ||
}, | ||
"build_material=stone,facing=west": { | ||
"model": "cog_works:block/stone_transmission_shaft" | ||
"facing=south,shaft_material=wood": { | ||
"model": "minecraft:block/cube" | ||
}, | ||
"build_material=wood,facing=down": { | ||
"model": "cog_works:block/wood_transmission_shaft" | ||
"facing=up,shaft_material=iron": { | ||
"model": "minecraft:block/cube" | ||
}, | ||
"build_material=wood,facing=east": { | ||
"model": "cog_works:block/wood_transmission_shaft" | ||
"facing=up,shaft_material=stone": { | ||
"model": "minecraft:block/cube" | ||
}, | ||
"build_material=wood,facing=north": { | ||
"model": "cog_works:block/wood_transmission_shaft" | ||
"facing=up,shaft_material=wood": { | ||
"model": "minecraft:block/cube" | ||
}, | ||
"build_material=wood,facing=south": { | ||
"model": "cog_works:block/wood_transmission_shaft" | ||
"facing=west,shaft_material=iron": { | ||
"model": "minecraft:block/cube" | ||
}, | ||
"build_material=wood,facing=up": { | ||
"model": "cog_works:block/wood_transmission_shaft" | ||
"facing=west,shaft_material=stone": { | ||
"model": "minecraft:block/cube" | ||
}, | ||
"build_material=wood,facing=west": { | ||
"model": "cog_works:block/wood_transmission_shaft" | ||
"facing=west,shaft_material=wood": { | ||
"model": "minecraft:block/cube" | ||
} | ||
} | ||
} |
6 changes: 0 additions & 6 deletions
6
src/generated/resources/assets/cog_works/models/block/iron_transmission_shaft.json
This file was deleted.
Oops, something went wrong.
6 changes: 0 additions & 6 deletions
6
src/generated/resources/assets/cog_works/models/block/stone_transmission_shaft.json
This file was deleted.
Oops, something went wrong.
6 changes: 0 additions & 6 deletions
6
src/generated/resources/assets/cog_works/models/block/wood_transmission_shaft.json
This file was deleted.
Oops, something went wrong.
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
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
54 changes: 54 additions & 0 deletions
54
src/main/java/dev/darkar/cog_works/block/item/TransmissionShaftBlockItem.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,54 @@ | ||
package dev.darkar.cog_works.block.item; | ||
|
||
import dev.darkar.cog_works.Registry; | ||
import dev.darkar.cog_works.block.item.renderer.TransmissionShaftBlockItemRenderer; | ||
import net.minecraft.client.renderer.BlockEntityWithoutLevelRenderer; | ||
import net.minecraft.world.item.BlockItem; | ||
import software.bernie.geckolib.animatable.GeoItem; | ||
import software.bernie.geckolib.animatable.SingletonGeoAnimatable; | ||
import software.bernie.geckolib.animatable.client.GeoRenderProvider; | ||
import software.bernie.geckolib.animatable.instance.AnimatableInstanceCache; | ||
import software.bernie.geckolib.animation.AnimatableManager; | ||
import software.bernie.geckolib.util.GeckoLibUtil; | ||
|
||
import java.util.function.Consumer; | ||
|
||
public class TransmissionShaftBlockItem extends BlockItem implements GeoItem { | ||
|
||
private static final Properties itemProperties = new Properties() | ||
.stacksTo(64); | ||
|
||
private final AnimatableInstanceCache cache = GeckoLibUtil.createInstanceCache(this); | ||
|
||
public TransmissionShaftBlockItem() { | ||
super(Registry.Blocks.TRANSMISSION_SHAFT.get(), itemProperties); | ||
SingletonGeoAnimatable.registerSyncedAnimatable(this); | ||
} | ||
|
||
|
||
@Override | ||
public void registerControllers(AnimatableManager.ControllerRegistrar controllers) { | ||
|
||
} | ||
|
||
@Override | ||
public AnimatableInstanceCache getAnimatableInstanceCache() { | ||
return cache; | ||
} | ||
|
||
@Override | ||
public void createGeoRenderer(Consumer<GeoRenderProvider> consumer) { | ||
consumer.accept(new GeoRenderProvider() { | ||
private TransmissionShaftBlockItemRenderer renderer; | ||
|
||
@Override | ||
public BlockEntityWithoutLevelRenderer getGeoItemRenderer() { | ||
if (renderer == null) { | ||
renderer = new TransmissionShaftBlockItemRenderer(); | ||
} | ||
|
||
return this.renderer; | ||
} | ||
}); | ||
} | ||
} |
26 changes: 26 additions & 0 deletions
26
src/main/java/dev/darkar/cog_works/block/item/model/TransmissionShaftBlockItemModel.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,26 @@ | ||
package dev.darkar.cog_works.block.item.model; | ||
|
||
import dev.darkar.cog_works.block.item.TransmissionShaftBlockItem; | ||
import net.minecraft.resources.ResourceLocation; | ||
import software.bernie.geckolib.model.GeoModel; | ||
|
||
import static dev.darkar.cog_works.CogWorks.MOD_ID; | ||
|
||
public class TransmissionShaftBlockItemModel extends GeoModel<TransmissionShaftBlockItem> { | ||
|
||
@Override | ||
public ResourceLocation getModelResource(TransmissionShaftBlockItem animatable) { | ||
return ResourceLocation.fromNamespaceAndPath(MOD_ID, "geo/block/transmission_shaft.geo.json"); | ||
} | ||
|
||
@Override | ||
public ResourceLocation getTextureResource(TransmissionShaftBlockItem animatable) { | ||
return ResourceLocation.fromNamespaceAndPath(MOD_ID, "textures/block/transmission_shaft.png"); | ||
} | ||
|
||
|
||
@Override | ||
public ResourceLocation getAnimationResource(TransmissionShaftBlockItem animatable) { | ||
return ResourceLocation.fromNamespaceAndPath(MOD_ID, "animations/block/transmission_shaft.animation.json"); | ||
} | ||
} |
12 changes: 12 additions & 0 deletions
12
...ain/java/dev/darkar/cog_works/block/item/renderer/TransmissionShaftBlockItemRenderer.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,12 @@ | ||
package dev.darkar.cog_works.block.item.renderer; | ||
|
||
import dev.darkar.cog_works.block.item.TransmissionShaftBlockItem; | ||
import dev.darkar.cog_works.block.item.model.TransmissionShaftBlockItemModel; | ||
import software.bernie.geckolib.renderer.GeoItemRenderer; | ||
|
||
public class TransmissionShaftBlockItemRenderer extends GeoItemRenderer<TransmissionShaftBlockItem> { | ||
|
||
public TransmissionShaftBlockItemRenderer() { | ||
super(new TransmissionShaftBlockItemModel()); | ||
} | ||
} |
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
Binary file removed
BIN
-5.74 KB
src/main/resources/assets/cog_works/textures/block/stone_transmission_shaft.png
Binary file not shown.
File renamed without changes
Binary file removed
BIN
-5.74 KB
src/main/resources/assets/cog_works/textures/block/wood_transmission_shaft.png
Binary file not shown.