-
Notifications
You must be signed in to change notification settings - Fork 15
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
Showing
21 changed files
with
1,038 additions
and
490 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
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
11 changes: 11 additions & 0 deletions
11
src/main/java/tk/meowmc/portalgun/client/renderer/PortalGunRenderer.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,11 @@ | ||
package tk.meowmc.portalgun.client.renderer; | ||
|
||
import software.bernie.geckolib3.renderer.geo.GeoItemRenderer; | ||
import tk.meowmc.portalgun.client.renderer.models.PortalGunModel; | ||
import tk.meowmc.portalgun.items.PortalGunItem; | ||
|
||
public class PortalGunRenderer extends GeoItemRenderer<PortalGunItem> { | ||
public PortalGunRenderer() { | ||
super(new PortalGunModel()); | ||
} | ||
} |
37 changes: 37 additions & 0 deletions
37
src/main/java/tk/meowmc/portalgun/client/renderer/models/PortalGunModel.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,37 @@ | ||
package tk.meowmc.portalgun.client.renderer.models; | ||
|
||
import me.shedaniel.autoconfig.AutoConfig; | ||
import net.minecraft.util.Identifier; | ||
import software.bernie.geckolib3.model.AnimatedGeoModel; | ||
import tk.meowmc.portalgun.config.PortalGunConfig; | ||
import tk.meowmc.portalgun.items.PortalGunItem; | ||
|
||
import static tk.meowmc.portalgun.Portalgun.id; | ||
|
||
public class PortalGunModel extends AnimatedGeoModel<PortalGunItem> { | ||
PortalGunConfig config = AutoConfig.getConfigHolder(PortalGunConfig.class).getConfig(); | ||
|
||
@Override | ||
public Identifier getModelLocation(PortalGunItem object) { | ||
/*if (config.enabled.enableOldPortalGunModel) | ||
return id("geo/portalgun_og.geo.json"); | ||
else*/ | ||
return id("geo/portalgun.geo.json"); | ||
} | ||
|
||
@Override | ||
public Identifier getTextureLocation(PortalGunItem object) { | ||
/*if (config.enabled.enableOldPortalGunModel) | ||
return id("textures/item/portal_gun_og.png"); | ||
else*/ | ||
return id("textures/item/portal_gun.png"); | ||
} | ||
|
||
@Override | ||
public Identifier getAnimationFileLocation(PortalGunItem animatable) { | ||
/*if (config.enabled.enableOldPortalGunModel) | ||
return id("animations/portalgun_og.animation.json"); | ||
else*/ | ||
return id("animations/portalgun.animation.json"); | ||
} | ||
} |
12 changes: 12 additions & 0 deletions
12
src/main/java/tk/meowmc/portalgun/config/ModMenuIntegration.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 tk.meowmc.portalgun.config; | ||
|
||
import com.terraformersmc.modmenu.api.ConfigScreenFactory; | ||
import com.terraformersmc.modmenu.api.ModMenuApi; | ||
import me.shedaniel.autoconfig.AutoConfig; | ||
|
||
public class ModMenuIntegration implements ModMenuApi { | ||
@Override | ||
public ConfigScreenFactory<?> getModConfigScreenFactory() { | ||
return parent -> AutoConfig.getConfigScreen(PortalGunConfig.class, parent).get(); | ||
} | ||
} |
34 changes: 34 additions & 0 deletions
34
src/main/java/tk/meowmc/portalgun/config/PortalGunConfig.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,34 @@ | ||
package tk.meowmc.portalgun.config; | ||
|
||
import me.shedaniel.autoconfig.AutoConfig; | ||
import me.shedaniel.autoconfig.ConfigData; | ||
import me.shedaniel.autoconfig.annotation.Config; | ||
import me.shedaniel.autoconfig.annotation.ConfigEntry; | ||
import me.shedaniel.autoconfig.serializer.JanksonConfigSerializer; | ||
import tk.meowmc.portalgun.Portalgun; | ||
|
||
@Config(name = Portalgun.MODID) | ||
public class PortalGunConfig implements ConfigData { | ||
@ConfigEntry.Gui.TransitiveObject | ||
@ConfigEntry.Category("enabled") | ||
public final Enabled enabled = new Enabled(); | ||
|
||
public static void register() { | ||
AutoConfig.register(PortalGunConfig.class, JanksonConfigSerializer::new); | ||
} | ||
|
||
public static PortalGunConfig get() { | ||
return AutoConfig.getConfigHolder(PortalGunConfig.class).getConfig(); | ||
} | ||
|
||
public static void save() { | ||
AutoConfig.getConfigHolder(PortalGunConfig.class).save(); | ||
} | ||
|
||
|
||
public static class Enabled { | ||
/*public final boolean enableOldPortalGunModel = false;*/ | ||
public final boolean enableRoundPortals = true; | ||
} | ||
|
||
} |
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,6 @@ | ||
package tk.meowmc.portalgun.ducks; | ||
|
||
public interface IEEntity { | ||
long collidingPortalActiveTickTime = 0; | ||
int age = 0; | ||
} |
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
Oops, something went wrong.